Re: [Mesa-dev] [PATCH 2/5] mesa/main: Add generic bits of ARB_clear_texture implementation

2014-07-01 Thread Neil Roberts
Jason Ekstrand ja...@jlekstrand.net writes: + texImages[0] = _mesa_select_tex_image(ctx, texObj, texObj-Target, level); Do you want this inside an else block? I think it's quite a common idiom in Mesa to handle the special cases as a series of if-statements with a return upfront before

Re: [Mesa-dev] [PATCH 2/5] mesa/main: Add generic bits of ARB_clear_texture implementation

2014-07-01 Thread Neil Roberts
Ian Romanick i...@freedesktop.org writes: Are there potentially cases where the first clear_tex_image could succeed but the second fail? If so, then this is no good. If a GL call generates an error (other than GL_NO_MEMORY), it is supposed to be as though nothing happened. Urgh, yes,

Re: [Mesa-dev] [PATCH 2/5] mesa/main: Add generic bits of ARB_clear_texture implementation

2014-07-01 Thread Jason Ekstrand
On Tue, Jul 1, 2014 at 10:09 AM, Neil Roberts n...@linux.intel.com wrote: Jason Ekstrand ja...@jlekstrand.net writes: + texImages[0] = _mesa_select_tex_image(ctx, texObj, texObj-Target, level); Do you want this inside an else block? I think it's quite a common idiom in Mesa to

Re: [Mesa-dev] [PATCH 2/5] mesa/main: Add generic bits of ARB_clear_texture implementation

2014-06-30 Thread Jason Ekstrand
On Fri, Jun 13, 2014 at 5:59 PM, Neil Roberts n...@linux.intel.com wrote: This adds the driver entry point for glClearTexSubImage and fills in the _mesa_ClearTexImage and _mesa_ClearTexSubImage functions that call it. --- src/mesa/main/dd.h | 14 +++ src/mesa/main/teximage.c | 241

Re: [Mesa-dev] [PATCH 2/5] mesa/main: Add generic bits of ARB_clear_texture implementation

2014-06-30 Thread Ian Romanick
On 06/13/2014 05:59 PM, Neil Roberts wrote: This adds the driver entry point for glClearTexSubImage and fills in the _mesa_ClearTexImage and _mesa_ClearTexSubImage functions that call it. --- src/mesa/main/dd.h | 14 +++ src/mesa/main/teximage.c | 241

Re: [Mesa-dev] [PATCH 2/5] mesa/main: Add generic bits of ARB_clear_texture implementation

2014-06-16 Thread Neil Roberts
Ilia Mirkin imir...@alum.mit.edu writes: + if (ctx-Version = 30 || ctx-Extensions.EXT_texture_integer) { Just ctx-Extensions.EXT_texture_integer should be enough here, no? I'm reluctant to change this because every other place in the code that checks for integer textures does it in the same

Re: [Mesa-dev] [PATCH 2/5] mesa/main: Add generic bits of ARB_clear_texture implementation

2014-06-16 Thread Marek Olšák
The presence of EXT_texture_integer implies EXT_gpu_shader4, so I added ctx-Version = 30 || ctx-Extensions.EXT_texture_integer everywhere to allow drivers to disable EXT_texture_integer but not lose integer textures from GL 3.0. Marek On Mon, Jun 16, 2014 at 12:49 PM, Neil Roberts

Re: [Mesa-dev] [PATCH 2/5] mesa/main: Add generic bits of ARB_clear_texture implementation

2014-06-13 Thread Ilia Mirkin
On Fri, Jun 13, 2014 at 8:59 PM, Neil Roberts n...@linux.intel.com wrote: This adds the driver entry point for glClearTexSubImage and fills in the _mesa_ClearTexImage and _mesa_ClearTexSubImage functions that call it. --- src/mesa/main/dd.h | 14 +++ src/mesa/main/teximage.c | 241