aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/framebuffer.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-12-13 15:54:46 +0100
committermarha <marha@users.sourceforge.net>2011-12-13 15:54:46 +0100
commitb9c84e8e3433d8804b99ec82065ec1e920469d87 (patch)
tree544149b4c639f53adfc1a9a1d5ba91380adfe910 /mesalib/src/mesa/main/framebuffer.c
parent5efb0a5e19b75137b7294b27f4e7878aeb8f0927 (diff)
downloadvcxsrv-b9c84e8e3433d8804b99ec82065ec1e920469d87.tar.gz
vcxsrv-b9c84e8e3433d8804b99ec82065ec1e920469d87.tar.bz2
vcxsrv-b9c84e8e3433d8804b99ec82065ec1e920469d87.zip
git update pixman mesa 13 dec 2011
Diffstat (limited to 'mesalib/src/mesa/main/framebuffer.c')
-rw-r--r--mesalib/src/mesa/main/framebuffer.c95
1 files changed, 0 insertions, 95 deletions
diff --git a/mesalib/src/mesa/main/framebuffer.c b/mesalib/src/mesa/main/framebuffer.c
index e30f31a39..6d5e4524a 100644
--- a/mesalib/src/mesa/main/framebuffer.c
+++ b/mesalib/src/mesa/main/framebuffer.c
@@ -34,7 +34,6 @@
#include "imports.h"
#include "buffers.h"
#include "context.h"
-#include "depthstencil.h"
#include "enums.h"
#include "formats.h"
#include "macros.h"
@@ -307,24 +306,6 @@ _mesa_resize_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
}
}
- if (fb->_DepthBuffer) {
- struct gl_renderbuffer *rb = fb->_DepthBuffer;
- if (rb->Width != width || rb->Height != height) {
- if (!rb->AllocStorage(ctx, rb, rb->InternalFormat, width, height)) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "Resizing framebuffer");
- }
- }
- }
-
- if (fb->_StencilBuffer) {
- struct gl_renderbuffer *rb = fb->_StencilBuffer;
- if (rb->Width != width || rb->Height != height) {
- if (!rb->AllocStorage(ctx, rb, rb->InternalFormat, width, height)) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "Resizing framebuffer");
- }
- }
- }
-
fb->Width = width;
fb->Height = height;
@@ -600,80 +581,6 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx,
}
-/**
- * Update the framebuffer's _DepthBuffer field using the renderbuffer
- * found at the given attachment index.
- *
- * If that attachment points to a combined GL_DEPTH_STENCIL renderbuffer,
- * create and install a depth wrapper/adaptor.
- *
- * \param fb the framebuffer whose _DepthBuffer field to update
- */
-static void
-update_depth_buffer(struct gl_context *ctx, struct gl_framebuffer *fb)
-{
- struct gl_renderbuffer *depthRb =
- fb->Attachment[BUFFER_DEPTH].Renderbuffer;
-
- if (depthRb && _mesa_is_format_packed_depth_stencil(depthRb->Format)) {
- /* The attached depth buffer is a GL_DEPTH_STENCIL renderbuffer */
- if (!fb->_DepthBuffer
- || fb->_DepthBuffer->Wrapped != depthRb
- || _mesa_get_format_base_format(fb->_DepthBuffer->Format) != GL_DEPTH_COMPONENT) {
- /* need to update wrapper */
- struct gl_renderbuffer *wrapper;
-
- if (depthRb->Format == MESA_FORMAT_Z32_FLOAT_X24S8) {
- wrapper = _mesa_new_z32f_renderbuffer_wrapper(ctx, depthRb);
- }
- else {
- wrapper = _mesa_new_z24_renderbuffer_wrapper(ctx, depthRb);
- }
- _mesa_reference_renderbuffer(&fb->_DepthBuffer, wrapper);
- ASSERT(fb->_DepthBuffer->Wrapped == depthRb);
- }
- }
- else {
- /* depthRb may be null */
- _mesa_reference_renderbuffer(&fb->_DepthBuffer, depthRb);
- }
-}
-
-
-/**
- * Update the framebuffer's _StencilBuffer field using the renderbuffer
- * found at the given attachment index.
- *
- * If that attachment points to a combined GL_DEPTH_STENCIL renderbuffer,
- * create and install a stencil wrapper/adaptor.
- *
- * \param fb the framebuffer whose _StencilBuffer field to update
- */
-static void
-update_stencil_buffer(struct gl_context *ctx, struct gl_framebuffer *fb)
-{
- struct gl_renderbuffer *stencilRb =
- fb->Attachment[BUFFER_STENCIL].Renderbuffer;
-
- if (stencilRb && _mesa_is_format_packed_depth_stencil(stencilRb->Format)) {
- /* The attached stencil buffer is a GL_DEPTH_STENCIL renderbuffer */
- if (!fb->_StencilBuffer
- || fb->_StencilBuffer->Wrapped != stencilRb
- || _mesa_get_format_base_format(fb->_StencilBuffer->Format) != GL_STENCIL_INDEX) {
- /* need to update wrapper */
- struct gl_renderbuffer *wrapper
- = _mesa_new_s8_renderbuffer_wrapper(ctx, stencilRb);
- _mesa_reference_renderbuffer(&fb->_StencilBuffer, wrapper);
- ASSERT(fb->_StencilBuffer->Wrapped == stencilRb);
- }
- }
- else {
- /* stencilRb may be null */
- _mesa_reference_renderbuffer(&fb->_StencilBuffer, stencilRb);
- }
-}
-
-
/*
* Example DrawBuffers scenarios:
*
@@ -812,8 +719,6 @@ update_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
*/
update_color_draw_buffers(ctx, fb);
update_color_read_buffer(ctx, fb);
- update_depth_buffer(ctx, fb);
- update_stencil_buffer(ctx, fb);
compute_depth_max(fb);
}