[Mesa-dev] [PATCH 1/2] radv: disallow 3D images and mipmaps/layers for R32G32B32 linear formats
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Mon Oct 8 21:05:50 UTC 2018
On Mon, Oct 8, 2018 at 2:39 PM Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
>
> R32G32B32 are weird formats and we are only going to support
> some basic operations for now.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/amd/vulkan/radv_formats.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
> index ad06c9e996..a7aa819e2b 100644
> --- a/src/amd/vulkan/radv_formats.c
> +++ b/src/amd/vulkan/radv_formats.c
> @@ -1091,6 +1091,20 @@ static VkResult radv_get_image_format_properties(struct radv_physical_device *ph
> sampleCounts |= VK_SAMPLE_COUNT_2_BIT | VK_SAMPLE_COUNT_4_BIT | VK_SAMPLE_COUNT_8_BIT;
> }
>
> + if (info->tiling == VK_IMAGE_TILING_LINEAR &&
> + (info->format == VK_FORMAT_R32G32B32_SFLOAT ||
> + info->format == VK_FORMAT_R32G32B32_SINT ||
> + info->format == VK_FORMAT_R32G32B32_UINT)) {
Maybe just check if the blocksize is not a power of two?
Either way, this patch is
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
> + /* R32G32B32 is a weird format and the driver currently only
> + * supports the barely minimum.
> + * TODO: Implement more if we really need to.
> + */
> + if (info->type == VK_IMAGE_TYPE_3D)
> + goto unsupported;
> + maxArraySize = 1;
> + maxMipLevels = 1;
> + }
> +
> if (info->usage & VK_IMAGE_USAGE_SAMPLED_BIT) {
> if (!(format_feature_flags & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT)) {
> goto unsupported;
> --
> 2.19.1
>
> _______________________________________________
> 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