crocus: make sure we have at least 1x1 surface to create null surf
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Otherwise we will have width of -1 later in null_fill_state_s.

Fixes: 2eb45daa9c ("gallium: de-pointerize pipe_surface")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38872>
This commit is contained in:
Tapani Pälli 2025-11-03 15:25:52 +02:00 committed by Marge Bot
parent 04071c5f9a
commit 4ac7bbb1d1

View file

@ -4975,8 +4975,8 @@ emit_null_fb_surface(struct crocus_batch *batch,
layer = 0;
if (cso->nr_cbufs == 0 && ice->state.fb_zsbuf) {
width = ((struct crocus_surface*)ice->state.fb_zsbuf)->surf.logical_level0_px.width;
height = ((struct crocus_surface*)ice->state.fb_zsbuf)->surf.logical_level0_px.height;
width = MAX2(((struct crocus_surface*)ice->state.fb_zsbuf)->surf.logical_level0_px.width, 1);
height = MAX2(((struct crocus_surface*)ice->state.fb_zsbuf)->surf.logical_level0_px.height, 1);
level = cso->zsbuf.level;
layer = cso->zsbuf.first_layer;
}