aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texobj.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-08-01 13:25:23 +0200
committermarha <marha@users.sourceforge.net>2013-08-01 13:25:23 +0200
commitc3d3ea464f7f4e53e8fe3e11ecada36cb209ba4d (patch)
treef86937d9126b2d543ffd13f861a1271f48bd69e6 /mesalib/src/mesa/main/texobj.c
parentacad661e29a4f09d06f829fdfea949814da57da6 (diff)
parent0659c77949b38440a2a9ba67e1ee9cacef1f3a7f (diff)
downloadvcxsrv-c3d3ea464f7f4e53e8fe3e11ecada36cb209ba4d.tar.gz
vcxsrv-c3d3ea464f7f4e53e8fe3e11ecada36cb209ba4d.tar.bz2
vcxsrv-c3d3ea464f7f4e53e8fe3e11ecada36cb209ba4d.zip
Merge remote-tracking branch 'origin/released'
* origin/released: libX11 mesa xserver xkeyboard-config git update 1 aug 2013
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;
}