Re: [Mesa-dev] [PATCH 7/9] mesa: Fill out ARB_texture_view entry points

2013-12-05 Thread Brian Paul
On 12/04/2013 03:46 PM, Courtney Goeltzenleuchter wrote: 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,

Re: [Mesa-dev] [PATCH 7/9] mesa: Fill out ARB_texture_view entry points

2013-12-05 Thread Courtney Goeltzenleuchter
Okay, that makes it easier. Should this change be conditional based on the type of context created? Courtney On Thu, Dec 5, 2013 at 8:52 AM, Brian Paul bri...@vmware.com wrote: On 12/04/2013 03:46 PM, Courtney Goeltzenleuchter wrote: It's come to my attention that Mesa's handling of

Re: [Mesa-dev] [PATCH 7/9] mesa: Fill out ARB_texture_view entry points

2013-12-05 Thread Courtney Goeltzenleuchter
Browsing the code a little, it's not clear that drivers are using the texture object's BaseLevel in a safe manner. Some example uses of BaseLevel: [intel driver] const struct gl_texture_image *img = t-Image[0][t-BaseLevel]; // Without conditioning, this could lead to memory access error. Maybe

Re: [Mesa-dev] [PATCH 7/9] mesa: Fill out ARB_texture_view entry points

2013-12-05 Thread Brian Paul
In _mesa_test_texobj_completeness() we check if BaseLevel is negative. If so, we mark the texture object as 'incomplete'. Down in the drivers, we should never sample from a texture that's incomplete. In gallium, for example, we use a dummy/fallback texture instead. -Brian On 12/05/2013

Re: [Mesa-dev] [PATCH 7/9] mesa: Fill out ARB_texture_view entry points

2013-12-04 Thread Courtney Goeltzenleuchter
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,

Re: [Mesa-dev] [PATCH 7/9] mesa: Fill out ARB_texture_view entry points

2013-12-03 Thread Brian Paul
This looks pretty good. Just a bunch of nitpicks below. On 11/25/2013 05:49 PM, Courtney Goeltzenleuchter wrote: Add Mesa TextureView logic. Incorporate feedback on ARB_texture_view: - Add S3TC VIEW_CLASSes to compatibility table - Use existing _mesa_get_tex_image - Clean up error strings -

Re: [Mesa-dev] [PATCH 7/9] mesa: Fill out ARB_texture_view entry points

2013-11-27 Thread Brian Paul
On Tue, Nov 26, 2013 at 3:59 PM, Courtney Goeltzenleuchter court...@lunarg.com wrote: With these changes, what needs to happen to commit these changes to master? I'd like to do another quick review but I'm on vacation this week and not finding much time for email/reviewing. Maybe in a few

Re: [Mesa-dev] [PATCH 7/9] mesa: Fill out ARB_texture_view entry points

2013-11-26 Thread Courtney Goeltzenleuchter
With these changes, what needs to happen to commit these changes to master? Thanks, Courtney On Mon, Nov 25, 2013 at 6:01 PM, Courtney Goeltzenleuchter court...@lunarg.com wrote: While incorporating Brian's comments I did some refactoring to consolidate multiple uses of

[Mesa-dev] [PATCH 7/9] mesa: Fill out ARB_texture_view entry points

2013-11-25 Thread Courtney Goeltzenleuchter
Add Mesa TextureView logic. Incorporate feedback on ARB_texture_view: - Add S3TC VIEW_CLASSes to compatibility table - Use existing _mesa_get_tex_image - Clean up error strings - Use bool instead of GLboolean for internal functions - Split compound level layer test into individual tests

Re: [Mesa-dev] [PATCH 7/9] mesa: Fill out ARB_texture_view entry points

2013-11-25 Thread Courtney Goeltzenleuchter
While incorporating Brian's comments I did some refactoring to consolidate multiple uses of next_mimap_level_size into one shared helper function. That adds another commit to the stream. I thought it was big enough now that I should post the branch to make it easier to use. I've posted the