mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
zink: clamp 3D surface viewtype to 2D only in the create_surface hook
this is only applicable to things that go through the hook, not for internal surfaces Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10703>
This commit is contained in:
parent
0c2453bb59
commit
438f0b31e2
1 changed files with 3 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ create_ivci(struct zink_screen *screen,
|
|||
break;
|
||||
|
||||
case PIPE_TEXTURE_3D:
|
||||
ivci.viewType = VK_IMAGE_VIEW_TYPE_2D;
|
||||
ivci.viewType = VK_IMAGE_VIEW_TYPE_3D;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
@ -176,6 +176,8 @@ zink_create_surface(struct pipe_context *pctx,
|
|||
|
||||
VkImageViewCreateInfo ivci = create_ivci(zink_screen(pctx->screen),
|
||||
zink_resource(pres), templ);
|
||||
if (pres->target == PIPE_TEXTURE_3D)
|
||||
ivci.viewType = VK_IMAGE_VIEW_TYPE_2D;
|
||||
|
||||
return zink_get_surface(zink_context(pctx), pres, templ, &ivci);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue