[Mesa-stable] [PATCH v2 2/2] radv: Disable texel buffers with A2 SNORM/SSCALED/SINT for pre-vega.
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Mon May 14 15:25:47 UTC 2018
The hardware always interprets the alpha as unsigned and fixing it
in the shader is going to add unacceptable overheads.
CC: 18.0 18.1 <mesa-stable at lists.freedesktop.org>
---
src/amd/vulkan/radv_formats.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
index f8438f43b85..1ac07b41a61 100644
--- a/src/amd/vulkan/radv_formats.c
+++ b/src/amd/vulkan/radv_formats.c
@@ -657,6 +657,25 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical
tiled |= VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT;
}
+ switch(format) {
+ case VK_FORMAT_A2R10G10B10_SNORM_PACK32:
+ case VK_FORMAT_A2B10G10R10_SNORM_PACK32:
+ case VK_FORMAT_A2R10G10B10_SSCALED_PACK32:
+ case VK_FORMAT_A2B10G10R10_SSCALED_PACK32:
+ case VK_FORMAT_A2R10G10B10_SINT_PACK32:
+ case VK_FORMAT_A2B10G10R10_SINT_PACK32:
+ if (physical_device->rad_info.chip_class <= VI &&
+ physical_device->rad_info.family != CHIP_STONEY) {
+ buffer &= ~(VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT |
+ VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT);
+ linear = 0;
+ tiled = 0;
+ }
+ break;
+ default:
+ break;
+ }
+
out_properties->linearTilingFeatures = linear;
out_properties->optimalTilingFeatures = tiled;
out_properties->bufferFeatures = buffer;
--
2.17.0
More information about the mesa-stable
mailing list