v3d: restrict formats supported for PIPE_BIND_SHADER_IMAGE
So far we were relying on the supported formats filtering when creating images from the user API. But for some other (internal) uses, some of the formats that pass the filter need to be restricted when binding them as shader images, as they are not supported for this case. v3 (Iago): - Change commit message. Signed-off-by: Alejandro Piñeiro <apinheiro@igalia.com> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13409>
This commit is contained in:
committed by
Marge Bot
parent
bb8285c258
commit
982c630cd5
@@ -652,6 +652,23 @@ v3d_screen_is_format_supported(struct pipe_screen *pscreen,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (usage & PIPE_BIND_SHADER_IMAGE) {
|
||||
switch (format) {
|
||||
/* FIXME: maybe we can implement a swizzle-on-writes to add
|
||||
* support for BGRA-alike formats.
|
||||
*/
|
||||
case PIPE_FORMAT_A4B4G4R4_UNORM:
|
||||
case PIPE_FORMAT_A1B5G5R5_UNORM:
|
||||
case PIPE_FORMAT_B5G6R5_UNORM:
|
||||
case PIPE_FORMAT_B8G8R8A8_UNORM:
|
||||
case PIPE_FORMAT_X8Z24_UNORM:
|
||||
case PIPE_FORMAT_Z16_UNORM:
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user