OSDN Git Service

freedreno: misc minor cleanups
authorRob Clark <robclark@freedesktop.org>
Wed, 22 Apr 2015 17:11:33 +0000 (13:11 -0400)
committerRob Clark <robclark@freedesktop.org>
Wed, 22 Apr 2015 17:20:28 +0000 (13:20 -0400)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a4xx/fd4_program.c
src/gallium/drivers/freedreno/ir3/disasm-a3xx.c
src/gallium/drivers/freedreno/ir3/instr-a3xx.h

index 4a616dc..e8f5837 100644 (file)
@@ -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: */
index 22e0dc2..a5136c6 100644 (file)
@@ -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(", ");
index 98637c7..cffa62b 100644 (file)
@@ -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;