[Mesa-dev] [RFC] [PATCH 0/2] Allow mesa/st to inform driver of GL_TEXTURE_RECTANGLE

Brian Paul brianp at vmware.com
Thu Apr 15 15:36:50 PDT 2010


Luca Barbieri wrote:
> How about moving normalized_coords from the sampler state to the sampler view?
> 
> As far as I can tell:
> ARB_sampler_objects doesn't seem to include the texture target or a
> normalization in the sampler object.
> DirectX 10 does not support unnormalized coordinates at all.
> Not sure about pre-DX10, but they don't have sampler objects anyway.
> 
> Any reason for having it in the sampler state?
> 
> Note however that this is a separate issue from the problem of knowing
> that at texture creation.
> 
> 
> Alternatively you could even move it to pipe_texture (ideally by
> introducing PIPE_TEXTURE_RECT and not as a bit, so it can't be used
> with 3D and cubemaps) as Marek proposes, which would indeed solve both
> issues at once.
> 
> The issue however is that all generic Gallium algorithms would now
> need to adapt to that and use either kind of coordinates depending on
> the texture target, which would be ugly (even though possibly a good
> thing for old hardware).

Actually, adding a new texture type for PIPE_TEXTURE_RECT might be a 
good solution.  For some drivers there may be no distinction between 
PIPE_TEXTURE_RECT and PIPE_TEXTURE_2D so it wouldn't be a big deal to 
implement.

We'll probably be adding new texture types for 1D and 2D texture 
arrays too...

-Brian


More information about the mesa-dev mailing list