On Wednesday, March 16, 2016 5:36:25 PM PDT Pohjolainen, Topi wrote: > On Wed, Mar 16, 2016 at 12:13:02AM -0700, Kenneth Graunke wrote: [snip] > > @@ -265,22 +270,21 @@ setup_coord_coeff(GLuint prog, GLuint multiplier, GLuint offset, > > * destination rectangle is adjusted for possible msaa and Y-tiling. > > */ > > static void > > -setup_coord_transform(GLuint prog, const struct blit_dims *dims) > > +setup_coord_transform(struct gl_shader_program *sh_prog, > > + const struct blit_dims *dims) > > { > > - setup_coord_coeff(prog, > > - _mesa_GetUniformLocation(prog, "src_x_scale"), > > - _mesa_GetUniformLocation(prog, "src_x_off"), > > + setup_coord_coeff(get_uniform_loc(sh_prog, "src_x_scale"), > > + get_uniform_loc(sh_prog, "src_x_off"), > > dims->src_x0, dims->src_x1, dims->dst_x0, dims- >dst_x1, > > dims->mirror_x); > > > > - setup_coord_coeff(prog, > > - _mesa_GetUniformLocation(prog, "src_y_scale"), > > - _mesa_GetUniformLocation(prog, "src_y_off"), > > + setup_coord_coeff(get_uniform_loc(sh_prog, "src_y_scale"), > > + get_uniform_loc(sh_prog, "src_y_off"), > > dims->src_y0, dims->src_y1, dims->dst_y0, dims- >dst_y1, > > dims->mirror_y); > > } > > > > -static GLuint > > +static struct gl_shader_program * > > setup_program(struct brw_context *brw, bool msaa_tex) > > { > > struct gl_context *ctx = &brw->ctx; > > @@ -291,21 +295,22 @@ setup_program(struct brw_context *brw, bool msaa_tex) > > _mesa_meta_setup_vertex_objects(&brw->ctx, &blit->VAO, &blit->buf_obj, true, > > 2, 2, 0); > > > > - GLuint *prog_id = &brw->meta_stencil_blit_programs[msaa_tex]; > > + struct gl_shader_program **sh_prog_p = > > I think this could be 'shader_prog' just as you have it in the rest of > patch. Either way: > > Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com>
I put the extra "_p" (thought about "_ptr") because of the extra level of indirection - it's a pointer to a shader_prog pointer. I can't say I find this bit of code pretty, though :) --Ken
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev