zink: fix 3d shader image miplevel calc for depth
without adjusting for miplevel here, the shader image might erroneously be created as a 2d view and/or assert cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16508>
This commit is contained in:
parent
1526df283c
commit
fa3d51892a
|
@ -1414,7 +1414,7 @@ create_image_surface(struct zink_context *ctx, const struct pipe_image_view *vie
|
|||
unsigned depth = 1 + tmpl.u.tex.last_layer - tmpl.u.tex.first_layer;
|
||||
switch (target) {
|
||||
case PIPE_TEXTURE_3D:
|
||||
if (depth < res->base.b.depth0) {
|
||||
if (depth < u_minify(res->base.b.depth0, view->u.tex.level)) {
|
||||
assert(depth == 1);
|
||||
target = PIPE_TEXTURE_2D;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue