diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2017-01-06 12:50:47 -0800 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2017-01-24 01:13:25 +0000 |
commit | 17cd8edc37ce41f35f7e8b5a8ed91e55d95e83b8 (patch) | |
tree | 769ee2e2c628237cceffa9bde44e339d28d4c2ca | |
parent | 512728415df2d72bff6d2bc72f902720bc651b59 (diff) |
anv/formats: Use the real format for B4G4R4A4_UNORM_PACK16 on gen8
Because border color is handled pre-swizzle, when we move the alpha
channel around in the format, the OPAQUE_BLACK border colors don't work
correctly on B4G4R4A4_UNORM_PACK16 with the hack. This fixes the
following Vulkan CTS tests on Broadwell:
dEQP-VK.pipeline.sampler.view_type.2d_array.format.b4g4r4a4_unorm_pack16.address_modes.all_mode_clamp_to_border_opaque_black
dEQP-VK.pipeline.sampler.view_type.1d_array.format.b4g4r4a4_unorm_pack16.address_modes.all_mode_clamp_to_border_opaque_black
dEQP-VK.pipeline.sampler.view_type.2d.format.b4g4r4a4_unorm_pack16.address_modes.all_mode_clamp_to_border_opaque_black
dEQP-VK.pipeline.sampler.view_type.1d.format.b4g4r4a4_unorm_pack16.address_modes.all_mode_clamp_to_border_opaque_black
dEQP-VK.pipeline.sampler.view_type.3d.format.b4g4r4a4_unorm_pack16.address_modes.all_mode_clamp_to_border_opaque_black
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 2d7bed6158a1f119411d4e9f34beb7846065ae93)
-rw-r--r-- | src/intel/vulkan/anv_formats.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index 875a7d33a4..f432243b14 100644 --- a/src/intel/vulkan/anv_formats.c +++ b/src/intel/vulkan/anv_formats.c @@ -295,10 +295,10 @@ anv_get_format(const struct gen_device_info *devinfo, VkFormat vk_format, } } - /* The B4G4R4A4 format isn't available prior to Sky Lake so we have to fall + /* The B4G4R4A4 format isn't available prior to Broadwell so we have to fall * back to a format with a more complex swizzle. */ - if (vk_format == VK_FORMAT_B4G4R4A4_UNORM_PACK16 && devinfo->gen < 9) { + if (vk_format == VK_FORMAT_B4G4R4A4_UNORM_PACK16 && devinfo->gen < 8) { return (struct anv_format) { .isl_format = ISL_FORMAT_B4G4R4A4_UNORM, .swizzle = ISL_SWIZZLE(GREEN, RED, ALPHA, BLUE), |