diff options
author | Marek Olšák <[email protected]> | 2013-07-30 22:29:08 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-07-30 22:36:21 +0200 |
commit | a6b1a7c0d269256ffbaf2300710601cde8ac872c (patch) | |
tree | fb78573248919c368150df857ddf7c8cc3402ec6 /src/mesa/main | |
parent | 63569dbeb0b33776043b141571700123b7cf6bf5 (diff) |
mesa: default DEPTH_TEXTURE_MODE should be RED in the core profile
Cc: [email protected]
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/texobj.c | 7 | ||||
-rw-r--r-- | src/mesa/main/texobj.h | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 2168bffb1a3..a2b112c8f86 100644 --- a/src/mesa/main/texobj.c +++ b/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; diff --git a/src/mesa/main/texobj.h b/src/mesa/main/texobj.h index a99f45bfa29..0df088ce424 100644 --- a/src/mesa/main/texobj.h +++ b/src/mesa/main/texobj.h @@ -50,7 +50,8 @@ extern struct gl_texture_object * _mesa_new_texture_object( struct gl_context *ctx, GLuint name, GLenum target ); extern 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 ); extern void |