diff options
author | Eric Anholt <[email protected]> | 2019-02-23 16:17:02 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-03-05 10:59:40 -0800 |
commit | a4f612b4cf84cb5f40ab7eda6075dff89c2b6404 (patch) | |
tree | 1472444546fc0e637258ad4af86631abd659e314 /src/compiler | |
parent | 43f40dc7cb234e007fe612b67cc765288ddf0533 (diff) |
nir: Improve printing of load_input/store_output variable names.
We were printing only when the channel was exactly the start channel, so
scalarized loads/stores would be missing the name on the rest.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir_print.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index 80bc25fde9a..6b270394f9d 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -850,8 +850,10 @@ print_intrinsic_instr(nir_intrinsic_instr *instr, print_state *state) nir_foreach_variable(var, var_list) { if ((var->data.driver_location == nir_intrinsic_base(instr)) && (instr->intrinsic == nir_intrinsic_load_uniform || - var->data.location_frac == nir_intrinsic_component(instr)) && - var->name) { + (nir_intrinsic_component(instr) >= var->data.location_frac && + nir_intrinsic_component(instr) < + (var->data.location_frac + glsl_get_components(var->type)))) && + var->name) { fprintf(fp, "\t/* %s */", var->name); break; } |