Commit b760ccfe authored by Chris Lord's avatar Chris Lord Committed by Marge Bot

vc4: Fix query_dmabuf_modifiers mis-reporting external_only property

vc4_screen_query_dmabuf_modifiers doesn't consider that the given format
may only be supported by lowering, which only happens for external
textures.
Reviewed-by: Iago Toral's avatarIago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
Tested-by: Marge Bot <!4063>
Part-of: <!4063>
parent 61f2e8d9
Pipeline #118509 passed with stages
in 10 minutes and 28 seconds
......@@ -412,6 +412,7 @@ vc4_screen_query_dmabuf_modifiers(struct pipe_screen *pscreen,
int *count)
{
int m, i;
bool tex_will_lower;
uint64_t available_modifiers[] = {
DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED,
DRM_FORMAT_MOD_LINEAR,
......@@ -426,6 +427,7 @@ vc4_screen_query_dmabuf_modifiers(struct pipe_screen *pscreen,
*count = MIN2(max, num_modifiers);
m = screen->has_tiling_ioctl ? 0 : 1;
tex_will_lower = !vc4_tex_format_supported(format);
/* We support both modifiers (tiled and linear) for all sampler
* formats, but if we don't have the DRM_VC4_GET_TILING ioctl
* we shouldn't advertise the tiled formats.
......@@ -433,7 +435,7 @@ vc4_screen_query_dmabuf_modifiers(struct pipe_screen *pscreen,
for (i = 0; i < *count; i++) {
modifiers[i] = available_modifiers[m++];
if (external_only)
external_only[i] = false;
external_only[i] = tex_will_lower;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment