[Mesa-dev] [PATCH] i965/gen6+: Use non-normalized coordinates for GL_TEXTURE_RECTANGLE.

Kenneth Graunke kenneth at whitecape.org
Sun Aug 21 09:38:18 PDT 2011


On 08/17/2011 05:55 PM, Eric Anholt wrote:
> Improves performance of a GL_TEXTURE_RECTANGLE microbenchmark by 1.84%
> +/- .15% (n=3)
> ---
>  src/mesa/drivers/dri/i965/brw_fs_visitor.cpp     |    3 ++-
>  src/mesa/drivers/dri/i965/brw_wm_fp.c            |    4 +++-
>  src/mesa/drivers/dri/i965/brw_wm_sampler_state.c |    7 +++++++
>  src/mesa/drivers/dri/i965/gen7_sampler_state.c   |    7 +++++++
>  4 files changed, 19 insertions(+), 2 deletions(-)

SAMPLER_STATE's "Non-normalized Coordinate Enable" bit also mentions
that TCX/Y/Z Address Control Mode must be TEXCOORDMODE_CLAMP or
TEXCOORDMODE_CLAMP_BORDER.

Apparently GL does not allow the use of GL_REPEAT or GL_MIRRORED_REPEAT
wrap modes with texture rectangles, so I think we're okay.  It might be
nice to comment about that.

Either way, with the extra gen >= 6 check removed,
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>


More information about the mesa-dev mailing list