summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_link.c
diff options
context:
space:
mode:
authorCharmaine Lee <[email protected]>2017-10-04 16:51:35 -0700
committerBrian Paul <[email protected]>2018-09-10 13:07:30 -0600
commitbe1993d6eddcb6314b71037ca40af62923aa0174 (patch)
treee9a93a483fc2b777a8966c7eccb7d376858f1fc8 /src/gallium/drivers/svga/svga_link.c
parent569f838987689b6e8fa94500243f01d4ab92b736 (diff)
svga: fix starting index for system values
Currently, the starting index for system values is assigned to the next index after the highest index of the tgsi declared input registers. But the tgsi index might be different from the actual assigned index, hence this might cause overlap of indices. With this patch, the shader linker keeps track of the highest index of the translated input registers, and the next index will be used for the starting index for system values. Fixes SHIM errors running arb_copy_image-formats on SM4_1 device. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_link.c')
-rw-r--r--src/gallium/drivers/svga/svga_link.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_link.c b/src/gallium/drivers/svga/svga_link.c
index 9c1df0c7f3c..0bf40d153b7 100644
--- a/src/gallium/drivers/svga/svga_link.c
+++ b/src/gallium/drivers/svga/svga_link.c
@@ -96,11 +96,13 @@ svga_link_shaders(const struct tgsi_shader_info *outshader_info,
linkage->input_map[i] = j;
}
}
+ linkage->input_map_max = free_slot - 1;
/* Debug */
if (SVGA_DEBUG & DEBUG_TGSI) {
unsigned reg = 0;
- debug_printf("### linkage info:\n");
+ debug_printf("### linkage info: num_inputs=%d input_map_max=%d\n",
+ linkage->num_inputs, linkage->input_map_max);
for (i = 0; i < linkage->num_inputs; i++) {