Re: [Mesa-dev] [PATCH 08/14] mesa: overhaul the glGetTexImage code

2015-07-17 Thread Brian Paul
On 07/17/2015 02:11 PM, Ilia Mirkin wrote: You have logically moved the error checks before calling FLUSH_VERTICES(ctx, 0); whereas it used to get called before the error checks before. I don't know whether that's significant, but thought I'd mention it. In other parts of Mesa, we usually che

Re: [Mesa-dev] [PATCH 08/14] mesa: overhaul the glGetTexImage code

2015-07-17 Thread Ilia Mirkin
You have logically moved the error checks before calling FLUSH_VERTICES(ctx, 0); whereas it used to get called before the error checks before. I don't know whether that's significant, but thought I'd mention it. + for (i = 0; i < numFaces; i++) { + texImage = texObj->Image[firstFace + i]

Re: [Mesa-dev] [PATCH 08/14] mesa: overhaul the glGetTexImage code

2015-07-16 Thread Brian Paul
On 07/15/2015 07:15 PM, Ilia Mirkin wrote: The reason why you chose to call select_tex_image() several times through a get_tex_image flow eludes me. Why not just get it once at the beginning and pass it around? The old APIs also used a gl_texture_image and not a gl_texture_object. (Obviously the

Re: [Mesa-dev] [PATCH 08/14] mesa: overhaul the glGetTexImage code

2015-07-15 Thread Ilia Mirkin
The reason why you chose to call select_tex_image() several times through a get_tex_image flow eludes me. Why not just get it once at the beginning and pass it around? The old APIs also used a gl_texture_image and not a gl_texture_object. (Obviously the object is implicitly gettable from the image

[Mesa-dev] [PATCH 08/14] mesa: overhaul the glGetTexImage code

2015-07-15 Thread Brian Paul
1. Reorganize the error checking code. 2. Lay groundwork for getting sub images by passing image offset and dimensions to the error checking code. 3. Implement _mesa_GetnTexImageARB(), _mesa_GetTexImage() and _mesa_GetTextureImage() all in terms of get_texture_image(). v2: pass offset/width/