diff options
author | marha <marha@users.sourceforge.net> | 2014-02-07 23:46:30 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-02-07 23:46:30 +0100 |
commit | 6daf40f6b1138efad98dbb579cd35520cbc349bb (patch) | |
tree | 7f45dbb347f5e1a73b18a720633b9d801c968490 /mesalib/src/mesa/main/texstorage.c | |
parent | 5c64f94cf4cf8457a5616fe20b9a27174895f1a8 (diff) | |
parent | 982ac918afe6a1c02d5cf735d7b6c56443a048cc (diff) | |
download | vcxsrv-6daf40f6b1138efad98dbb579cd35520cbc349bb.tar.gz vcxsrv-6daf40f6b1138efad98dbb579cd35520cbc349bb.tar.bz2 vcxsrv-6daf40f6b1138efad98dbb579cd35520cbc349bb.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
xkbcomp xkeyboard-config libxcb libxtrans fontconfig libX11 libxcb mesa xserver git update 7 Feb 2014
Conflicts:
mesalib/src/glsl/glcpp/glcpp.c
openssl/Makefile
Diffstat (limited to 'mesalib/src/mesa/main/texstorage.c')
-rw-r--r-- | mesalib/src/mesa/main/texstorage.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/mesalib/src/mesa/main/texstorage.c b/mesalib/src/mesa/main/texstorage.c index 22208572f..86c8f3c92 100644 --- a/mesalib/src/mesa/main/texstorage.c +++ b/mesalib/src/mesa/main/texstorage.c @@ -120,7 +120,7 @@ initialize_texture_fields(struct gl_context *ctx, struct gl_texture_object *texObj, GLint levels, GLsizei width, GLsizei height, GLsizei depth, - GLenum internalFormat, gl_format texFormat) + GLenum internalFormat, mesa_format texFormat) { const GLenum target = texObj->Target; const GLuint numFaces = _mesa_num_tex_faces(target); @@ -151,9 +151,8 @@ initialize_texture_fields(struct gl_context *ctx, /** - * Clear all fields of texture object to zeros. Used for proxy texture tests. - * Used for proxy texture tests (and to clean up when a texture memory - * allocation fails). + * Clear all fields of texture object to zeros. Used for proxy texture tests + * and to clean up when a texture memory allocation fails. */ static void clear_texture_fields(struct gl_context *ctx, @@ -332,6 +331,11 @@ tex_storage_error_check(struct gl_context *ctx, GLuint dims, GLenum target, return GL_TRUE; } + /* additional checks for depth textures */ + if (!_mesa_legal_texture_base_format_for_target(ctx, target, internalformat, + dims, "glTexStorage")) + return GL_TRUE; + return GL_FALSE; } @@ -345,7 +349,7 @@ texstorage(GLuint dims, GLenum target, GLsizei levels, GLenum internalformat, { struct gl_texture_object *texObj; GLboolean sizeOK, dimensionsOK; - gl_format texFormat; + mesa_format texFormat; GET_CURRENT_CONTEXT(ctx); |