zink: fix sparse residency query and minLOD feature checks

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21013>
(cherry picked from commit 4f8ba2b9aa)
This commit is contained in:
SoroushIMG 2023-01-30 18:53:19 +00:00 committed by Dylan Baker
parent 85c5197923
commit 745c11192f
2 changed files with 4 additions and 2 deletions

View file

@ -1093,7 +1093,7 @@
"description": "zink: fix sparse residency query and minLOD feature checks",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -881,8 +881,10 @@ 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;
case PIPE_CAP_CLAMP_SPARSE_TEXTURE_LOD:
return screen->info.feats.features.sparseResidency2Samples ? 1 : 0;
return screen->info.feats.features.shaderResourceMinLod &&
screen->info.feats.features.shaderResourceResidency ? 1 : 0;
case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS:
return screen->info.props.limits.viewportSubPixelBits;