i965/fs: Make patch_discard_jumps_to_fb_writes return bool.
authorMatt Turner <mattst88@gmail.com>
Fri, 16 May 2014 20:06:45 +0000 (13:06 -0700)
committerMatt Turner <mattst88@gmail.com>
Sun, 25 May 2014 06:03:23 +0000 (23:03 -0700)
... to tell us whether it emitted any code. Will be used to determine
whether we need to skip an annotation for it.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_generator.cpp
src/mesa/drivers/dri/i965/gen8_fs_generator.cpp

index 8acad2fa7df5cbd81051c31ca152738ab0648af9..111e994e0d9a9014847e4b0a403c0e6b71d8def1 100644 (file)
@@ -696,7 +696,7 @@ private:
                                       struct brw_reg dst,
                                       struct brw_reg surf_index);
 
-   void patch_discard_jumps_to_fb_writes();
+   bool patch_discard_jumps_to_fb_writes();
 
    struct brw_context *brw;
    struct gl_context *ctx;
@@ -788,7 +788,7 @@ private:
                                       struct brw_reg surf_index);
    void generate_discard_jump(fs_inst *ir);
 
-   void patch_discard_jumps_to_fb_writes();
+   bool patch_discard_jumps_to_fb_writes();
 
    const struct brw_wm_prog_key *const key;
    struct brw_wm_prog_data *prog_data;
index 0fcf5271c217f385ebffcc123647b33f1d5a8923..132d5cd6501f0b1bd9d30c84bc23549e0ca8d180 100644 (file)
@@ -59,11 +59,11 @@ fs_generator::~fs_generator()
 {
 }
 
-void
+bool
 fs_generator::patch_discard_jumps_to_fb_writes()
 {
    if (brw->gen < 6 || this->discard_halt_patches.is_empty())
-      return;
+      return false;
 
    /* There is a somewhat strange undocumented requirement of using
     * HALT, according to the simulator.  If some channel has HALTed to
@@ -92,6 +92,7 @@ fs_generator::patch_discard_jumps_to_fb_writes()
    }
 
    this->discard_halt_patches.make_empty();
+   return true;
 }
 
 void
index c4f9d8558e17d42bef48be6eebbdebf05495deec..d01b4d8a3ca0ab404ab68d9f2e87970150f693be 100644 (file)
@@ -640,11 +640,11 @@ gen8_fs_generator::generate_discard_jump(fs_inst *ir)
    HALT();
 }
 
-void
+bool
 gen8_fs_generator::patch_discard_jumps_to_fb_writes()
 {
    if (discard_halt_patches.is_empty())
-      return;
+      return false;
 
    /* There is a somewhat strange undocumented requirement of using
     * HALT, according to the simulator.  If some channel has HALTed to
@@ -673,6 +673,7 @@ gen8_fs_generator::patch_discard_jumps_to_fb_writes()
    }
 
    this->discard_halt_patches.make_empty();
+   return true;
 }
 
 /**