aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texobj.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-08-01 13:22:08 +0200
committermarha <marha@users.sourceforge.net>2013-08-01 13:22:08 +0200
commit0659c77949b38440a2a9ba67e1ee9cacef1f3a7f (patch)
tree891077ab7001a45e0e37ff2e554db0c56671acdc /mesalib/src/mesa/main/texobj.c
parent4c8cee9b5a37db30af50aafcbf54b36b9fd9e03a (diff)
downloadvcxsrv-0659c77949b38440a2a9ba67e1ee9cacef1f3a7f.tar.gz
vcxsrv-0659c77949b38440a2a9ba67e1ee9cacef1f3a7f.tar.bz2
vcxsrv-0659c77949b38440a2a9ba67e1ee9cacef1f3a7f.zip
libX11 mesa xserver xkeyboard-config git update 1 aug 2013
xserver commit b6e5c4669e0db391966deb397e8c975ec7f0124d xkeyboard-config commit abaf14335dc6504e59d91e77babc8e034df5beb7 libX11 commit 44f84223f5e2dd46883fcbd352af2798bfa9aeb6 mesa commit 3eef7fec677f40eef1674e44e7ebd836bc7f8612
Diffstat (limited to 'mesalib/src/mesa/main/texobj.c')
-rw-r--r--mesalib/src/mesa/main/texobj.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mesalib/src/mesa/main/texobj.c b/mesalib/src/mesa/main/texobj.c
index 2168bffb1..334dee77b 100644
--- a/mesalib/src/mesa/main/texobj.c
+++ b/mesalib/src/mesa/main/texobj.c
@@ -83,7 +83,7 @@ _mesa_new_texture_object( struct gl_context *ctx, GLuint name, GLenum target )
struct gl_texture_object *obj;
(void) ctx;
obj = MALLOC_STRUCT(gl_texture_object);
- _mesa_initialize_texture_object(obj, name, target);
+ _mesa_initialize_texture_object(ctx, obj, name, target);
return obj;
}
@@ -95,7 +95,8 @@ _mesa_new_texture_object( struct gl_context *ctx, GLuint name, GLenum target )
* \param target the texture target
*/
void
-_mesa_initialize_texture_object( struct gl_texture_object *obj,
+_mesa_initialize_texture_object( struct gl_context *ctx,
+ struct gl_texture_object *obj,
GLuint name, GLenum target )
{
ASSERT(target == 0 ||
@@ -146,7 +147,7 @@ _mesa_initialize_texture_object( struct gl_texture_object *obj,
obj->Sampler.MaxAnisotropy = 1.0;
obj->Sampler.CompareMode = GL_NONE; /* ARB_shadow */
obj->Sampler.CompareFunc = GL_LEQUAL; /* ARB_shadow */
- obj->DepthMode = GL_LUMINANCE;
+ obj->DepthMode = ctx->API == API_OPENGL_CORE ? GL_RED : GL_LUMINANCE;
obj->Sampler.CubeMapSeamless = GL_FALSE;
obj->Swizzle[0] = GL_RED;
obj->Swizzle[1] = GL_GREEN;
@@ -154,8 +155,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;
+ obj->BufferObjectFormat = GL_R8;
+ obj->_BufferObjectFormat = MESA_FORMAT_R8;
}