aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2017-07-31 21:12:07 -0600
committerBrian Paul <[email protected]>2018-09-10 13:07:30 -0600
commitbcf7aaa9f7a848f4acae5fa68ac9a422deb6181a (patch)
tree4452e7162718cd9c5c516bc7e9fdf5848d5f49ba /src/gallium/drivers/svga
parent9de5bdb341ea6dc1c7b64a1d6ffc3b2a1a4386d1 (diff)
svga: clarify sys value -> input register mapping
We translate TGSI system value registers to VGPU10 input registers. Add a comment and set file = TGSI_FILE_INPUT. That's not stricly necessary since we map both TGSI_FILE_INPUT and TGSI_FILE_SYSTEM_VALUE to VGPU10_OPERAND_TYPE_INPUT, but this makes the code a bit more understandable. Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r--src/gallium/drivers/svga/svga_tgsi_vgpu10.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
index 756b67316a1..1b6e9cf0bae 100644
--- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
+++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
@@ -1074,7 +1074,9 @@ emit_src_register(struct svga_shader_emitter_v10 *emit,
}
}
else if (file == TGSI_FILE_SYSTEM_VALUE) {
+ /* Map the TGSI system value to a VGPU10 input register */
assert(index < ARRAY_SIZE(emit->system_value_indexes));
+ file = TGSI_FILE_INPUT;
index = emit->system_value_indexes[index];
}
}