i965/fs: Drop "do dual source blending" generator parameter.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 8 Jul 2014 18:57:19 +0000 (11:57 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 14 Aug 2014 04:19:07 +0000 (21:19 -0700)
When dual source blending, the visitor already stores a flag in
brw_wm_prog_data (dual_src_blend) for the state upload code to use.
The generator also receives this, so there's no need to pass an
additional flag.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_generator.cpp

index 5a485df55e6d30d4c8f7180ca76ac3efa830eeed..24358a806dfba2b2d11945e93c9a7df6860f6019 100644 (file)
@@ -31,7 +31,7 @@ brw_blorp_eu_emitter::brw_blorp_eu_emitter(struct brw_context *brw,
      generator(brw, mem_ctx,
                rzalloc(mem_ctx, struct brw_wm_prog_key),
                rzalloc(mem_ctx, struct brw_wm_prog_data),
-               NULL, NULL, false, false, debug_flag)
+               NULL, NULL, false, debug_flag)
 {
 }
 
index cc5ec16d4b0fb1dabd4974efc69684228a0ae596..8405502f4334520da4fb52851bd1eb4578327e72 100644 (file)
@@ -3245,7 +3245,7 @@ brw_wm_fs_emit(struct brw_context *brw,
    }
 
    const unsigned *assembly = NULL;
-   fs_generator g(brw, mem_ctx, key, prog_data, prog, fp, v.do_dual_src,
+   fs_generator g(brw, mem_ctx, key, prog_data, prog, fp,
                   v.runtime_check_aads_emit, INTEL_DEBUG & DEBUG_WM);
    assembly = g.generate_assembly(&v.instructions, simd16_instructions,
                                   final_assembly_size);
index e7a82c4efb71e58bf294e1567ab8696213037553..5cad50437aa039c87743d353d2e7cbf5251a7411 100644 (file)
@@ -573,7 +573,6 @@ public:
                 struct brw_wm_prog_data *prog_data,
                 struct gl_shader_program *prog,
                 struct gl_fragment_program *fp,
-                bool dual_source_output,
                 bool runtime_check_aads_emit,
                 bool debug_flag);
    ~fs_generator();
@@ -684,7 +683,6 @@ private:
    unsigned dispatch_width; /**< 8 or 16 */
 
    exec_list discard_halt_patches;
-   bool dual_source_output;
    bool runtime_check_aads_emit;
    const bool debug_flag;
    void *mem_ctx;
index 208b54f7fddc1a0370fdabeb68b2b67879efb867..9e260a7ffe7694e17c35ed513485a6ec3b81a34e 100644 (file)
@@ -42,12 +42,10 @@ fs_generator::fs_generator(struct brw_context *brw,
                            struct brw_wm_prog_data *prog_data,
                            struct gl_shader_program *prog,
                            struct gl_fragment_program *fp,
-                           bool dual_source_output,
                            bool runtime_check_aads_emit,
                            bool debug_flag)
 
    : brw(brw), key(key), prog_data(prog_data), prog(prog), fp(fp),
-     dual_source_output(dual_source_output),
      runtime_check_aads_emit(runtime_check_aads_emit), debug_flag(debug_flag),
      mem_ctx(mem_ctx)
 {
@@ -117,7 +115,7 @@ fs_generator::fire_fb_write(fs_inst *inst,
       brw_pop_insn_state(p);
    }
 
-   if (this->dual_source_output)
+   if (prog_data->dual_src_blend)
       msg_control = BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD8_DUAL_SOURCE_SUBSPAN01;
    else if (dispatch_width == 16)
       msg_control = BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD16_SINGLE_SOURCE;