broadcom/compiler: treat PIPE_FORMAT_NONE as 32-bit formats for output type

Needed to support Vulkan feature shaderStorageImageReadWithoutFormat.

With that enabled we could receive a NONE format on a load image. For
those we treat them as 32-bit formats, that would mean that the
lowering would not need to do any format-specific unpacking.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20744>
This commit is contained in:
Alejandro Piñeiro 2023-01-17 13:16:12 +01:00 committed by Marge Bot
parent 41a081380a
commit b56be4c37e

View file

@ -43,6 +43,13 @@
bool
v3d_gl_format_is_return_32(enum pipe_format format)
{
/* We can get a NONE format in Vulkan because we support the
* shaderStorageImageReadWithoutFormat feature. We consider these to
* always use 32-bit precision.
*/
if (format == PIPE_FORMAT_NONE)
return true;
const struct util_format_description *desc =
util_format_description(format);
const struct util_format_channel_description *chan = &desc->channel[0];