zink: fix cap check for arb sparse texture2

arb_sparse_texture2 also enables multisampled sparse textures.
bring back the check for msaa support.

fixes #8229

Fixes: 4f8ba2b9aa ("zink: fix sparse residency query and minLOD feature checks")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21121>
(cherry picked from commit 8f928a95e1)
This commit is contained in:
SoroushIMG 2023-02-04 17:44:40 +00:00 committed by Dylan Baker
parent cacdccbb15
commit a31787312d
2 changed files with 4 additions and 2 deletions

View file

@ -580,7 +580,7 @@
"description": "zink: fix cap check for arb sparse texture2",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "4f8ba2b9aae265dfc56a62e85cd5eab3c4c718f3"
},

View file

@ -881,9 +881,11 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS:
return screen->info.feats.features.sparseResidencyImage2D ? 1 : 0;
case PIPE_CAP_QUERY_SPARSE_TEXTURE_RESIDENCY:
return screen->info.feats.features.shaderResourceResidency ? 1 : 0;
return screen->info.feats.features.sparseResidency2Samples &&
screen->info.feats.features.shaderResourceResidency ? 1 : 0;
case PIPE_CAP_CLAMP_SPARSE_TEXTURE_LOD:
return screen->info.feats.features.shaderResourceMinLod &&
screen->info.feats.features.sparseResidency2Samples &&
screen->info.feats.features.shaderResourceResidency ? 1 : 0;
case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS: