mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
crocus: make sure we have at least 1x1 surface to create null surf
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:
parent
04071c5f9a
commit
4ac7bbb1d1
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue