summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-05-03 12:43:12 -0400
committerRob Clark <[email protected]>2016-05-04 11:25:55 -0400
commit1f2bc64f31872f04c27f9aa7a93e63a0091aaabf (patch)
tree738ca7c8ae664b4c425d35f16d6c5c0c8c544733 /src
parenta6ad30202cacc933290f478d8f518a7b066268b6 (diff)
freedreno/a4xx: deal with VS which do not write position
Fixes $piglit/bin/glsl-1.40-tf-no-position a3xx may need similar? Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_program.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_program.c b/src/gallium/drivers/freedreno/a4xx/fd4_program.c
index 4396383eef9..9dc4ebbf086 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_program.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_program.c
@@ -229,6 +229,13 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit,
constmode = 1;
pos_regid = ir3_find_output_regid(s[VS].v, VARYING_SLOT_POS);
+ if (pos_regid == regid(63, 0)) {
+ /* hw dislikes when there is no position output, which can
+ * happen for transform-feedback vertex shaders. Just tell
+ * the hw to use r0.x, with whatever random value is there:
+ */
+ pos_regid = regid(0, 0);
+ }
posz_regid = ir3_find_output_regid(s[FS].v, FRAG_RESULT_DEPTH);
psize_regid = ir3_find_output_regid(s[VS].v, VARYING_SLOT_PSIZ);
if (s[FS].v->color0_mrt) {