freedreno: Dirty the TCS state if patch_vertices change

If using a passthrough TCS shader, we can't rely on having a new TCS
stage bound, so we need to invalidate the TCS state when the # of
patch_vertices changes.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19259>
This commit is contained in:
Rob Clark
2022-10-22 10:55:25 -07:00
committed by Marge Bot
parent 027690996b
commit a7290370de
@@ -48,7 +48,17 @@ fd_set_patch_vertices(struct pipe_context *pctx, uint8_t patch_vertices) in_dt
{
struct fd_context *ctx = fd_context(pctx);
if (ctx->patch_vertices == patch_vertices)
return;
ctx->patch_vertices = patch_vertices;
/* If we have tessellation this dirties the TCS state. Check for TES
* stage as TCS could be NULL (passthrough)
*/
if (ctx->prog.ds || ctx->prog.hs) {
fd_context_dirty_shader(ctx, PIPE_SHADER_TESS_CTRL, FD_DIRTY_SHADER_PROG);
}
}
static void