Mesa (master): i965/sf: Move brw_set_predicate_control_flag_value to brw_sf_emit.c.

Kenneth Graunke kwg at kemper.freedesktop.org
Tue May 27 21:22:17 UTC 2014


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sun May 25 01:08:52 2014 -0700

i965/sf: Move brw_set_predicate_control_flag_value to brw_sf_emit.c.

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 at whitecape.org>
Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 src/mesa/drivers/dri/i965/brw_eu.c      |   18 ------------------
 src/mesa/drivers/dri/i965/brw_eu.h      |    1 -
 src/mesa/drivers/dri/i965/brw_sf_emit.c |   14 ++++++++++++++
 3 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_eu.c b/src/mesa/drivers/dri/i965/brw_eu.c
index e854a79..6018339 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.c
+++ b/src/mesa/drivers/dri/i965/brw_eu.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h
index 7be0cce..43cd172 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_eu.h
@@ -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 );
diff --git a/src/mesa/drivers/dri/i965/brw_sf_emit.c b/src/mesa/drivers/dri/i965/brw_sf_emit.c
index 475d489..c5308a5 100644
--- a/src/mesa/drivers/dri/i965/brw_sf_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_sf_emit.c
@@ -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)
 {




More information about the mesa-commit mailing list