r600/shader: Initialize max_driver_temp_used correctly for the first time
authorGert Wollny <gw.fossdev@gmail.com>
Sun, 14 Jan 2018 17:13:31 +0000 (18:13 +0100)
committerDave Airlie <airlied@redhat.com>
Sun, 14 Jan 2018 23:14:22 +0000 (09:14 +1000)
commit5d6470d26b267d522dd343740878bde46f21c446
tree6377eed9c637ab6a1e37d108326efed7da6ea674
parentf10bd0a0e1f7cba65a4b462016d3869351b20106
r600/shader: Initialize max_driver_temp_used correctly for the first time

Without this initialization the temp registers used in tgsi_declaration
may used random indices, and this may result in failing translation from TGSI
with an error message "GPR limit exceeded", because the random index is greater
then the allowed limit implying that the shader uses more temporary registers then
available.

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_shader.c