mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 18:38:11 +02:00
zink: unset generated TCS if its parent TESS is unset
ensure this doesn't get pulled in during the next program update
Fixes: 334759d850 ("zink: implement passthrough tcs shader injection")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9057>
This commit is contained in:
parent
fc6b5be666
commit
942ba4e341
1 changed files with 7 additions and 1 deletions
|
|
@ -855,8 +855,14 @@ zink_bind_tes_state(struct pipe_context *pctx,
|
|||
void *cso)
|
||||
{
|
||||
struct zink_context *ctx = zink_context(pctx);
|
||||
if (!!ctx->gfx_stages[PIPE_SHADER_TESS_EVAL] != !!cso)
|
||||
if (!!ctx->gfx_stages[PIPE_SHADER_TESS_EVAL] != !!cso) {
|
||||
if (!cso) {
|
||||
/* if unsetting a TESS that uses a generated TCS, ensure the TCS is unset */
|
||||
if (ctx->gfx_stages[PIPE_SHADER_TESS_EVAL]->generated)
|
||||
ctx->gfx_stages[PIPE_SHADER_TESS_CTRL] = NULL;
|
||||
}
|
||||
ctx->dirty_shader_stages |= BITFIELD_BIT(PIPE_SHADER_VERTEX);
|
||||
}
|
||||
bind_stage(ctx, PIPE_SHADER_TESS_EVAL, cso);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue