aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texobj.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2015-01-04 16:25:32 +0100
committermarha <marha@users.sourceforge.net>2015-01-04 16:25:32 +0100
commit5e5a48ff8cd08f123601cd0625ca62a86675aac9 (patch)
treeea1c2cee139e8e1ce389a7f956e9874db1e0a650 /mesalib/src/mesa/main/texobj.c
parenta1011d63ffb5cc4f41bf0f4622ee3f1493d419d9 (diff)
downloadvcxsrv-5e5a48ff8cd08f123601cd0625ca62a86675aac9.tar.gz
vcxsrv-5e5a48ff8cd08f123601cd0625ca62a86675aac9.tar.bz2
vcxsrv-5e5a48ff8cd08f123601cd0625ca62a86675aac9.zip
fontconfig libX11 mesa xserver git update 4 Jan 2015
xserver commit dc777c346d5d452a53b13b917c45f6a1bad2f20b libX11 commit 446f5f7f41317a85a0cd0efa5e6a1b37bc99fba2 fontconfig commit 4420b27c074821a1d1f9d6ebe822a610176a417d mesa commit 48094d0e6554a9df36bf00fc2793ade46cf92406
Diffstat (limited to 'mesalib/src/mesa/main/texobj.c')
-rw-r--r--mesalib/src/mesa/main/texobj.c54
1 files changed, 33 insertions, 21 deletions
diff --git a/mesalib/src/mesa/main/texobj.c b/mesalib/src/mesa/main/texobj.c
index 923cf60d7..f0ff605fc 100644
--- a/mesalib/src/mesa/main/texobj.c
+++ b/mesalib/src/mesa/main/texobj.c
@@ -89,7 +89,7 @@ _mesa_lookup_texture_locked(struct gl_context *ctx, GLuint id)
*
* Called via ctx->Driver.NewTextureObject, unless overridden by a device
* driver.
- *
+ *
* \param shared the shared GL state structure to contain the texture object
* \param name integer name for the texture object
* \param target either GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D,
@@ -268,7 +268,6 @@ _mesa_delete_texture_object(struct gl_context *ctx,
}
-
/**
* Copy texture object state from one texture object to another.
* Use for glPush/PopAttrib.
@@ -653,7 +652,8 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
if (height > 1 && t->Target != GL_TEXTURE_1D_ARRAY) {
height /= 2;
}
- if (depth > 1 && t->Target != GL_TEXTURE_2D_ARRAY && t->Target != GL_TEXTURE_CUBE_MAP_ARRAY) {
+ if (depth > 1 && t->Target != GL_TEXTURE_2D_ARRAY
+ && t->Target != GL_TEXTURE_CUBE_MAP_ARRAY) {
depth /= 2;
}
@@ -675,22 +675,25 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
return;
}
if (img->Width2 != width) {
- incomplete(t, MIPMAP, "TexImage[%d] bad width %u", i, img->Width2);
+ incomplete(t, MIPMAP, "TexImage[%d] bad width %u", i,
+ img->Width2);
return;
}
if (img->Height2 != height) {
- incomplete(t, MIPMAP, "TexImage[%d] bad height %u", i, img->Height2);
+ incomplete(t, MIPMAP, "TexImage[%d] bad height %u", i,
+ img->Height2);
return;
}
if (img->Depth2 != depth) {
- incomplete(t, MIPMAP, "TexImage[%d] bad depth %u", i, img->Depth2);
+ incomplete(t, MIPMAP, "TexImage[%d] bad depth %u", i,
+ img->Depth2);
return;
}
/* Extra checks for cube textures */
if (face > 0) {
/* check that cube faces are the same size */
- if (img->Width2 != t->Image[0][i]->Width2 ||
+ if (img->Width2 != t->Image[0][i]->Width2 ||
img->Height2 != t->Image[0][i]->Height2) {
incomplete(t, MIPMAP, "CubeMap Image[n][i] bad size");
return;
@@ -698,7 +701,7 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
}
}
}
-
+
if (width == 1 && height == 1 && depth == 1) {
return; /* found smallest needed mipmap, all done! */
}
@@ -950,6 +953,7 @@ _mesa_total_texture_memory(struct gl_context *ctx)
return total;
}
+
static struct gl_texture_object *
invalidate_tex_image_error_check(struct gl_context *ctx, GLuint texture,
GLint level, const char *name)
@@ -1022,7 +1026,7 @@ invalidate_tex_image_error_check(struct gl_context *ctx, GLuint texture,
* Calls _mesa_HashFindFreeKeyBlock() to find a block of free texture
* IDs which are stored in \p textures. Corresponding empty texture
* objects are also generated.
- */
+ */
void GLAPIENTRY
_mesa_GenTextures( GLsizei n, GLuint *textures )
{
@@ -1155,6 +1159,7 @@ unbind_texobj_from_image_units(struct gl_context *ctx,
}
}
+
/**
* Unbinds all textures bound to the given texture image unit.
*/
@@ -1178,6 +1183,7 @@ unbind_textures_from_unit(struct gl_context *ctx, GLuint unit)
}
}
+
/**
* Delete named textures.
*
@@ -1305,10 +1311,10 @@ _mesa_tex_target_to_index(const struct gl_context *ctx, GLenum target)
/**
* Bind a named texture to a texturing target.
- *
+ *
* \param target texture target.
* \param texName texture name.
- *
+ *
* \sa glBindTexture().
*
* Determines the old texture object bound and returns immediately if rebinding
@@ -1350,7 +1356,9 @@ _mesa_BindTexture( GLenum target, GLuint texName )
if (newTexObj) {
/* error checking */
if (newTexObj->Target != 0 && newTexObj->Target != target) {
- /* the named texture object's target doesn't match the given target */
+ /* The named texture object's target doesn't match the
+ * given target
+ */
_mesa_error( ctx, GL_INVALID_OPERATION,
"glBindTexture(target mismatch)" );
return;
@@ -1361,7 +1369,8 @@ _mesa_BindTexture( GLenum target, GLuint texName )
}
else {
if (ctx->API == API_OPENGL_CORE) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glBindTexture(non-gen name)");
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBindTexture(non-gen name)");
return;
}
@@ -1526,13 +1535,13 @@ _mesa_BindTextures(GLuint first, GLsizei count, const GLuint *textures)
/**
* Set texture priorities.
- *
+ *
* \param n number of textures.
* \param texName texture names.
* \param priorities corresponding texture priorities.
- *
+ *
* \sa glPrioritizeTextures().
- *
+ *
* Looks up each texture in the hash, clamps the corresponding priority between
* 0.0 and 1.0, and calls dd_function_table::PrioritizeTexture.
*/
@@ -1572,13 +1581,14 @@ _mesa_PrioritizeTextures( GLsizei n, const GLuint *texName,
/**
* See if textures are loaded in texture memory.
- *
+ *
* \param n number of textures to query.
* \param texName array with the texture names.
* \param residences array which will hold the residence status.
*
- * \return GL_TRUE if all textures are resident and \p residences is left unchanged,
- *
+ * \return GL_TRUE if all textures are resident and
+ * residences is left unchanged,
+ *
* Note: we assume all textures are always resident
*/
GLboolean GLAPIENTRY
@@ -1614,7 +1624,7 @@ _mesa_AreTexturesResident(GLsizei n, const GLuint *texName,
return GL_FALSE;
}
}
-
+
return allResident;
}
@@ -1626,7 +1636,7 @@ _mesa_AreTexturesResident(GLsizei n, const GLuint *texName,
*
* \return GL_TRUE if texture name corresponds to a texture, or GL_FALSE
* otherwise.
- *
+ *
* \sa glIsTexture().
*
* Calls _mesa_HashLookup().
@@ -1681,6 +1691,7 @@ _mesa_unlock_context_textures( struct gl_context *ctx )
mtx_unlock(&ctx->Shared->TexMutex);
}
+
void GLAPIENTRY
_mesa_InvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset,
GLint yoffset, GLint zoffset, GLsizei width,
@@ -1827,6 +1838,7 @@ _mesa_InvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset,
return;
}
+
void GLAPIENTRY
_mesa_InvalidateTexImage(GLuint texture, GLint level)
{