On 11/06/2012 04:45 PM, Dave Airlie wrote:
+
+ /*
+ * 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.
OK, then maybe we should update the comment on that function and
explain why cube arrays aren't in the switch statement.
-Brian
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev