mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 06:10:12 +01:00
anv: Clamp depth buffer dimensions to be at least 1.
When there are no framebuffer attachments, fb->width and fb->height will be 0. Subtracting 1 results in 4294967295 which is too large for the field, causing genxml assertions when trying to create the packet. In this case, we can just program it to 1. Caught by dEQP-VK.tessellation.tesscoord.triangles_equal_spacing. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
e50d4807a3
commit
dcca706b4e
1 changed files with 2 additions and 2 deletions
|
|
@ -2159,8 +2159,8 @@ cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer)
|
|||
db.SurfaceType = SURFTYPE_2D;
|
||||
}
|
||||
db.SurfaceFormat = D32_FLOAT;
|
||||
db.Width = fb->width - 1;
|
||||
db.Height = fb->height - 1;
|
||||
db.Width = MAX2(fb->width, 1) - 1;
|
||||
db.Height = MAX2(fb->height, 1) - 1;
|
||||
db.StencilWriteEnable = has_stencil;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue