summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-05-02 14:48:41 -0700
committerRob Clark <[email protected]>2019-05-02 15:06:01 -0700
commitb73dd91f60871a12a8e8e887a6ccb98d15ea97a0 (patch)
tree409417f75a4cefdd7cdeae8004134f73296e0479 /src
parent96924aa92ecf16cd2145b1a881df37d9162c6ba7 (diff)
nir: fix nir tex print harder
Fixes: 691d5a825a6 nir: rework tex instruction printing Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/nir/nir_print.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index 46995766974..4056bd77455 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -914,14 +914,13 @@ print_tex_instr(nir_tex_instr *instr, print_state *state)
bool has_texture_deref = false, has_sampler_deref = false;
for (unsigned i = 0; i < instr->num_srcs; i++) {
- print_src(&instr->src[i].src, state);
-
- if (i == 0) {
- fprintf(fp, " ");
- } else {
+ if (i > 0) {
fprintf(fp, ", ");
}
+ print_src(&instr->src[i].src, state);
+ fprintf(fp, " ");
+
switch(instr->src[i].src_type) {
case nir_tex_src_coord:
fprintf(fp, "(coord)");
@@ -987,7 +986,7 @@ print_tex_instr(nir_tex_instr *instr, print_state *state)
}
if (instr->op == nir_texop_tg4) {
- fprintf(fp, ", %u (gather_component), ", instr->component);
+ fprintf(fp, ", %u (gather_component)", instr->component);
}
if (nir_tex_instr_has_explicit_tg4_offsets(instr)) {