[Mesa-dev] [PATCH 01/37] mesa: add gl_texture_image::Face, Level fields

Brian Paul brian.e.paul at gmail.com
Mon Aug 15 14:57:33 PDT 2011


On Mon, Aug 15, 2011 at 3:43 PM, Ian Romanick <idr at freedesktop.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> This series is huge, so I'm going to review it in batches.  I've
> reviewed 01/37 through 10/37, inclusive.  I'm sending replies with
> comments to 01/37 and 05/37.  The rest look good and get my R-b.
>
> On 08/15/2011 11:53 AM, Eric Anholt wrote:
>> From: Brian Paul <brianp at vmware.com>
>>
>> Several drivers have these fields in their subclasses of gl_texture_image.
>> They'll be useful for core Mesa too...
>> ---
>>  src/mesa/main/mtypes.h   |    2 ++
>>  src/mesa/main/teximage.c |    2 ++
>>  2 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
>> index 2d5f44c..12120a9 100644
>> --- a/src/mesa/main/mtypes.h
>> +++ b/src/mesa/main/mtypes.h
>> @@ -1279,6 +1279,8 @@ struct gl_texture_image
>>     GLboolean _IsPowerOfTwo;  /**< Are all dimensions powers of two? */
>>
>>     struct gl_texture_object *TexObject;  /**< Pointer back to parent object */
>> +   GLuint Level;                /**< Which mipmap level am I? */
>> +   GLuint Face;                 /**< Which cube face am I? */
>
> Is Face a value [0,5] or is it one of the GL_TEXTURE_CUBE_MAP_*_* enums?
>  If it's the later, then the field should be a GLenum for clarity.  If
> it's the former, some description of the mapping (or a real enum) would
> be nice.

It's the former, an index into the gl_texture_object::Image[] array.

-Brian


More information about the mesa-dev mailing list