diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 9e1bfecb04b..85a5463e020 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -3391,11 +3391,11 @@ brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c, const unsigned *assembly = NULL; if (brw->gen >= 8) { - gen8_fs_generator g(brw, c, prog, fp, v.dual_src_output.file != BAD_FILE); + gen8_fs_generator g(brw, c, prog, fp, v.do_dual_src); assembly = g.generate_assembly(&v.instructions, simd16_instructions, final_assembly_size); } else { - fs_generator g(brw, c, prog, fp, v.dual_src_output.file != BAD_FILE); + fs_generator g(brw, c, prog, fp, v.do_dual_src); assembly = g.generate_assembly(&v.instructions, simd16_instructions, final_assembly_size); } diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 408669358b2..3d21ee52cf1 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -529,6 +529,7 @@ public: fs_reg outputs[BRW_MAX_DRAW_BUFFERS]; unsigned output_components[BRW_MAX_DRAW_BUFFERS]; fs_reg dual_src_output; + bool do_dual_src; int first_non_payload_grf; /** Either BRW_MAX_GRF or GEN7_MRF_HACK_START */ int max_grf; diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index c89f4d6a05d..63a0ae53d7b 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -74,6 +74,7 @@ fs_visitor::visit(ir_variable *ir) assert(ir->data.location == FRAG_RESULT_DATA0); assert(ir->data.index == 1); this->dual_src_output = *reg; + this->do_dual_src = true; } else if (ir->data.location == FRAG_RESULT_COLOR) { /* Writing gl_FragColor outputs to all color regions. */ for (unsigned int i = 0; i < MAX2(c->key.nr_color_regions, 1); i++) { @@ -2730,7 +2731,6 @@ fs_visitor::emit_fb_writes() int base_mrf = 1; int nr = base_mrf; int reg_width = dispatch_width / 8; - bool do_dual_src = this->dual_src_output.file != BAD_FILE; bool src0_alpha_to_render_target = false; if (do_dual_src) { @@ -2988,6 +2988,7 @@ fs_visitor::fs_visitor(struct brw_context *brw, this->force_uncompressed_stack = 0; this->spilled_any_registers = false; + this->do_dual_src = false; if (dispatch_width == 8) this->param_size = rzalloc_array(mem_ctx, int, stage_prog_data->nr_params); |