aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_context.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/swrast/s_context.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/swrast/s_context.c')
-rw-r--r--mesalib/src/mesa/swrast/s_context.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/mesalib/src/mesa/swrast/s_context.c b/mesalib/src/mesa/swrast/s_context.c
index 924612578..6850a09f3 100644
--- a/mesalib/src/mesa/swrast/s_context.c
+++ b/mesalib/src/mesa/swrast/s_context.c
@@ -36,6 +36,7 @@
#include "swrast.h"
#include "s_blend.h"
#include "s_context.h"
+#include "s_depthstencil.h"
#include "s_lines.h"
#include "s_points.h"
#include "s_span.h"
@@ -545,6 +546,25 @@ _swrast_update_active_attribs(struct gl_context *ctx)
}
+/**
+ * Update the depth/stencil renderbuffers, if needed.
+ */
+static void
+_swrast_update_depth_stencil(struct gl_context *ctx)
+{
+ struct gl_framebuffer *drawFb = ctx->DrawBuffer;
+ struct gl_framebuffer *readFb = ctx->ReadBuffer;
+
+ _swrast_update_depth_buffer(ctx, drawFb);
+ _swrast_update_stencil_buffer(ctx, drawFb);
+
+ if (readFb != drawFb) {
+ _swrast_update_depth_buffer(ctx, readFb);
+ _swrast_update_stencil_buffer(ctx, readFb);
+ }
+}
+
+
void
_swrast_validate_derived( struct gl_context *ctx )
{
@@ -589,6 +609,9 @@ _swrast_validate_derived( struct gl_context *ctx )
_NEW_TEXTURE))
_swrast_update_specular_vertex_add(ctx);
+ if (swrast->NewState & _NEW_BUFFERS)
+ _swrast_update_depth_stencil(ctx);
+
swrast->NewState = 0;
swrast->StateChanges = 0;
swrast->InvalidateState = _swrast_invalidate_state;