[Mesa-dev] [PATCH] radv: don't advertise transfer props unless we can do anything else
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Thu May 4 07:32:39 UTC 2017
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
On Thu, May 4, 2017 at 2:52 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> 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.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/amd/vulkan/radv_formats.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
> index 07942e4..61cc673 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;
> }
> --
> 2.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list