mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
zink: only add STORAGE bit for sparse images based on multisample usage
if the driver doesn't support multisample storage images, don't create them
Fixes: d320e8328d ("zink: set up image create bits for sparse textures")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28115>
This commit is contained in:
parent
63f5a6cbe3
commit
c248411907
1 changed files with 2 additions and 1 deletions
|
|
@ -1587,7 +1587,8 @@ resource_create(struct pipe_screen *pscreen,
|
|||
|
||||
bool linear = false;
|
||||
struct pipe_resource templ2 = *templ;
|
||||
if (templ2.flags & PIPE_RESOURCE_FLAG_SPARSE)
|
||||
if (templ2.flags & PIPE_RESOURCE_FLAG_SPARSE &&
|
||||
(util_res_sample_count(templ) == 1 || screen->info.feats.features.shaderStorageImageMultisample))
|
||||
templ2.bind |= PIPE_BIND_SHADER_IMAGE;
|
||||
if (screen->faked_e5sparse && templ->format == PIPE_FORMAT_R9G9B9E5_FLOAT) {
|
||||
templ2.flags &= ~PIPE_RESOURCE_FLAG_SPARSE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue