radeonsi: copy some nir gs info
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 8 Nov 2017 04:43:16 +0000 (15:43 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 15 Nov 2017 23:54:03 +0000 (10:54 +1100)
v2: copy input primitive

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_shader_nir.c

index 847d75ba1415ba2f6802b2ddc73e5e4d27ab392d..5d82715f7a7c8aea226165992729de1d2965f873 100644 (file)
@@ -139,6 +139,13 @@ void si_nir_scan_shader(const struct nir_shader *nir,
        info->num_inputs = nir->num_inputs;
        info->num_outputs = nir->num_outputs;
 
+       if (nir->info.stage == MESA_SHADER_GEOMETRY) {
+               info->properties[TGSI_PROPERTY_GS_INPUT_PRIM] = nir->info.gs.input_primitive;
+               info->properties[TGSI_PROPERTY_GS_OUTPUT_PRIM] = nir->info.gs.output_primitive;
+               info->properties[TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES] = nir->info.gs.vertices_out;
+               info->properties[TGSI_PROPERTY_GS_INVOCATIONS] = nir->info.gs.invocations;
+       }
+
        i = 0;
        nir_foreach_variable(variable, &nir->inputs) {
                unsigned semantic_name, semantic_index;