i965: Remove constant or ignored-by-hw args from FF sync message setup.
authorEric Anholt <eric@anholt.net>
Fri, 14 May 2010 05:15:34 +0000 (22:15 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 18 May 2010 22:08:17 +0000 (15:08 -0700)
src/mesa/drivers/dri/i965/brw_clip_util.c
src/mesa/drivers/dri/i965/brw_eu.h
src/mesa/drivers/dri/i965/brw_eu_emit.c
src/mesa/drivers/dri/i965/brw_gs_emit.c

index 34a966a47a224d4f751a1eb754190f171dcf6115..a730664f9b3bcd623a51d5c5b21e19e817f433d4 100644 (file)
@@ -370,18 +370,13 @@ void brw_clip_ff_sync(struct brw_clip_compile *c)
         need_ff_sync = brw_IF(p, BRW_EXECUTE_1);
         {
             brw_OR(p, c->reg.ff_sync, c->reg.ff_sync, brw_imm_ud(0x1));
-            brw_ff_sync(p, 
-                    c->reg.R0,
-                    0,
-                    c->reg.R0,
-                    1, 
-                    1,         /* used */
-                    1,         /* msg length */
-                    1,         /* response length */
-                    0,         /* eot */
-                    1,         /* write compelete */
-                    0,         /* urb offset */
-                    BRW_URB_SWIZZLE_NONE);
+            brw_ff_sync(p,
+                       c->reg.R0,
+                       0,
+                       c->reg.R0,
+                       1, /* allocate */
+                       1, /* response length */
+                       0 /* eot */);
         }
         brw_ENDIF(p, need_ff_sync);
         brw_set_predicate_control(p, BRW_PREDICATE_NONE);
index 4f55158e8f38287a62672550aae44d27085a9e45..3a32ad26c12aa1f3b7181028796cdb5ff9d94544 100644 (file)
@@ -822,13 +822,8 @@ void brw_ff_sync(struct brw_compile *p,
                   GLuint msg_reg_nr,
                   struct brw_reg src0,
                   GLboolean allocate,
-                  GLboolean used,
-                  GLuint msg_length,
                   GLuint response_length,
-                  GLboolean eot,
-                  GLboolean writes_complete,
-                  GLuint offset,
-                  GLuint swizzle);
+                  GLboolean eot);
 
 void brw_fb_WRITE(struct brw_compile *p,
                   struct brw_reg dest,
index 785d382a009d8f7e772ba6106cf8a790e8bbe057..175899b026863c7d2c3913d2ae081d5671ed1441 100644 (file)
@@ -280,28 +280,23 @@ static void brw_set_math_message( struct brw_context *brw,
 }
 
 
-static void brw_set_ff_sync_message( struct brw_context *brw,
-                                struct brw_instruction *insn,
-                                GLboolean allocate,
-                                GLboolean used,
-                                GLuint msg_length,
-                                GLuint response_length,
-                                GLboolean end_of_thread,
-                                GLboolean complete,
-                                GLuint offset,
-                                GLuint swizzle_control )
+static void brw_set_ff_sync_message(struct brw_context *brw,
+                                   struct brw_instruction *insn,
+                                   GLboolean allocate,
+                                   GLuint response_length,
+                                   GLboolean end_of_thread)
 {
        brw_set_src1(insn, brw_imm_d(0));
 
-       insn->bits3.urb_gen5.opcode = 1;
-       insn->bits3.urb_gen5.offset = offset;
-       insn->bits3.urb_gen5.swizzle_control = swizzle_control;
+       insn->bits3.urb_gen5.opcode = 1; /* FF_SYNC */
+       insn->bits3.urb_gen5.offset = 0; /* Not used by FF_SYNC */
+       insn->bits3.urb_gen5.swizzle_control = 0; /* Not used by FF_SYNC */
        insn->bits3.urb_gen5.allocate = allocate;
-       insn->bits3.urb_gen5.used = used;
-       insn->bits3.urb_gen5.complete = complete;
+       insn->bits3.urb_gen5.used = 0; /* Not used by FF_SYNC */
+       insn->bits3.urb_gen5.complete = 0; /* Not used by FF_SYNC */
        insn->bits3.urb_gen5.header_present = 1;
-       insn->bits3.urb_gen5.response_length = response_length;
-       insn->bits3.urb_gen5.msg_length = msg_length;
+       insn->bits3.urb_gen5.response_length = response_length; /* may be 1 or 0 */
+       insn->bits3.urb_gen5.msg_length = 1;
        insn->bits3.urb_gen5.end_of_thread = end_of_thread;
        insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_URB;
        insn->bits2.send_gen5.end_of_thread = end_of_thread;
@@ -1451,18 +1446,11 @@ void brw_ff_sync(struct brw_compile *p,
                   GLuint msg_reg_nr,
                   struct brw_reg src0,
                   GLboolean allocate,
-                  GLboolean used,
-                  GLuint msg_length,
                   GLuint response_length,
-                  GLboolean eot,
-                  GLboolean writes_complete,
-                  GLuint offset,
-                  GLuint swizzle)
+                  GLboolean eot)
 {
    struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND);
 
-   assert(msg_length < 16);
-
    brw_set_dest(insn, dest);
    brw_set_src0(insn, src0);
    brw_set_src1(insn, brw_imm_d(0));
@@ -1470,13 +1458,8 @@ void brw_ff_sync(struct brw_compile *p,
    insn->header.destreg__conditionalmod = msg_reg_nr;
 
    brw_set_ff_sync_message(p->brw,
-                      insn,
-                      allocate,
-                      used,
-                      msg_length,
-                      response_length, 
-                      eot, 
-                      writes_complete, 
-                      offset,
-                      swizzle);
+                          insn,
+                          allocate,
+                          response_length,
+                          eot);
 }
index dd7b057d62025046d0ea9e161a83653992059233..99a6f6be113aa935e2fc822528d27ed9ac85dbc5 100644 (file)
@@ -104,18 +104,13 @@ static void brw_gs_ff_sync(struct brw_gs_compile *c, int num_prim)
 {
        struct brw_compile *p = &c->func;
        brw_MOV(p, get_element_ud(c->reg.R0, 1), brw_imm_ud(num_prim));
-       brw_ff_sync(p, 
-                               c->reg.R0,
-                               0,
-                               c->reg.R0,
-                               1,      
-                               1,              /* used */
-                               1,      /* msg length */
-                               1,              /* response length */
-                               0,              /* eot */
-                               1,              /* write compelete */
-                               0,              /* urb offset */
-                               BRW_URB_SWIZZLE_NONE);
+       brw_ff_sync(p,
+                   c->reg.R0,
+                   0,
+                   c->reg.R0,
+                   1, /* allocate */
+                   1, /* response length */
+                   0 /* eot */);
 }