Mesa (master): radeonsi: fix scratch buffer setup for geometry shaders
Marek Olšák
mareko at kemper.freedesktop.org
Tue May 26 10:58:09 UTC 2015
Module: Mesa
Branch: master
Commit: fa7f606e89dc4447f07fec0b84d396a4ff25ee7e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fa7f606e89dc4447f07fec0b84d396a4ff25ee7e
Author: Marek Olšák <marek.olsak at amd.com>
Date: Mon May 18 14:56:34 2015 +0200
radeonsi: fix scratch buffer setup for geometry shaders
Cc: 10.6 <mesa-stable at lists.freedesktop.org>
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/gallium/drivers/radeonsi/si_state_shaders.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 25811ab..610af94 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -841,8 +841,15 @@ static void si_update_spi_tmpring_size(struct si_context *sctx)
si_pm4_bind_state(sctx, ps, sctx->ps_shader->current->pm4);
if (si_update_scratch_buffer(sctx, sctx->gs_shader))
si_pm4_bind_state(sctx, gs, sctx->gs_shader->current->pm4);
- if (si_update_scratch_buffer(sctx, sctx->vs_shader))
- si_pm4_bind_state(sctx, vs, sctx->vs_shader->current->pm4);
+
+ /* VS can be bound as ES or VS. */
+ if (sctx->gs_shader) {
+ if (si_update_scratch_buffer(sctx, sctx->vs_shader))
+ si_pm4_bind_state(sctx, es, sctx->vs_shader->current->pm4);
+ } else {
+ if (si_update_scratch_buffer(sctx, sctx->vs_shader))
+ si_pm4_bind_state(sctx, vs, sctx->vs_shader->current->pm4);
+ }
}
/* The LLVM shader backend should be reporting aligned scratch_sizes. */
More information about the mesa-commit
mailing list