st/glsl_to_nir/radeonsi: enable tessellation shaders
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 6 Dec 2017 02:32:17 +0000 (13:32 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 5 Jan 2018 00:58:55 +0000 (11:58 +1100)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_shader_nir.c
src/mesa/state_tracker/st_glsl_to_nir.cpp

index d331dfeaaa749e56b6792afcd6874c950b1f2e66..d5b8f835b91ea4035ef707b3b54be44c08963b1d 100644 (file)
@@ -157,6 +157,8 @@ void si_nir_scan_shader(const struct nir_shader *nir,
 
        assert(nir->info.stage == MESA_SHADER_VERTEX ||
               nir->info.stage == MESA_SHADER_GEOMETRY ||
+              nir->info.stage == MESA_SHADER_TESS_CTRL ||
+              nir->info.stage == MESA_SHADER_TESS_EVAL ||
               nir->info.stage == MESA_SHADER_FRAGMENT);
 
        info->processor = pipe_shader_type_from_mesa(nir->info.stage);
index 276450a64acf9a1d4acb61d95e2f8c92d2a09af2..5683dfcccceddf1d2299da7369d7fd8e777ed6c8 100644 (file)
@@ -675,7 +675,9 @@ st_finalize_nir(struct st_context *st, struct gl_program *prog,
                                   &nir->num_outputs,
                                   nir->info.stage);
       st_nir_fixup_varying_slots(st, &nir->outputs);
-   } else if (nir->info.stage == MESA_SHADER_GEOMETRY) {
+   } else if (nir->info.stage == MESA_SHADER_GEOMETRY ||
+              nir->info.stage == MESA_SHADER_TESS_CTRL ||
+              nir->info.stage == MESA_SHADER_TESS_EVAL) {
       sort_varyings(&nir->inputs);
       st_nir_assign_var_locations(&nir->inputs,
                                   &nir->num_inputs,