diff options
author | Brian Paul <brianp@vmware.com> | 2009-10-21 19:58:00 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-10-21 19:58:00 -0600 |
commit | c55b355fd460453a459e073ac4119c69e06e7531 (patch) | |
tree | 235b88e4450c75acd1865f524010320253406bf3 /src/mesa/main | |
parent | 832f29770d91c7d98c9b8438922247fff8f0f8bd (diff) |
mesa: use MESA_FORMAT_X8_Z24
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/renderbuffer.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c index 409fd8634a..0e21656385 100644 --- a/src/mesa/main/renderbuffer.c +++ b/src/mesa/main/renderbuffer.c @@ -1052,6 +1052,18 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb, pixelSize = sizeof(GLushort); break; case GL_DEPTH_COMPONENT24: + rb->DataType = GL_UNSIGNED_INT; + rb->GetPointer = get_pointer_uint; + rb->GetRow = get_row_uint; + rb->GetValues = get_values_uint; + rb->PutRow = put_row_uint; + rb->PutRowRGB = NULL; + rb->PutMonoRow = put_mono_row_uint; + rb->PutValues = put_values_uint; + rb->PutMonoValues = put_mono_values_uint; + rb->Format = MESA_FORMAT_X8_Z24; + pixelSize = sizeof(GLuint); + break; case GL_DEPTH_COMPONENT32: rb->DataType = GL_UNSIGNED_INT; rb->GetPointer = get_pointer_uint; @@ -1735,6 +1747,10 @@ _mesa_add_depth_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb, rb->Format = MESA_FORMAT_Z16; rb->InternalFormat = GL_DEPTH_COMPONENT16; } + else if (depthBits <= 24) { + rb->Format = MESA_FORMAT_X8_Z24; + rb->InternalFormat = GL_DEPTH_COMPONENT24; + } else { rb->Format = MESA_FORMAT_Z32; rb->InternalFormat = GL_DEPTH_COMPONENT32; |