[Mesa-dev] [PATCH 03/16] i965/blorp: Allow caller to provide sampler settings

Pohjolainen, Topi topi.pohjolainen at intel.com
Tue Apr 28 21:08:55 PDT 2015


On Tue, Apr 28, 2015 at 03:17:30PM -0700, Kenneth Graunke wrote:
> On Thursday, April 23, 2015 09:00:28 PM Topi Pohjolainen wrote:
> > Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> > ---
> >  src/mesa/drivers/dri/i965/brw_blorp.h    |  4 +++-
> >  src/mesa/drivers/dri/i965/gen6_blorp.cpp | 15 +++++++++------
> >  src/mesa/drivers/dri/i965/gen7_blorp.cpp |  3 ++-
> >  3 files changed, 14 insertions(+), 8 deletions(-)
> > 
> > diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h b/src/mesa/drivers/dri/i965/brw_blorp.h
> > index 59aecab..63dfe5b 100644
> > --- a/src/mesa/drivers/dri/i965/brw_blorp.h
> > +++ b/src/mesa/drivers/dri/i965/brw_blorp.h
> > @@ -415,7 +415,9 @@ gen6_blorp_emit_drawing_rectangle(struct brw_context *brw,
> >  
> >  uint32_t
> >  gen6_blorp_emit_sampler_state(struct brw_context *brw,
> > -                              const brw_blorp_params *params);
> > +                              unsigned tex_filter, unsigned max_lod,
> > +                              bool use_unorm_coords);
> 
> Let's not call this "use_unorm_coords".  UNORM is a data format -
> unsigned normalized fixed point numbers.
> 
> This means non-normalized texture coordinates, i.e. ones that range from
> [0, width]x[0, height] instead of [0.0, 1.0]x[0.0, 1.0].
> 
> "is_rectangle_sampler", "non_normalized_coords", or "use_rect_coords"
> all seem like reasonable names.  I'm open to other ideas too.

I agree, and I wasn't too happy with the name either. I'll switch it to
"non_normalized_coords", it is closest to the spec also. Thanks!


More information about the mesa-dev mailing list