dispatch: stop generating separate GLES1 API code.
[mesa.git] / src / mesa / main / texobj.h
index 93e0d77382e021c86381aa0e8828170bbc394ae5..f22c58cade4293f9d6dc676ab88dc77cf587688a 100644 (file)
@@ -78,6 +78,23 @@ _mesa_reference_texobj(struct gl_texture_object **ptr,
 }
 
 
+/**
+ * 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;
+   }
+}
+
+
 /** Is the texture "complete" with respect to the given sampler state? */
 static inline GLboolean
 _mesa_is_texture_complete(const struct gl_texture_object *texObj,