On Friday, April 18, 2014 11:56:47 AM Matt Turner wrote: > --- > src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 135 +++++++++++++++------------ > 1 file changed, 73 insertions(+), 62 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp > index 2aa3acd..91bbe0a 100644 > --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp > +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp > @@ -1257,8 +1257,11 @@ fs_visitor::emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg coordinate, > int reg_width = dispatch_width / 8; > bool header_present = false; > > - fs_reg payload = fs_reg(this, glsl_type::float_type); > - fs_reg next = payload; > + fs_reg *sources = ralloc_array(mem_ctx, fs_reg, MAX_SAMPLER_MESSAGE_SIZE); > + for (int i = 0; i < MAX_SAMPLER_MESSAGE_SIZE; i++) { > + sources[i] = fs_reg(this, glsl_type::float_type); > + } > + int length = 0; > > if (ir->op == ir_tg4 || (ir->offset && ir->op != ir_txf) || sampler >= 16) { > /* For general texture offsets (no txf workaround), we need a header to > @@ -1272,12 +1275,13 @@ fs_visitor::emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg coordinate, > * need to offset the Sampler State Pointer in the header. > */ > header_present = true; > - next.reg_offset++; > + sources[length] = reg_undef; > + length++; > } > > if (ir->shadow_comparitor) { > - emit(MOV(next, shadow_c)); > - next.reg_offset++; > + emit(MOV(sources[length], shadow_c));
Again, it really seems like these MOVs shouldn't help anything. But, according to your data, they do...probably helping some optimization pass. I'm okay with leaving them for now, but it would be interesting (and probably worthwhile) to understand why later. Notably, you don't emit such MOVs in the cube map array fixup.
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev