i965/fs: Move some flags that affect code generation to fs_visitor.

runtime_check_aads_emit isn't actually used currently, but I believe
we should be using it on Gen4-5, so I haven't eliminated it.
See https://bugs.freedesktop.org/show_bug.cgi?id=78679 for details.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
This commit is contained in:
Kenneth Graunke 2014-05-14 00:08:58 -07:00
parent 8ef78828fa
commit 55f4e3a06b
5 changed files with 10 additions and 8 deletions

View file

@ -2863,7 +2863,7 @@ fs_visitor::setup_payload_gen6()
/* R58-59: interp W for 32-pixel. */
if (fp->Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) {
c->source_depth_to_render_target = true;
source_depth_to_render_target = true;
}
}

View file

@ -566,6 +566,9 @@ public:
uint8_t num_regs;
} payload;
bool source_depth_to_render_target;
bool runtime_check_aads_emit;
fs_reg pixel_x;
fs_reg pixel_y;
fs_reg wpos_w;

View file

@ -2793,7 +2793,7 @@ fs_visitor::emit_fb_writes()
if (src0_alpha_to_render_target)
nr += reg_width;
if (c->source_depth_to_render_target) {
if (source_depth_to_render_target) {
if (brw->gen == 6) {
/* For outputting oDepth on gen6, SIMD8 writes have to be
* used. This would require SIMD8 moves of each half to
@ -2975,6 +2975,8 @@ fs_visitor::fs_visitor(struct brw_context *brw,
memset(&this->payload, 0, sizeof(this->payload));
memset(this->outputs, 0, sizeof(this->outputs));
memset(this->output_components, 0, sizeof(this->output_components));
this->source_depth_to_render_target = false;
this->runtime_check_aads_emit = false;
this->first_non_payload_grf = 0;
this->max_grf = brw->gen >= 7 ? GEN7_MRF_HACK_START : BRW_MAX_GRF;

View file

@ -83,9 +83,6 @@ struct brw_wm_prog_key {
struct brw_wm_compile {
struct brw_wm_prog_key key;
struct brw_wm_prog_data prog_data;
GLuint source_depth_to_render_target:1;
GLuint runtime_check_aads_emit:1;
};
/**

View file

@ -148,12 +148,12 @@ void fs_visitor::setup_payload_gen4()
}
if (wm_iz_table[lookup].sd_to_rt || kill_stats_promoted_workaround)
c->source_depth_to_render_target = 1;
source_depth_to_render_target = true;
if (wm_iz_table[lookup].ds_present || c->key.line_aa != AA_NEVER) {
payload.aa_dest_stencil_reg = reg;
c->runtime_check_aads_emit = (!wm_iz_table[lookup].ds_present &&
c->key.line_aa == AA_SOMETIMES);
runtime_check_aads_emit =
!wm_iz_table[lookup].ds_present && c->key.line_aa == AA_SOMETIMES;
reg++;
}