[Mesa-dev] [PATCH] mesa: clamp MaxLevel for immutable textures at initialization

Nicolai Hähnle nhaehnle at gmail.com
Thu Oct 22 09:03:40 PDT 2015


On 22.10.2015 15:57, Fredrik Höglund wrote:
> On Thursday 22 October 2015, Nicolai Hähnle wrote:
>> The same clamping already happens for glTexParameteri. This change
>> also fixes a bug in mipmap generation, see
>> https://bugs.freedesktop.org/show_bug.cgi?id=91993
>
> I don't think this patch is correct.  The ARB_texture_view specification
> doesn't say that MaxLevel should be initialized to the value of
> TEXTURE_IMMUTABLE_LEVELS, only that it's interpreted relative to
> the view and not relative to the original data store.
>
> Liam Middlebrook also pointed out recently that the clamping done
> in glTexParameteri is in fact a bug:
>
> http://lists.freedesktop.org/archives/piglit/2015-June/016342.html
>
> The language in the specification that says that MaxLevel is clamped
> when the texture is immutable applies to texture minification,
> magnification, and texture completeness; not to gl*Tex*Parameter*.

Ugh. I was torn between those two interpretations. I suppose nobody was 
confident enough to change gl*Tex*Parameter* either ;)

Thinking more on this, there is also a problematic interaction between 
glTextureView and glGenerate*Mipmap when the view does not extend to the 
highest level in the underlying texture. Clearly, this part of the spec 
could use some cleanups.

Any chance of an "official" clarification? I did not find corresponding 
Issues in the corresponding extensions. What are non-Mesa drivers doing?

Cheers,
Nicolai


More information about the mesa-dev mailing list