This patch is Reviewed-by: Chris Forbes <chr...@ijw.co.nz> This does impact on the dual-simd8 texture support, but that should be fixable similarly.
-- Chris On Thu, Nov 14, 2013 at 12:51 PM, Anuj Phogat <anuj.pho...@gmail.com> wrote: > On Tue, Nov 12, 2013 at 5:50 PM, Kenneth Graunke <kenn...@whitecape.org> > wrote: >> Only Gen4 color write setup uses the force_sechalf flag, and it only >> sets it on a single instruction. It also already has to get a pointer >> to the instruction and manually set the saturate flag, so we may as well >> just set force_sechalf the same way and avoid the complexity of a stack. >> >> Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> >> --- >> src/mesa/drivers/dri/i965/brw_fs.cpp | 14 -------------- >> src/mesa/drivers/dri/i965/brw_fs.h | 3 --- >> src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 6 +----- >> 3 files changed, 1 insertion(+), 22 deletions(-) >> >> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp >> b/src/mesa/drivers/dri/i965/brw_fs.cpp >> index ee7b07d..b0090b8 100644 >> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp >> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp >> @@ -691,19 +691,6 @@ fs_visitor::pop_force_uncompressed() >> assert(force_uncompressed_stack >= 0); >> } >> >> -void >> -fs_visitor::push_force_sechalf() >> -{ >> - force_sechalf_stack++; >> -} >> - >> -void >> -fs_visitor::pop_force_sechalf() >> -{ >> - force_sechalf_stack--; >> - assert(force_sechalf_stack >= 0); >> -} >> - >> /** >> * Returns true if the instruction has a flag that means it won't >> * update an entire destination register. >> @@ -3298,7 +3285,6 @@ fs_visitor::run() >> } >> } >> assert(force_uncompressed_stack == 0); >> - assert(force_sechalf_stack == 0); >> >> /* This must come after all optimization and register allocation, since >> * it inserts dead code that happens to have side effects, and it does >> diff --git a/src/mesa/drivers/dri/i965/brw_fs.h >> b/src/mesa/drivers/dri/i965/brw_fs.h >> index dcd5b19..c6257a9 100644 >> --- a/src/mesa/drivers/dri/i965/brw_fs.h >> +++ b/src/mesa/drivers/dri/i965/brw_fs.h >> @@ -331,8 +331,6 @@ public: >> >> void push_force_uncompressed(); >> void pop_force_uncompressed(); >> - void push_force_sechalf(); >> - void pop_force_sechalf(); >> >> void emit_dummy_fs(); >> fs_reg *emit_fragcoord_interpolation(ir_variable *ir); >> @@ -489,7 +487,6 @@ public: >> const unsigned dispatch_width; /**< 8 or 16 */ >> >> int force_uncompressed_stack; >> - int force_sechalf_stack; >> }; >> >> /** >> diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp >> b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp >> index 4f1036a..9eb9a9d 100644 >> --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp >> +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp >> @@ -2393,8 +2393,6 @@ fs_visitor::emit(fs_inst *inst) >> { >> if (force_uncompressed_stack > 0) >> inst->force_uncompressed = true; >> - else if (force_sechalf_stack > 0) >> - inst->force_sechalf = true; >> >> inst->annotation = this->current_annotation; >> inst->ir = this->base_ir; >> @@ -2599,12 +2597,11 @@ fs_visitor::emit_color_write(int target, int index, >> int first_color_mrf) >> inst->saturate = c->key.clamp_fragment_color; >> pop_force_uncompressed(); >> >> - push_force_sechalf(); >> color.sechalf = true; >> inst = emit(MOV(fs_reg(MRF, first_color_mrf + index + 4, >> color.type), >> color)); >> + inst->force_sechalf = true; >> inst->saturate = c->key.clamp_fragment_color; >> - pop_force_sechalf(); >> color.sechalf = false; >> } >> } >> @@ -2923,7 +2920,6 @@ fs_visitor::fs_visitor(struct brw_context *brw, >> this->nr_params_remap = 0; >> >> this->force_uncompressed_stack = 0; >> - this->force_sechalf_stack = 0; >> >> this->spilled_any_registers = false; >> >> -- >> 1.8.3.2 >> >> _______________________________________________ >> mesa-dev mailing list >> mesa-dev@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/mesa-dev > > Patches 1-8 are Acked-by: Anuj Phogat <anuj.pho...@gmail.com> > I haven't looked at rest of the patches. > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev