svga: fix starting index for system values
authorCharmaine Lee <charmainel@vmware.com>
Wed, 4 Oct 2017 23:51:35 +0000 (16:51 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 10 Sep 2018 19:07:30 +0000 (13:07 -0600)
commitbe1993d6eddcb6314b71037ca40af62923aa0174
treee9a93a483fc2b777a8966c7eccb7d376858f1fc8
parent569f838987689b6e8fa94500243f01d4ab92b736
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 <brianp@vmware.com>
src/gallium/drivers/svga/svga_link.c
src/gallium/drivers/svga/svga_link.h
src/gallium/drivers/svga/svga_tgsi_vgpu10.c