diff options
author | Dave Airlie <[email protected]> | 2017-05-04 10:51:49 +1000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-05-10 11:29:28 +0100 |
commit | 43678114c7bd024e7aa4c4a7ea5b05088895a499 (patch) | |
tree | ac59d28ebd7a0ca64c6cddb1441c68e1e7d48bb5 /src/amd | |
parent | 072b1f5270ef76f997ee33a1397e14c9eeecbc35 (diff) |
radv: don't advertise transfer props unless we can do anything else
There is no reason to advertise transfer ability for formats we can't
use for anything else. This stops some CTS tests hitting internal
error for 64-bit types when they see the transfer flags.
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
(cherry picked from commit efa19f5a542709cab7c6aa7f03af959f4394962f)
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/vulkan/radv_formats.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index 07942e4217f..61cc6739842 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c @@ -597,13 +597,13 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical tiled |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT; } } - if (util_is_power_of_two(vk_format_get_blocksize(format)) && !scaled) { + if (tiled && util_is_power_of_two(vk_format_get_blocksize(format)) && !scaled) { tiled |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR | VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR; } } - if (util_is_power_of_two(vk_format_get_blocksize(format)) && !scaled) { + if (linear && util_is_power_of_two(vk_format_get_blocksize(format)) && !scaled) { linear |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR | VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR; } |