Mesa (master): radeonsi: add the vertex shader position output if it' s missing
Marek Olšák
mareko at kemper.freedesktop.org
Fri Oct 25 10:03:18 UTC 2013
Module: Mesa
Branch: master
Commit: 48784f3591a4608509ccad8c73618999765711b3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=48784f3591a4608509ccad8c73618999765711b3
Author: Marek Olšák <marek.olsak at amd.com>
Date: Wed Oct 23 16:10:38 2013 +0200
radeonsi: add the vertex shader position output if it's missing
This fixes a lockup in piglit/spec/glsl-1.40/execution/tf-no-position.
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/gallium/drivers/radeonsi/radeonsi_shader.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c
index 42db8ca..9f81a7b 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_shader.c
+++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c
@@ -1076,6 +1076,19 @@ handle_semantic:
if (si_shader_ctx->type == TGSI_PROCESSOR_VERTEX) {
unsigned pos_idx = 0;
+ /* We need to add the position output manually if it's missing. */
+ if (!pos_args[0][0]) {
+ pos_args[0][0] = lp_build_const_int32(base->gallivm, 0xf); /* writemask */
+ pos_args[0][1] = uint->zero; /* EXEC mask */
+ pos_args[0][2] = uint->zero; /* last export? */
+ pos_args[0][3] = lp_build_const_int32(base->gallivm, V_008DFC_SQ_EXP_POS);
+ pos_args[0][4] = uint->zero; /* COMPR flag */
+ pos_args[0][5] = base->zero; /* X */
+ pos_args[0][6] = base->zero; /* Y */
+ pos_args[0][7] = base->zero; /* Z */
+ pos_args[0][8] = base->one; /* W */
+ }
+
for (i = 0; i < 4; i++)
if (pos_args[i][0])
shader->nr_pos_exports++;
More information about the mesa-commit
mailing list