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>
{
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