nir/print: expand printing of io semantics.gs_streams

gs_streams can be set for at least 2 other intrinsics.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14222>
This commit is contained in:
Marcin Ślusarz 2021-10-18 15:40:13 +02:00 committed by Marge Bot
parent be25db9f0f
commit d8fa625bb3
1 changed files with 11 additions and 10 deletions

View File

@ -983,17 +983,18 @@ print_intrinsic_instr(nir_intrinsic_instr *instr, print_state *state)
if (io.high_16bits) if (io.high_16bits)
fprintf(fp, " high_16bits"); fprintf(fp, " high_16bits");
if (state->shader) { if (state->shader &&
if (state->shader->info.stage == MESA_SHADER_GEOMETRY && state->shader->info.stage == MESA_SHADER_GEOMETRY &&
instr->intrinsic == nir_intrinsic_store_output) { (instr->intrinsic == nir_intrinsic_store_output ||
unsigned gs_streams = io.gs_streams; instr->intrinsic == nir_intrinsic_store_per_primitive_output ||
fprintf(fp, " gs_streams("); instr->intrinsic == nir_intrinsic_store_per_vertex_output)) {
for (unsigned i = 0; i < 4; i++) { unsigned gs_streams = io.gs_streams;
fprintf(fp, "%s%c=%u", i ? " " : "", "xyzw"[i], fprintf(fp, " gs_streams(");
(gs_streams >> (i * 2)) & 0x3); for (unsigned i = 0; i < 4; i++) {
} fprintf(fp, "%s%c=%u", i ? " " : "", "xyzw"[i],
fprintf(fp, ")"); (gs_streams >> (i * 2)) & 0x3);
} }
fprintf(fp, ")");
} }
break; break;