iris: Fix TES gl_PatchVerticesIn handling.
[mesa.git] / src / gallium / drivers / iris / iris_program.c
index 279dbc3a9436b348ee3ee32a360eadf8dbd67e55..6dc3289f6cdfbcf31a32f7e5ef67a54244a580c7 100644 (file)
@@ -912,6 +912,13 @@ iris_update_compiled_tes(struct iris_context *ice)
                           IRIS_DIRTY_BINDINGS_TES |
                           IRIS_DIRTY_CONSTANTS_TES;
    }
+
+   /* TODO: Could compare and avoid flagging this. */
+   const struct shader_info *tes_info = &ish->nir->info;
+   if (tes_info->system_values_read & (1ull << SYSTEM_VALUE_VERTICES_IN)) {
+      ice->state.dirty |= IRIS_DIRTY_CONSTANTS_TES;
+      ice->state.shaders[MESA_SHADER_TESS_EVAL].cbuf0_needs_upload = true;
+   }
 }
 
 /**