diff options
author | marha <marha@users.sourceforge.net> | 2010-11-29 22:05:53 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-11-29 22:05:53 +0000 |
commit | fed109d6a33c0871291d1bb2f3f6b7a3d1a3e9d7 (patch) | |
tree | fa1ba494685a71e28a096990a8707680c7cb378b /mesalib/src/mesa/main/renderbuffer.c | |
parent | ae340911c1ba1f98b418bd8f1a487fa4d79491b0 (diff) | |
parent | 6fda93be42ace9eeab0e82ceebb6798961c9105c (diff) | |
download | vcxsrv-fed109d6a33c0871291d1bb2f3f6b7a3d1a3e9d7.tar.gz vcxsrv-fed109d6a33c0871291d1bb2f3f6b7a3d1a3e9d7.tar.bz2 vcxsrv-fed109d6a33c0871291d1bb2f3f6b7a3d1a3e9d7.zip |
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/main/renderbuffer.c')
-rw-r--r-- | mesalib/src/mesa/main/renderbuffer.c | 46 |
1 files changed, 2 insertions, 44 deletions
diff --git a/mesalib/src/mesa/main/renderbuffer.c b/mesalib/src/mesa/main/renderbuffer.c index 4d7b0aff0..adc1199d8 100644 --- a/mesalib/src/mesa/main/renderbuffer.c +++ b/mesalib/src/mesa/main/renderbuffer.c @@ -49,12 +49,6 @@ #include "fbobject.h" #include "renderbuffer.h" -#include "rbadaptors.h" - - -/* 32-bit color index format. Not a public format. */ -#define COLOR_INDEX32 0x424243 - /* * Routines for get/put values in common buffer formats follow. @@ -992,6 +986,7 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb, pixelSize = 4 * sizeof(GLubyte); break; case GL_RGBA16: + case GL_RGBA16_SNORM: /* for accum buffer */ rb->Format = MESA_FORMAT_SIGNED_RGBA_16; rb->DataType = GL_SHORT; @@ -1091,21 +1086,6 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb, rb->PutMonoValues = put_mono_values_uint; pixelSize = sizeof(GLuint); break; - case GL_COLOR_INDEX8_EXT: - case GL_COLOR_INDEX16_EXT: - case COLOR_INDEX32: - rb->Format = MESA_FORMAT_CI8; - rb->DataType = GL_UNSIGNED_BYTE; - rb->GetPointer = get_pointer_ubyte; - rb->GetRow = get_row_ubyte; - rb->GetValues = get_values_ubyte; - rb->PutRow = put_row_ubyte; - rb->PutRowRGB = NULL; - rb->PutMonoRow = put_mono_row_ubyte; - rb->PutValues = put_values_ubyte; - rb->PutMonoValues = put_mono_values_ubyte; - pixelSize = sizeof(GLubyte); - break; default: _mesa_problem(ctx, "Bad internalFormat in _mesa_soft_renderbuffer_storage"); return GL_FALSE; @@ -1777,7 +1757,7 @@ _mesa_add_accum_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb, } rb->Format = MESA_FORMAT_SIGNED_RGBA_16; - rb->InternalFormat = GL_RGBA16; + rb->InternalFormat = GL_RGBA16_SNORM; rb->AllocStorage = _mesa_soft_renderbuffer_storage; _mesa_add_renderbuffer(fb, BUFFER_ACCUM, rb); @@ -1909,8 +1889,6 @@ void _mesa_add_renderbuffer(struct gl_framebuffer *fb, GLuint bufferName, struct gl_renderbuffer *rb) { - GLenum baseFormat; - assert(fb); assert(rb); assert(bufferName < BUFFER_COUNT); @@ -1931,26 +1909,6 @@ _mesa_add_renderbuffer(struct gl_framebuffer *fb, assert(!rb->Name); } - /* If Mesa's compiled with deep color channels (16 or 32 bits / channel) - * and the device driver is expecting 8-bit values (GLubyte), we can - * use a "renderbuffer adaptor/wrapper" to do the necessary conversions. - */ - baseFormat = _mesa_get_format_base_format(rb->Format); - if (baseFormat == GL_RGBA) { - if (CHAN_BITS == 16 && rb->DataType == GL_UNSIGNED_BYTE) { - GET_CURRENT_CONTEXT(ctx); - rb = _mesa_new_renderbuffer_16wrap8(ctx, rb); - } - else if (CHAN_BITS == 32 && rb->DataType == GL_UNSIGNED_BYTE) { - GET_CURRENT_CONTEXT(ctx); - rb = _mesa_new_renderbuffer_32wrap8(ctx, rb); - } - else if (CHAN_BITS == 32 && rb->DataType == GL_UNSIGNED_SHORT) { - GET_CURRENT_CONTEXT(ctx); - rb = _mesa_new_renderbuffer_32wrap16(ctx, rb); - } - } - fb->Attachment[bufferName].Type = GL_RENDERBUFFER_EXT; fb->Attachment[bufferName].Complete = GL_TRUE; _mesa_reference_renderbuffer(&fb->Attachment[bufferName].Renderbuffer, rb); |