On Wed, Jul 1, 2015 at 3:21 AM, Francisco Jerez <curroje...@riseup.net> wrote: > Jason Ekstrand <ja...@jlekstrand.net> writes: > >> Now that we can create builders with a bigger width than their parent as >> long as it's exec_all, we don't need to create the instruction manually. >> --- >> src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 11 +++++------ >> 1 file changed, 5 insertions(+), 6 deletions(-) >> >> diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp >> b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp >> index 79ebb2d..890ddc1 100644 >> --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp >> +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp >> @@ -1358,12 +1358,11 @@ fs_visitor::emit_interpolation_setup_gen6() >> */ >> fs_reg int_pixel_xy(GRF, alloc.allocate(dispatch_width / 8), >> BRW_REGISTER_TYPE_UW); >> - fs_inst *add = >> - new (mem_ctx) fs_inst(BRW_OPCODE_ADD, dispatch_width * 2, >> - int_pixel_xy, >> - fs_reg(stride(suboffset(g1_uw, 4), 1, 4, 0)), >> - fs_reg(brw_imm_v(0x11001010))); >> - abld.exec_all().emit(add); >> + >> + const fs_builder abld32 = abld.exec_all().group(dispatch_width * 2, >> 0); > > The abld32 name seems misleading because this can actually be a 16 or 32 > wide builder depending on dispatch_width. I suggest "dbld" (d for > double), or just expand the definition in its only user and get rid of > the temporary. With that fixed:
I thought about both of those at the time. If you just do it all inline, there's no good way to indent it. I can go with dbld. --Jason > Reviewed-by: Francisco Jerez <curroje...@riseup.net> > >> + abld32.ADD(int_pixel_xy, >> + fs_reg(stride(suboffset(g1_uw, 4), 1, 4, 0)), >> + fs_reg(brw_imm_v(0x11001010))); >> >> this->pixel_x = vgrf(glsl_type::float_type); >> this->pixel_y = vgrf(glsl_type::float_type); >> -- >> 2.4.3 >> >> _______________________________________________ >> 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