lavapipe: pull layer count from render state during resolve
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 1 Oct 2021 23:06:43 +0000 (19:06 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 19 Oct 2021 01:18:24 +0000 (01:18 +0000)
vk_framebuffer may be null

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13349>

src/gallium/frontends/lavapipe/lvp_execute.c

index 9fd269e..5f2dde2 100644 (file)
@@ -1681,7 +1681,7 @@ static void render_pass_resolve(struct rendering_state *state)
       info.src.box.y = state->render_area.offset.y;
       info.src.box.width = state->render_area.extent.width;
       info.src.box.height = state->render_area.extent.height;
-      info.src.box.depth = state->vk_framebuffer->layers;
+      info.src.box.depth = state->framebuffer.layers;
 
       info.dst.box = info.src.box;