Mesa (7.8): meta: Use the DrawBuffer's stencil size
Ian Romanick
idr at kemper.freedesktop.org
Fri Mar 5 16:05:48 PST 2010
Module: Mesa
Branch: 7.8
Commit: 77fc3ef9116fae6b8b53cda78d97c4ff1ec5c171
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=77fc3ef9116fae6b8b53cda78d97c4ff1ec5c171
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Wed Mar 3 17:20:27 2010 -0800
meta: Use the DrawBuffer's stencil size
Previously the code was erroneously using the stencil size of the
context instead of the stencil size of the DrawBuffer. With FBOs
these may be different. As a result, clearing the stencil buffer of
an FBO bound to a context that doesn't have stencil would fail.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/drivers/common/meta.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 8e229bb..b97b760 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -1895,7 +1895,7 @@ _mesa_meta_DrawPixels(GLcontext *ctx,
_mesa_BindProgram(GL_FRAGMENT_PROGRAM_ARB, drawpix->StencilFP);
_mesa_set_enable(ctx, GL_FRAGMENT_PROGRAM_ARB, GL_TRUE);
- for (bit = 0; bit < ctx->Visual.stencilBits; bit++) {
+ for (bit = 0; bit < ctx->DrawBuffer->Visual.stencilBits; bit++) {
const GLuint mask = 1 << bit;
if (mask & origStencilMask) {
_mesa_StencilFunc(GL_ALWAYS, mask, mask);
More information about the mesa-commit
mailing list