diff --git a/src/dawn/common/GPUInfo.cpp b/src/dawn/common/GPUInfo.cpp index 97068ff6ca..ddd8459703 100644 --- a/src/dawn/common/GPUInfo.cpp +++ b/src/dawn/common/GPUInfo.cpp @@ -63,6 +63,9 @@ namespace gpu_info { bool IsIntel(PCIVendorID vendorId) { return vendorId == kVendorID_Intel; } + bool IsMesa(PCIVendorID vendorId) { + return vendorId == kVendorID_Mesa; + } bool IsNvidia(PCIVendorID vendorId) { return vendorId == kVendorID_Nvidia; } diff --git a/src/dawn/common/GPUInfo.h b/src/dawn/common/GPUInfo.h index 2b30d96662..26c91036e6 100644 --- a/src/dawn/common/GPUInfo.h +++ b/src/dawn/common/GPUInfo.h @@ -27,6 +27,7 @@ namespace gpu_info { static constexpr PCIVendorID kVendorID_ARM = 0x13B5; static constexpr PCIVendorID kVendorID_ImgTec = 0x1010; static constexpr PCIVendorID kVendorID_Intel = 0x8086; + static constexpr PCIVendorID kVendorID_Mesa = 0x10005; static constexpr PCIVendorID kVendorID_Nvidia = 0x10DE; static constexpr PCIVendorID kVendorID_Qualcomm = 0x5143; static constexpr PCIVendorID kVendorID_Google = 0x1AE0; @@ -39,6 +40,7 @@ namespace gpu_info { bool IsARM(PCIVendorID vendorId); bool IsImgTec(PCIVendorID vendorId); bool IsIntel(PCIVendorID vendorId); + bool IsMesa(PCIVendorID vendorId); bool IsNvidia(PCIVendorID vendorId); bool IsQualcomm(PCIVendorID vendorId); bool IsSwiftshader(PCIVendorID vendorId, PCIDeviceID deviceId); diff --git a/src/dawn/native/vulkan/AdapterVk.cpp b/src/dawn/native/vulkan/AdapterVk.cpp index 6957a39406..4437882295 100644 --- a/src/dawn/native/vulkan/AdapterVk.cpp +++ b/src/dawn/native/vulkan/AdapterVk.cpp @@ -285,10 +285,10 @@ namespace dawn::native::vulkan { // Only check maxFragmentCombinedOutputResources on mobile GPUs. Desktop GPUs drivers seem // to put incorrect values for this limit with things like 8 or 16 when they can do bindless - // storage buffers. + // storage buffers. Mesa llvmpipe driver also puts 8 here. uint32_t vendorId = mDeviceInfo.properties.vendorID; if (!gpu_info::IsAMD(vendorId) && !gpu_info::IsIntel(vendorId) && - !gpu_info::IsNvidia(vendorId)) { + !gpu_info::IsMesa(vendorId) && !gpu_info::IsNvidia(vendorId)) { if (vkLimits.maxFragmentCombinedOutputResources < kMaxColorAttachments + baseLimits.v1.maxStorageTexturesPerShaderStage + baseLimits.v1.maxStorageBuffersPerShaderStage) {