mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-24 01:40:22 +01:00
radeonsi: Always leave poly_offset in a valid state
This commit makes si_update_poly_offset set poly_offset to NULL if
uses_poly_offset is false. This way poly_offset either points into the
currently queued rasterizer, or it is NULL.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99451
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
(cherry picked from commit d7d32b3bfe)
This commit is contained in:
parent
ced6fd3508
commit
d446f45567
1 changed files with 3 additions and 1 deletions
|
|
@ -698,8 +698,10 @@ static void si_update_poly_offset_state(struct si_context *sctx)
|
|||
{
|
||||
struct si_state_rasterizer *rs = sctx->queued.named.rasterizer;
|
||||
|
||||
if (!rs || !rs->uses_poly_offset || !sctx->framebuffer.state.zsbuf)
|
||||
if (!rs || !rs->uses_poly_offset || !sctx->framebuffer.state.zsbuf) {
|
||||
si_pm4_bind_state(sctx, poly_offset, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Use the user format, not db_render_format, so that the polygon
|
||||
* offset behaves as expected by applications.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue