radv: scan the geometry shader output usage mask

For reducing the number of parameters that are exported by
the GS copy shader.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
Samuel Pitoiset 2018-05-14 16:04:35 +02:00
parent ea43d935ab
commit 560bd9eb67
2 changed files with 9 additions and 0 deletions

View file

@ -157,6 +157,9 @@ struct radv_shader_info {
bool needs_draw_id;
bool needs_instance_id;
} vs;
struct {
uint8_t output_usage_mask[VARYING_SLOT_VAR31 + 1];
} gs;
struct {
uint8_t output_usage_mask[VARYING_SLOT_VAR31 + 1];
} tes;

View file

@ -134,6 +134,12 @@ gather_intrinsic_store_var_info(const nir_shader *nir,
instr->const_index[0] << comp;
}
break;
case MESA_SHADER_GEOMETRY:
for (unsigned i = 0; i < attrib_count; i++) {
info->gs.output_usage_mask[idx + i + const_offset] |=
instr->const_index[0] << comp;
}
break;
case MESA_SHADER_TESS_EVAL:
for (unsigned i = 0; i < attrib_count; i++) {
info->tes.output_usage_mask[idx + i + const_offset] |=