aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texobj.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-10 10:49:59 +0200
committermarha <marha@users.sourceforge.net>2012-04-10 10:49:59 +0200
commitc6f80401dc533b04341afe8d596960d1bc25efce (patch)
tree2826007946218a8370d2eebc6aa32083618e2bfe /mesalib/src/mesa/main/texobj.c
parent31706e67674f308e3e7f2a8aaf02f1e0a00fbade (diff)
downloadvcxsrv-c6f80401dc533b04341afe8d596960d1bc25efce.tar.gz
vcxsrv-c6f80401dc533b04341afe8d596960d1bc25efce.tar.bz2
vcxsrv-c6f80401dc533b04341afe8d596960d1bc25efce.zip
fontconfig mesa xkeyboard-config xserver pixman git update 10 Apr 2012
Diffstat (limited to 'mesalib/src/mesa/main/texobj.c')
-rw-r--r--mesalib/src/mesa/main/texobj.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/texobj.c b/mesalib/src/mesa/main/texobj.c
index 97bef3543..4c3eed2b6 100644
--- a/mesalib/src/mesa/main/texobj.c
+++ b/mesalib/src/mesa/main/texobj.c
@@ -153,6 +153,8 @@ _mesa_initialize_texture_object( struct gl_texture_object *obj,
obj->Swizzle[3] = GL_ALPHA;
obj->_Swizzle = SWIZZLE_NOOP;
obj->Sampler.sRGBDecode = GL_DECODE_EXT;
+ obj->BufferObjectFormat = GL_LUMINANCE8;
+ obj->_BufferObjectFormat = MESA_FORMAT_L8;
}
@@ -448,6 +450,14 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
t->_BaseComplete = GL_TRUE;
t->_MipmapComplete = GL_TRUE;
+ if (t->Target == GL_TEXTURE_BUFFER) {
+ /* Buffer textures are always considered complete. The obvious case where
+ * they would be incomplete (no BO attached) is actually specced to be
+ * undefined rendering results.
+ */
+ return;
+ }
+
/* Detect cases where the application set the base level to an invalid
* value.
*/
@@ -755,6 +765,9 @@ _mesa_get_fallback_texture(struct gl_context *ctx, gl_texture_index tex)
target = GL_TEXTURE_1D;
break;
case TEXTURE_BUFFER_INDEX:
+ dims = 0;
+ target = GL_TEXTURE_BUFFER;
+ break;
case TEXTURE_EXTERNAL_INDEX:
default:
/* no-op */
@@ -793,6 +806,8 @@ _mesa_get_fallback_texture(struct gl_context *ctx, gl_texture_index tex)
GL_RGBA, texFormat);
switch (dims) {
+ case 0:
+ break;
case 1:
ctx->Driver.TexImage1D(ctx, texImage, GL_RGBA,
width, 0,