[Mesa-dev] [PATCH 7/9] mesa: Fill out ARB_texture_view entry points
Courtney Goeltzenleuchter
courtney at lunarg.com
Wed Dec 4 14:46:32 PST 2013
It's come to my attention that Mesa's handling of GL_TEXTURE_BASE_LEVEL and
GL_TEXTURE_MAX_LEVEL in glTexParameter and glGetTexParameter may be
incorrect. The issue happens with the following sequence:
glTexStorage2D(GL_TEXTURE_2D, 4, GL_RGBA8, 128, 128);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 5);
glGetTexParameter(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, &n);
The key question is: What is the value of n?
Right now, the Mesa driver will clamp the glTexParameter call to the range
0 .. 3 (as specified by the TexStorage call) and n = 3 after the
GetTexParameter call. However, the value returned on the Intel Windows
driver and NVIDIA's Linux driver return 5. This has apparently been
discussed among Kronos members in bug: 9342 (
https://cvs.khronos.org/bugzilla/show_bug.cgi?id=9342) which I don't have
visibility of.
To match that behavior the texture object will likely need two BaseLevel
and MaxLevel attributes. One that's clamped and used locally and the other
that simply holds the set value as given by the application in the
glTexParameter call.
Thoughts?
Courtney
On Tue, Dec 3, 2013 at 4:30 PM, Courtney Goeltzenleuchter <
courtney at lunarg.com> wrote:
>
>
>
> On Tue, Dec 3, 2013 at 4:28 PM, Brian Paul <brianp at vmware.com> wrote:
>
>> On 12/03/2013 02:56 PM, Courtney Goeltzenleuchter wrote:
>>
>>> Hi Brian,
>>>
>>> I've made all the recommended changes.
>>>
>>> I also added one, a test that the Driver.TextureView != NULL before
>>> calling. This lets me test the non DD functionality with the
>>> MESA_EXTENSION_OVERRIDE=+GL_ARB_texture_view
>>>
>>> I've also rebased to latest master (no changes required). Whole stream
>>> can be found at:
>>> https://github.com/courtney-lunarg/mesa/tree/texture_view-rc6
>>> <https://urldefense.proofpoint.com/v1/url?u=https:
>>> //github.com/courtney-lunarg/mesa/tree/texture_view-rc6&k=
>>> oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=lGQMzzTgII0I7jefp2FHq7WtZ%
>>> 2BTLs8wadB%2BiIj9xpBY%3D%0A&m=StSJ4O%2Fa%2B9Zp%2FeTtJIDzJ1NxrKtDXrENaO%
>>> 2FoFA9gY1k%3D%0A&s=0439e3fc50d195734c13b4c5e22024
>>> f034c27b7e657c8f79e08993b98f117518>
>>>
>>>
>>> Let me know if you need me to post the patches to the mail list or not.
>>>
>>
>> The series LGTM. Thanks. Reviewed-by: Brian Paul <brianp at vmware.com>
>>
>> Do you need someone to push to master for you?
>
>
> Yes please!
>
>
>>
>>
>> -Brian
>>
>>
>
>
> --
> Courtney Goeltzenleuchter
> LunarG
>
>
--
Courtney Goeltzenleuchter
LunarG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131204/e9634e11/attachment.html>
More information about the mesa-dev
mailing list