summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_print.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-05-23 16:46:46 +1000
committerTimothy Arceri <[email protected]>2016-07-07 10:26:43 +1000
commit0eea6b3297930d36cd510fa6b0e35c91935928f2 (patch)
tree56e7a427bb8f9efa27a0ddbce202a441ea5defd7 /src/compiler/nir/nir_print.c
parent771f6db76fd051766bc0c7ad590cd4c9c8ecd8a4 (diff)
nir: add new intrinsic field for storing component offset
This offset is used for packing. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_print.c')
-rw-r--r--src/compiler/nir/nir_print.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index 36176ece5ef..bca8a3525ed 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -570,6 +570,7 @@ print_intrinsic_instr(nir_intrinsic_instr *instr, print_state *state)
[NIR_INTRINSIC_RANGE] = "range",
[NIR_INTRINSIC_DESC_SET] = "desc-set",
[NIR_INTRINSIC_BINDING] = "binding",
+ [NIR_INTRINSIC_COMPONENT] = "component",
};
for (unsigned idx = 1; idx < NIR_INTRINSIC_NUM_INDEX_FLAGS; idx++) {
if (!info->index_map[idx])
@@ -614,6 +615,8 @@ 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) {
fprintf(fp, "\t/* %s */", var->name);
break;