[Mesa-dev] [PATCH 03/10] mesa: add fbo/texture support for ARB_texture_cube_map_array
Dave Airlie
airlied at gmail.com
Tue Nov 6 15:45:27 PST 2012
>> +
>> + /*
>> + * Use the proxy texture driver hook to see if the size/level/etc are
>> + * legal.
>> + */
>
>
> That comment seems to be in the wrong place. The code after it is concerned
> with format/type checking.
must be a bit of cut-n-paste will clean it up.
>
> I think you missed updating the _mesa_num_tex_faces() function in texobj.h:
>
> /**
> * Return number of faces for a texture target. This will be 6 for
> * cube maps (and cube map arrays) and 1 otherwise.
> */
> static inline GLuint
> _mesa_num_tex_faces(GLenum target)
> {
> switch (target) {
> case GL_TEXTURE_CUBE_MAP:
> case GL_PROXY_TEXTURE_CUBE_MAP:
> return 6;
> default:
> return 1;
> }
> }
>
> I'm surprised that you haven't seen any failures if this wasn't updated.
>
You don't actually use tex faces with cube map arrays, they are stored
as arrays mostly, so you should never see a call to this function with
a cube map array. Even uploading is done on a face by face basis for
all members of the array.
So cube map arrays are stored as 2d layers never as cube maps, which
hopefully makes sense to why I don't update that function.
Dave.
More information about the mesa-dev
mailing list