mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
zink: only clamp samplerview aspect for zs formats
this otherwise breaks planar images Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
This commit is contained in:
parent
4d88d8ba4c
commit
54d16dbe29
1 changed files with 1 additions and 1 deletions
|
|
@ -1140,7 +1140,7 @@ zink_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *pres,
|
|||
|
||||
ivci = create_ivci(screen, res, &templ, state->target);
|
||||
ivci.subresourceRange.levelCount = state->u.tex.last_level - state->u.tex.first_level + 1;
|
||||
ivci.subresourceRange.aspectMask = sampler_aspect_from_format(state->format);
|
||||
ivci.subresourceRange.aspectMask = util_format_is_depth_or_stencil(state->format) ? sampler_aspect_from_format(state->format) : res->aspect;
|
||||
bool red_depth_sampler_view = false;
|
||||
/* samplers for stencil aspects of packed formats need to always use stencil swizzle */
|
||||
if (ivci.subresourceRange.aspectMask & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue