Mesa (master): freedreno/a5xx: set fragcoordxy properly
Rob Clark
robclark at kemper.freedesktop.org
Sun Jan 22 19:14:37 UTC 2017
Module: Mesa
Branch: master
Commit: 8d6af93e76bb9e592293b632b22b2b756cc0cae8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8d6af93e76bb9e592293b632b22b2b756cc0cae8
Author: Rob Clark <robdclark at gmail.com>
Date: Sun Jan 22 12:23:27 2017 -0500
freedreno/a5xx: set fragcoordxy properly
What a3xx docs call IJPERSPCENTERREGID.. the xy coord passed into
bary.f. We were incorrectly setting both this and gl_FragCoord.xy to
the same register resulting in all sorts of hilarity.
Fixes stk, vdrift, 0ad, probably a bunch others.
Signed-off-by: Rob Clark <robdclark at gmail.com>
Cc: "17.0" <mesa-stable at lists.freedesktop.org>
---
src/gallium/drivers/freedreno/a5xx/fd5_program.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_program.c b/src/gallium/drivers/freedreno/a5xx/fd5_program.c
index d297131..1738b2f 100644
--- a/src/gallium/drivers/freedreno/a5xx/fd5_program.c
+++ b/src/gallium/drivers/freedreno/a5xx/fd5_program.c
@@ -365,7 +365,7 @@ fd5_program_emit(struct fd_ringbuffer *ring, struct fd5_emit *emit)
face_regid = s[FS].v->frag_face ? regid(0,0) : regid(63,0);
coord_regid = s[FS].v->frag_coord ? regid(0,0) : regid(63,0);
zwcoord_regid = s[FS].v->frag_coord ? regid(0,2) : regid(63,0);
- vcoord_regid = (s[FS].v->total_in > 0) ? regid(0,0) : regid(63,0);
+ vcoord_regid = (s[FS].v->total_in > 0) ? s[FS].v->pos_regid : regid(63,0);
/* we could probably divide this up into things that need to be
* emitted if frag-prog is dirty vs if vert-prog is dirty..
More information about the mesa-commit
mailing list