[Mesa-dev] [PATCH 2/2] radv: Expose transfer format features.

Andres Rodriguez andresx7 at gmail.com
Mon Jan 30 19:20:08 UTC 2017


Reviewed-by: Andres Rodriguez <andresx7 at gmail.com>

Fixes:
dEQP-VK.api.info.image_format_properties.*

Regards,
Andres

On 2017-01-25 06:24 PM, Bas Nieuwenhuizen wrote:
> Signed-off-by: Bas Nieuwenhuizen <basni at google.com>
> Tested-by: Andres Rodriguez <andresx7 at gmail.com>
> ---
>   src/amd/vulkan/radv_formats.c | 11 +++++++++++
>   1 file changed, 11 insertions(+)
>
> diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
> index f56f67c400e..c968cefc9c7 100644
> --- a/src/amd/vulkan/radv_formats.c
> +++ b/src/amd/vulkan/radv_formats.c
> @@ -570,6 +570,8 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical
>   			tiled |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;
>   			tiled |= VK_FORMAT_FEATURE_BLIT_SRC_BIT |
>   			         VK_FORMAT_FEATURE_BLIT_DST_BIT;
> +			tiled |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR |
> +			         VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR;
>   		}
>   	} else {
>   		bool linear_sampling;
> @@ -591,6 +593,15 @@ 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))) {
> +			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))) {
> +		linear |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR |
> +		          VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR;
>   	}
>   
>   	if (format == VK_FORMAT_R32_UINT || format == VK_FORMAT_R32_SINT) {



More information about the mesa-dev mailing list