mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 13:38:06 +02:00
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>
(cherry picked from commit 5d6470d26b)
This commit is contained in:
parent
bc1503b13f
commit
694ed0d61a
1 changed files with 1 additions and 0 deletions
|
|
@ -3127,6 +3127,7 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
|
|||
|
||||
ctx.nliterals = 0;
|
||||
ctx.literals = NULL;
|
||||
ctx.max_driver_temp_used = 0;
|
||||
|
||||
shader->fs_write_all = ctx.info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS] &&
|
||||
ctx.info.colors_written == 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue