diff options
author | Brian Paul <brianp@vmware.com> | 2009-01-14 16:42:19 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-01-14 16:49:24 -0700 |
commit | 947d1c5b2a70c0eafa4c408b47607574a2908468 (patch) | |
tree | d7ace9712ef4e69aa74db43d28623e6670bc05c7 /src/mesa/drivers/dri/intel/intel_fbo.c | |
parent | c7f43543af8a0bf95750eb6d332fdede07d104ea (diff) |
i965: asst. fixes, work-arounds for FBOs and render to texture
OpenGL allows mixing and matching depth and stencil renderbuffers in
framebuffer objects while the hardware really only supports interleaved
depth/stencil buffers. This makes for some tricky buffer management.
An extra wrinkle is the situation where the user allocates a 16bpp depth
texture or renderbuffer then tries to render to it along with a stencil
buffer. We'd have to promote the 16bpp Z values to 24-bit Z values and
mix in the stencil values to setup the depth/stencil renderbuffer.
There's no support for that now, so always allocate 32bpp depth textures/
renderbuffers for now.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_fbo.c')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_fbo.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index 93fc84503e..54f2fa5287 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -248,11 +248,18 @@ intel_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb, cpp = 4; break; case GL_DEPTH_COMPONENT16: +#if 0 rb->_ActualFormat = GL_DEPTH_COMPONENT16; rb->DataType = GL_UNSIGNED_SHORT; rb->DepthBits = 16; cpp = 2; break; +#else + /* fall-through. + * 16bpp depth renderbuffer can't be paired with a stencil buffer so + * always used combined depth/stencil format. + */ +#endif case GL_DEPTH_COMPONENT: case GL_DEPTH_COMPONENT24: case GL_DEPTH_COMPONENT32: |