mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
freedreno: Advertise external_only if we can't render
Don't claim we can render to formats unconditionally. Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35982>
This commit is contained in:
parent
29c342649d
commit
5b619cc4b0
1 changed files with 7 additions and 1 deletions
|
|
@ -744,6 +744,12 @@ is_format_supported(struct pipe_screen *pscreen,
|
|||
return modifier == DRM_FORMAT_MOD_LINEAR;
|
||||
}
|
||||
|
||||
static bool
|
||||
is_rendering_supported(struct pipe_screen *pscreen, enum pipe_format format)
|
||||
{
|
||||
return pscreen->is_format_supported(pscreen, format, PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_RENDER_TARGET);
|
||||
}
|
||||
|
||||
static void
|
||||
fd_screen_query_dmabuf_modifiers(struct pipe_screen *pscreen,
|
||||
enum pipe_format format, int max,
|
||||
|
|
@ -767,7 +773,7 @@ fd_screen_query_dmabuf_modifiers(struct pipe_screen *pscreen,
|
|||
modifiers[num] = all_modifiers[i];
|
||||
|
||||
if (external_only)
|
||||
external_only[num] = false;
|
||||
external_only[num] = !is_rendering_supported(pscreen, format);
|
||||
}
|
||||
|
||||
num++;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue