Mesa (master): freedreno: misc minor cleanups

Rob Clark robclark at kemper.freedesktop.org
Wed Apr 22 18:01:56 UTC 2015


Module: Mesa
Branch: master
Commit: cb24d3b7ad2f6c03edd86d827db2b308670ae8a7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cb24d3b7ad2f6c03edd86d827db2b308670ae8a7

Author: Rob Clark <robclark at freedesktop.org>
Date:   Wed Apr 22 13:11:33 2015 -0400

freedreno: misc minor cleanups

Signed-off-by: Rob Clark <robclark at freedesktop.org>

---

 src/gallium/drivers/freedreno/a4xx/fd4_program.c |   11 +++++------
 src/gallium/drivers/freedreno/ir3/disasm-a3xx.c  |    3 ++-
 src/gallium/drivers/freedreno/ir3/instr-a3xx.h   |    5 +++--
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_program.c b/src/gallium/drivers/freedreno/a4xx/fd4_program.c
index 4a616dc..e8f5837 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_program.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_program.c
@@ -455,8 +455,8 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit)
 		memset(vinterp, 0, sizeof(vinterp));
 		memset(flatshade, 0, sizeof(flatshade));
 
-		/* TODO: looks like we need to do int varyings in the frag
-		 * shader on a4xx (no flatshad reg?):
+		/* looks like we need to do int varyings in the frag
+		 * shader on a4xx (no flatshad reg?  or a420.0 bug?):
 		 *
 		 *    (sy)(ss)nop
 		 *    (sy)ldlv.u32 r0.x,l[r0.x], 1
@@ -466,10 +466,9 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit)
 		 *    (rpt5)nop
 		 *    sam (f16)(xyzw)hr0.x, hr0.x, s#0, t#0
 		 *
-		 * for now, don't set FLAT on vinterp[], since that
-		 * at least works well enough for pure float impl (ie.
-		 * pre glsl130).. we'll have to do a bit more work to
-		 * handle this properly:
+		 * Possibly on later a4xx variants we'll be able to use
+		 * something like the code below instead of workaround
+		 * in the shader:
 		 */
 #if 0
 		/* figure out VARYING_INTERP / FLAT_SHAD register values: */
diff --git a/src/gallium/drivers/freedreno/ir3/disasm-a3xx.c b/src/gallium/drivers/freedreno/ir3/disasm-a3xx.c
index 22e0dc2..a5136c6 100644
--- a/src/gallium/drivers/freedreno/ir3/disasm-a3xx.c
+++ b/src/gallium/drivers/freedreno/ir3/disasm-a3xx.c
@@ -516,7 +516,8 @@ static void print_instr_cat6(instr_t *instr)
 			printf("%c[", ss);
 		print_reg_src((reg_t)(cat6->a.src1), true,
 				false, false, cat6->a.src1_im, false, false, false);
-		printf("%+d", cat6->a.off);
+		if (cat6->a.off)
+			printf("%+d", cat6->a.off);
 		if (ss)
 			printf("]");
 		printf(", ");
diff --git a/src/gallium/drivers/freedreno/ir3/instr-a3xx.h b/src/gallium/drivers/freedreno/ir3/instr-a3xx.h
index 98637c7..cffa62b 100644
--- a/src/gallium/drivers/freedreno/ir3/instr-a3xx.h
+++ b/src/gallium/drivers/freedreno/ir3/instr-a3xx.h
@@ -625,9 +625,10 @@ typedef union PACKED {
 		uint32_t pad1     : 31;
 
 		/* dword1: */
-		uint32_t pad2     : 17;
+		uint32_t dst      : 8;
+		uint32_t dummy2   : 9;
 		uint32_t type     : 3;
-		uint32_t pad3     : 2;
+		uint32_t dummy3   : 2;
 		uint32_t opc      : 5;
 		uint32_t jmp_tgt  : 1;
 		uint32_t sync     : 1;




More information about the mesa-commit mailing list