mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 10:40:11 +01:00
dri2: Allow allocating suboptimal for sampling
Fixes allocations via gbm, which doesn't necessarily need to be
renderable.
Fixes: ba7454a155 ("dri2+gallium: Support to import suboptimal formats")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36081>
This commit is contained in:
parent
a1cd9f917f
commit
3fcf63f364
1 changed files with 4 additions and 2 deletions
|
|
@ -919,8 +919,10 @@ dri_create_image(struct dri_screen *screen,
|
|||
if (pscreen->is_format_supported(pscreen, map->pipe_format, screen->target,
|
||||
0, 0, PIPE_BIND_RENDER_TARGET))
|
||||
tex_usage |= PIPE_BIND_RENDER_TARGET;
|
||||
if (pscreen->is_format_supported(pscreen, map->pipe_format, screen->target,
|
||||
0, 0, PIPE_BIND_SAMPLER_VIEW))
|
||||
if (pscreen->is_format_supported(pscreen, map->pipe_format, screen->target, 0, 0,
|
||||
PIPE_BIND_SAMPLER_VIEW) ||
|
||||
pscreen->is_format_supported(pscreen, map->pipe_format, screen->target, 0, 0,
|
||||
PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_SAMPLER_VIEW_SUBOPTIMAL))
|
||||
tex_usage |= PIPE_BIND_SAMPLER_VIEW;
|
||||
|
||||
if (!tex_usage)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue