Skip the check of maxFragmentCombinedOutputResources for Mesa llvmpipe driver
The Mesa Gallium llvmpipe driver is a software rasterizer that uses LLVM to do runtime code generation. It seems to put incorrect value for maxFragmentCombinedOutputResources, like we see on desktop GPUs. Some relative values are as below. vkLimits.maxFragmentCombinedOutputResources: 8 kMaxColorAttachments: 8 baseLimits.v1.maxStorageTexturesPerShaderStage: 4 baseLimits.v1.maxStorageBuffersPerShaderStage: 8 This CL will skip the check of this limit on llvmpipe, like we did for desktop GPUs. BUG=dawn:1311 Change-Id: I1698f6e26dd62b56f3819980fa2dcc986c9c5ba3 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/81941 Reviewed-by: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Hao Li <hao.x.li@intel.com> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
41610a83d1
commit
6a9f9bd1ff
|
@ -63,6 +63,9 @@ namespace gpu_info {
|
||||||
bool IsIntel(PCIVendorID vendorId) {
|
bool IsIntel(PCIVendorID vendorId) {
|
||||||
return vendorId == kVendorID_Intel;
|
return vendorId == kVendorID_Intel;
|
||||||
}
|
}
|
||||||
|
bool IsMesa(PCIVendorID vendorId) {
|
||||||
|
return vendorId == kVendorID_Mesa;
|
||||||
|
}
|
||||||
bool IsNvidia(PCIVendorID vendorId) {
|
bool IsNvidia(PCIVendorID vendorId) {
|
||||||
return vendorId == kVendorID_Nvidia;
|
return vendorId == kVendorID_Nvidia;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ namespace gpu_info {
|
||||||
static constexpr PCIVendorID kVendorID_ARM = 0x13B5;
|
static constexpr PCIVendorID kVendorID_ARM = 0x13B5;
|
||||||
static constexpr PCIVendorID kVendorID_ImgTec = 0x1010;
|
static constexpr PCIVendorID kVendorID_ImgTec = 0x1010;
|
||||||
static constexpr PCIVendorID kVendorID_Intel = 0x8086;
|
static constexpr PCIVendorID kVendorID_Intel = 0x8086;
|
||||||
|
static constexpr PCIVendorID kVendorID_Mesa = 0x10005;
|
||||||
static constexpr PCIVendorID kVendorID_Nvidia = 0x10DE;
|
static constexpr PCIVendorID kVendorID_Nvidia = 0x10DE;
|
||||||
static constexpr PCIVendorID kVendorID_Qualcomm = 0x5143;
|
static constexpr PCIVendorID kVendorID_Qualcomm = 0x5143;
|
||||||
static constexpr PCIVendorID kVendorID_Google = 0x1AE0;
|
static constexpr PCIVendorID kVendorID_Google = 0x1AE0;
|
||||||
|
@ -39,6 +40,7 @@ namespace gpu_info {
|
||||||
bool IsARM(PCIVendorID vendorId);
|
bool IsARM(PCIVendorID vendorId);
|
||||||
bool IsImgTec(PCIVendorID vendorId);
|
bool IsImgTec(PCIVendorID vendorId);
|
||||||
bool IsIntel(PCIVendorID vendorId);
|
bool IsIntel(PCIVendorID vendorId);
|
||||||
|
bool IsMesa(PCIVendorID vendorId);
|
||||||
bool IsNvidia(PCIVendorID vendorId);
|
bool IsNvidia(PCIVendorID vendorId);
|
||||||
bool IsQualcomm(PCIVendorID vendorId);
|
bool IsQualcomm(PCIVendorID vendorId);
|
||||||
bool IsSwiftshader(PCIVendorID vendorId, PCIDeviceID deviceId);
|
bool IsSwiftshader(PCIVendorID vendorId, PCIDeviceID deviceId);
|
||||||
|
|
|
@ -285,10 +285,10 @@ namespace dawn::native::vulkan {
|
||||||
|
|
||||||
// Only check maxFragmentCombinedOutputResources on mobile GPUs. Desktop GPUs drivers seem
|
// 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
|
// 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;
|
uint32_t vendorId = mDeviceInfo.properties.vendorID;
|
||||||
if (!gpu_info::IsAMD(vendorId) && !gpu_info::IsIntel(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 <
|
if (vkLimits.maxFragmentCombinedOutputResources <
|
||||||
kMaxColorAttachments + baseLimits.v1.maxStorageTexturesPerShaderStage +
|
kMaxColorAttachments + baseLimits.v1.maxStorageTexturesPerShaderStage +
|
||||||
baseLimits.v1.maxStorageBuffersPerShaderStage) {
|
baseLimits.v1.maxStorageBuffersPerShaderStage) {
|
||||||
|
|
Loading…
Reference in New Issue