lavapipe: handle cube-array image-views

It seems this was missed in the past.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10913>
This commit is contained in:
Erik Faye-Lund 2021-05-28 13:07:02 +02:00 committed by Marge Bot
parent 60f513279c
commit a5f41925a6
1 changed files with 2 additions and 0 deletions

View File

@ -855,6 +855,8 @@ static void fill_sampler_view_stage(struct rendering_state *state,
templ.target = PIPE_TEXTURE_2D;
if (iv->view_type == VK_IMAGE_VIEW_TYPE_CUBE)
templ.target = PIPE_TEXTURE_CUBE;
if (iv->view_type == VK_IMAGE_VIEW_TYPE_CUBE_ARRAY)
templ.target = PIPE_TEXTURE_CUBE_ARRAY;
templ.u.tex.first_layer = iv->subresourceRange.baseArrayLayer;
templ.u.tex.last_layer = iv->subresourceRange.baseArrayLayer + lvp_get_layerCount(iv->image, &iv->subresourceRange) - 1;
templ.u.tex.first_level = iv->subresourceRange.baseMipLevel;