st/mesa: propagate gl_PatchVerticesIn from TCS to TES before linking for NIR
authorMarek Olšák <marek.olsak@amd.com>
Wed, 13 Nov 2019 04:48:02 +0000 (23:48 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 26 Nov 2019 20:14:10 +0000 (15:14 -0500)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/state_tracker/st_glsl_to_nir.cpp

index f8f1ee3fce2a5c74e3f8f6670db6a0e7ee9bae5d..a157e8863973a1933c5c839326899e7292f32d5f 100644 (file)
@@ -690,6 +690,8 @@ st_link_nir(struct gl_context *ctx,
       }
    }
 
+   st_lower_patch_vertices_in(shader_program);
+
    /* For SPIR-V, we have to perform the NIR linking before applying
     * st_nir_preprocess.
     */
@@ -782,8 +784,6 @@ st_link_nir(struct gl_context *ctx,
       prev = i;
    }
 
-   st_lower_patch_vertices_in(shader_program);
-
    for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
       struct gl_linked_shader *shader = shader_program->_LinkedShaders[i];
       if (shader == NULL)