[Mesa-dev] [PATCH 2/2] mesa: default texture buffer format should be R8 in the core profile
Marek Olšák
maraeo at gmail.com
Sat Jul 20 11:19:01 PDT 2013
Cc: mesa-stable at lists.freedesktop.org
---
src/mesa/main/texobj.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index a2b112c..d14c379 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -155,8 +155,14 @@ _mesa_initialize_texture_object( struct gl_context *ctx,
obj->Swizzle[3] = GL_ALPHA;
obj->_Swizzle = SWIZZLE_NOOP;
obj->Sampler.sRGBDecode = GL_DECODE_EXT;
- obj->BufferObjectFormat = GL_LUMINANCE8;
- obj->_BufferObjectFormat = MESA_FORMAT_L8;
+ if (ctx->API == API_OPENGL_CORE) {
+ obj->BufferObjectFormat = GL_R8;
+ obj->_BufferObjectFormat = MESA_FORMAT_R8;
+ }
+ else {
+ obj->BufferObjectFormat = GL_LUMINANCE8;
+ obj->_BufferObjectFormat = MESA_FORMAT_L8;
+ }
}
--
1.8.1.2
More information about the mesa-dev
mailing list