[Mesa-dev] [PATCH v2 1/2] mesa: make glFramebuffer* check immutable texture level bounds
Ilia Mirkin
imirkin at alum.mit.edu
Wed Feb 1 18:26:58 UTC 2017
On Wed, Feb 1, 2017 at 1:18 PM, Antía Puentes <apuentes at igalia.com> wrote:
> Hi Ilia,
>
> On mié, 2017-02-01 at 00:37 -0500, Ilia Mirkin wrote:
>> On Tue, Jan 31, 2017 at 2:55 PM, Antía Puentes <apuentes at igalia.com> wrote:
>> >
>> > There was an update in the OpenGL ES 3.2 specification (November 3,
>> > 2016) addressing this:
>> >
>> > - In section "9.2.8 Attaching Texture Images to a Framebuffer",
>> > FramebufferTexture2D (page 241) and FramebufferTextureLayer (page 242)
>> > descriptions:
>> >
>> > " specifies the mipmap level of the texture image to be attached
>> > to the framebuffer, and must satisfy the following conditions:
>> >
>> > • If texture refers to an immutable-format texture, level must be
>> > greater than or equal to zero and smaller than the value of
>> > TEXTURE_IMMUTABLE_LEVELS for texture."
>> >
>> > https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15946
>> Interesting, OK. And the test that's failing is a "glesext" test, even
>> though it's being run in a GL context. Does that bug indicate whether
>> such a change also applies to desktop GL? (I don't have access to the
>> bug tracker.)
>
> It does not mention anything about desktop GL. I have filled a new bug
> in OpenGL 4.5 asking for clarification:
> https://cvs.khronos.org/bugzilla/show_bug.cgi?id=16214
>
> For what it is worth, I have a patch similar to yours but using
> ImmutableLevels in the condition check instead of NumLevels:
>
> (texObj->Immutable && level >= texObj->ImmutableLevels)
I didn't even know about that one... I think you want NumLevels
though, as ImmutableLevels is copied through from the original texture
object when creating a view, while NumLevels is set to the expected
value.
It does seem like ImmutableLevels should be done away with - the
usages of it likely predate NumLevels's existence.
-ilia
More information about the mesa-dev
mailing list