From 5d6470d26b267d522dd343740878bde46f21c446 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Sun, 14 Jan 2018 18:13:31 +0100 Subject: 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 Cc: Signed-off-by: Dave Airlie --- src/gallium/drivers/r600/r600_shader.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gallium/drivers/r600/r600_shader.c') diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index f2bc34660f7..ab18a6e08ea 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -3336,6 +3336,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; -- cgit v1.2.3