Mesa (master): freedreno/a4xx: fake LINEAR_PIXEL varying support for u_blitter
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jul 1 14:25:27 UTC 2020
Module: Mesa
Branch: master
Commit: 75fef41f16c7b028c3c7809eb7f9d8e3ea4e259c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=75fef41f16c7b028c3c7809eb7f9d8e3ea4e259c
Author: Jonathan Marek <jonathan at marek.ca>
Date: Sat Jun 27 22:01:16 2020 -0400
freedreno/a4xx: fake LINEAR_PIXEL varying support for u_blitter
Signed-off-by: Jonathan Marek <jonathan at marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5582>
---
src/gallium/drivers/freedreno/a4xx/fd4_program.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_program.c b/src/gallium/drivers/freedreno/a4xx/fd4_program.c
index 1a9c43ab9f5..4e98be45999 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_program.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_program.c
@@ -164,7 +164,7 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit,
{
struct stage s[MAX_STAGES];
uint32_t pos_regid, posz_regid, psize_regid, color_regid[8];
- uint32_t face_regid, coord_regid, zwcoord_regid, vcoord_regid;
+ uint32_t face_regid, coord_regid, zwcoord_regid, vcoord_regid, lcoord_regid;
enum a3xx_threadsize fssz;
int constmode;
int i, j;
@@ -210,6 +210,16 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit,
coord_regid = ir3_find_sysval_regid(s[FS].v, SYSTEM_VALUE_FRAG_COORD);
zwcoord_regid = (coord_regid == regid(63,0)) ? regid(63,0) : (coord_regid + 2);
vcoord_regid = ir3_find_sysval_regid(s[FS].v, SYSTEM_VALUE_BARYCENTRIC_PERSP_PIXEL);
+ lcoord_regid = ir3_find_sysval_regid(s[FS].v, SYSTEM_VALUE_BARYCENTRIC_LINEAR_PIXEL);
+
+ /* XXX since we don't know how to support noperspective varyings on a4xx,
+ * use this little hack to support u_blitter, which should be the only
+ * case with noperspective varyings on a4xx:
+ */
+ if (VALIDREG(lcoord_regid)) {
+ assert(!VALIDREG(vcoord_regid));
+ vcoord_regid = lcoord_regid;
+ }
/* 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