radeonsi: check sctx->tess_rings is valid before using it
Fixes: c89ca3b47f ("radeonsi: change si_emit_derived_tess_state into a state atom")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10015
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26190>
This commit is contained in:
committed by
Marge Bot
parent
b6e98677c3
commit
945288ffae
@@ -4396,8 +4396,16 @@ static void si_set_patch_vertices(struct pipe_context *ctx, uint8_t patch_vertic
|
||||
if (sctx->patch_vertices != patch_vertices) {
|
||||
sctx->patch_vertices = patch_vertices;
|
||||
si_update_tess_in_out_patch_vertices(sctx);
|
||||
if (sctx->shader.tcs.current)
|
||||
si_update_tess_io_layout_state(sctx);
|
||||
if (sctx->shader.tcs.current) {
|
||||
/* Update the io layout now if possible,
|
||||
* otherwise make sure it's done by si_update_shaders.
|
||||
*/
|
||||
if (sctx->tess_rings)
|
||||
si_update_tess_io_layout_state(sctx);
|
||||
else
|
||||
sctx->do_update_shaders = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user