From: Marek Olšák <[email protected]>
---
src/gallium/drivers/radeonsi/si_state_shaders.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c
b/src/gallium/drivers/radeonsi/si_state_shaders.c
index d5de749..ac53eff 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -2595,20 +2595,23 @@ static int si_update_scratch_buffer(struct si_context
*sctx,
if (shader->config.scratch_bytes_per_wave == 0)
return 0;
/* This shader is already configured to use the current
* scratch buffer. */
if (shader->scratch_bo == sctx->scratch_buffer)
return 0;
assert(sctx->scratch_buffer);
+ if (shader->previous_stage)
+ si_shader_apply_scratch_relocs(shader->previous_stage,
scratch_va);
+
si_shader_apply_scratch_relocs(shader, scratch_va);
/* Replace the shader bo with a new bo that has the relocs applied. */
r = si_shader_binary_upload(sctx->screen, shader);
if (r)
return r;
/* Update the shader state to use the new shader bo. */
si_shader_init_pm4_state(sctx->screen, shader);
--
2.7.4
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev