On Fri, Mar 12, 2010 at 8:23 AM, Keith Whitwell <kei...@vmware.com> wrote: > On Fri, 2010-03-12 at 06:54 -0800, Luca Barbieri wrote: >> What if you have a non-integer min LOD? >> While the integer part may belong to the sampler view, the fractional >> part really seems to be a sampler property. >> Requiring min_lod < 1.0 also doesn't seem to make much sense, so >> shouldn't it be kept as it is now? >> Same thing for last_level / max_lod. > > Hmm, I see your point. Fractional values don't have a lot of meaning in > the views, but without a fraction from somewhere we don't capture all of > GL semantics. > > I guess this is the underlying reason GL has such a wide variety of ways > of specifying the min/max level also. > > And finally, it seems like DX10 has done the same thing - with both > integer min/max in views and float min/max in the sampler state. > > It looks like we really do want to keep them both.
I agree. The OpenGL GL_TEXTURE_BASE/MAX_LEVEL attributes are used to indicate which mipmap images are actually present so that OpenGL can determine if the texture is 'complete'. An app might load texture LODs on demand over time. For example, loading level 2, then 1, then finally 0, decrementing GL_TEXTURE_BASE_LEVEL each time. The Mesa state tracker currently always puts the OpenGL base-level mipmap image into level[0] of the gallium texture. I'd like to move away from that. The GL_TEXTURE_MIN/MAX_LOD attributes clamp the range of LODs that the sampler accesses. These can be fractional values, as Luca said, which is significant for linear mipmap level interpolation. Finally, the OpenGL implementatoin should internally restrict GL_TEXTURE_MIN/MAX_LOD to the range of levels indicated by GL_TEXTURE_BASE/MAX_LEVEL, to avoid grabbing invalid/missing texels. -Brian ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev