i965/fs: Move up prog_data->uses_omask assignment up to brw_codegen_wm_prog().
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 15 Jul 2015 15:49:55 +0000 (18:49 +0300)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 29 Jul 2015 11:12:46 +0000 (14:12 +0300)
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
src/mesa/drivers/dri/i965/brw_wm.c

index e91e3edffc99e156bcd70829ea9ef6d70e09e484..1313a3c0df2d50636333e0a4657f0cb5ae72b0ed 100644 (file)
@@ -1535,8 +1535,6 @@ fs_visitor::emit_single_fb_write(const fs_builder &bld,
       length++;
    }
 
-   prog_data->uses_omask =
-      prog->OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_SAMPLE_MASK);
    if (prog_data->uses_omask) {
       assert(this->sample_mask.file != BAD_FILE);
       /* Hand over gl_SampleMask. Only lower 16 bits are relevant.  Since
index 592a72927c3e5d55376282d01c3f3c6658c443c8..b590b177ece0a60cce123eb95b37374ba4a30c72 100644 (file)
@@ -181,7 +181,8 @@ brw_codegen_wm_prog(struct brw_context *brw,
     * so the shader definitely kills pixels.
     */
    prog_data.uses_kill = fp->program.UsesKill || key->alpha_test_func;
-
+   prog_data.uses_omask =
+      fp->program.Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_SAMPLE_MASK);
    prog_data.computed_depth_mode = computed_depth_mode(&fp->program);
 
    /* Use ALT floating point mode for ARB programs so that 0^0 == 1. */