diff options
author | marha <marha@users.sourceforge.net> | 2011-12-14 14:08:20 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-12-14 14:08:20 +0100 |
commit | 7c06219c5953076ef3236b6a8959b99329c77ee9 (patch) | |
tree | c4b00bb9d592afcdffdb3e98c7c7320e29488adb /mesalib/src/mesa/swrast/s_context.c | |
parent | 2b5652fc7742c5ac57aca701214b046626a729e9 (diff) | |
parent | 53d28537755790ee4625dc16f560cad5aa93f56b (diff) | |
download | vcxsrv-7c06219c5953076ef3236b6a8959b99329c77ee9.tar.gz vcxsrv-7c06219c5953076ef3236b6a8959b99329c77ee9.tar.bz2 vcxsrv-7c06219c5953076ef3236b6a8959b99329c77ee9.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/mapi/glapi/gen/EXT_gpu_shader4.xml
mesalib/src/mapi/glapi/gen/glX_proto_recv.py
mesalib/src/mapi/glapi/gen/glX_proto_size.py
mesalib/src/mapi/glapi/gen/gl_gentable.py
mesalib/src/mapi/glapi/gen/gl_table.py
Diffstat (limited to 'mesalib/src/mesa/swrast/s_context.c')
-rw-r--r-- | mesalib/src/mesa/swrast/s_context.c | 23 |
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; |