i965/sf: Move brw_set_predicate_control_flag_value to brw_sf_emit.c.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 25 May 2014 08:08:52 +0000 (01:08 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 27 May 2014 20:46:01 +0000 (13:46 -0700)
Only the Gen4-5 SF program compiler actually uses this function; move
it there.  Soon the fields will be moved out of brw_compile.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_eu.c
src/mesa/drivers/dri/i965/brw_eu.h
src/mesa/drivers/dri/i965/brw_sf_emit.c

index e854a79ad8a7d57f34ae652e0a1e0f2807027ffc..6018339dc406f811cd9e5502cae66428e018db6b 100644 (file)
@@ -88,24 +88,6 @@ brw_swap_cmod(uint32_t cmod)
    }
 }
 
-
-/* How does predicate control work when execution_size != 8?  Do I
- * need to test/set for 0xffff when execution_size is 16?
- */
-void brw_set_predicate_control_flag_value( struct brw_compile *p, unsigned value )
-{
-   p->current->header.predicate_control = BRW_PREDICATE_NONE;
-
-   if (value != 0xff) {
-      if (value != p->flag_value) {
-        brw_MOV(p, brw_flag_reg(0, 0), brw_imm_uw(value));
-        p->flag_value = value;
-      }
-
-      p->current->header.predicate_control = BRW_PREDICATE_NORMAL;
-   }
-}
-
 void brw_set_predicate_control( struct brw_compile *p, unsigned pc )
 {
    p->current->header.predicate_control = pc;
index 7be0ccecaae51d0b441657eb34a73fbc818b943e..43cd17281610b78c2f503144e2055bdbc377737a 100644 (file)
@@ -97,7 +97,6 @@ void brw_set_mask_control( struct brw_compile *p, unsigned value );
 void brw_set_saturate( struct brw_compile *p, bool enable );
 void brw_set_access_mode( struct brw_compile *p, unsigned access_mode );
 void brw_set_compression_control(struct brw_compile *p, enum brw_compression c);
-void brw_set_predicate_control_flag_value( struct brw_compile *p, unsigned value );
 void brw_set_predicate_control( struct brw_compile *p, unsigned pc );
 void brw_set_predicate_inverse(struct brw_compile *p, bool predicate_inverse);
 void brw_set_conditionalmod( struct brw_compile *p, unsigned conditional );
index 475d4898521c488549bba8861363afbce950b733..c5308a5af5fd87558a92e8165004058bd8aab7a4 100644 (file)
@@ -413,7 +413,21 @@ calculate_point_sprite_mask(struct brw_sf_compile *c, GLuint reg)
    return pc;
 }
 
+static void
+brw_set_predicate_control_flag_value(struct brw_compile *p,
+                                     unsigned value)
+{
+   p->current->header.predicate_control = BRW_PREDICATE_NONE;
+
+   if (value != 0xff) {
+      if (value != p->flag_value) {
+         brw_MOV(p, brw_flag_reg(0, 0), brw_imm_uw(value));
+         p->flag_value = value;
+      }
 
+      p->current->header.predicate_control = BRW_PREDICATE_NORMAL;
+   }
+}
 
 void brw_emit_tri_setup(struct brw_sf_compile *c, bool allocate)
 {