mesa: handle GL_PROXY_TEXTURE_CUBE_MAP in _mesa_num_tex_faces()
authorBrian Paul <brianp@vmware.com>
Mon, 17 Sep 2012 01:14:56 +0000 (19:14 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 18 Sep 2012 01:49:27 +0000 (19:49 -0600)
src/mesa/main/texobj.h

index a6f1d3a14ff5d4b37e31ca2875fb9929241bf88d..f22c58cade4293f9d6dc676ab88dc77cf587688a 100644 (file)
@@ -85,7 +85,13 @@ _mesa_reference_texobj(struct gl_texture_object **ptr,
 static inline GLuint
 _mesa_num_tex_faces(GLenum target)
 {
-   return target == GL_TEXTURE_CUBE_MAP ? 6 : 1;
+   switch (target) {
+   case GL_TEXTURE_CUBE_MAP:
+   case GL_PROXY_TEXTURE_CUBE_MAP:
+      return 6;
+   default:
+      return 1;
+   }
 }