i965: Replace fs_visitor::kill_emitted with gl_fragment_program::UsesKill.
authorPaul Berry <stereotype441@gmail.com>
Thu, 19 Jul 2012 06:20:23 +0000 (23:20 -0700)
committerPaul Berry <stereotype441@gmail.com>
Fri, 20 Jul 2012 16:33:07 +0000 (09:33 -0700)
The kill_emitted variable was duplicating the functionality of
gl_fragment_program::UsesKill.  There's no need for both.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp

index 6e3c46a39ea610cf297d1bbeca300e0caa3e8498..031d5414ba14f92532fe720ac6cf6bb84de84fd1 100644 (file)
@@ -373,7 +373,6 @@ public:
    int first_non_payload_grf;
    int max_grf;
    int urb_setup[FRAG_ATTRIB_MAX];
-   bool kill_emitted;
 
    /** @{ debug annotation info */
    const char *current_annotation;
index b66e889fc037419784fa140f2b89d5e410f6a62c..1b648aaa0bd9f6a662e80152270b9b03be1c76a5 100644 (file)
@@ -1400,7 +1400,6 @@ fs_visitor::visit(ir_discard *ir)
    assert(ir->condition == NULL); /* FINISHME */
 
    emit(FS_OPCODE_DISCARD);
-   kill_emitted = true;
 }
 
 void
@@ -2034,7 +2033,7 @@ fs_visitor::emit_fb_writes()
     *      thread message and on all dual-source messages."
     */
    if (intel->gen >= 6 &&
-       !this->kill_emitted &&
+       !this->fp->UsesKill &&
        !do_dual_src &&
        c->key.nr_color_regions == 1) {
       header_present = false;
@@ -2230,7 +2229,6 @@ fs_visitor::fs_visitor(struct brw_wm_compile *c, struct gl_shader_program *prog,
    this->virtual_grf_use = NULL;
    this->live_intervals_valid = false;
 
-   this->kill_emitted = false;
    this->force_uncompressed_stack = 0;
    this->force_sechalf_stack = 0;
 }