diff options
author | Ian Romanick <[email protected]> | 2010-03-03 17:20:27 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-03-05 16:04:59 -0800 |
commit | 77fc3ef9116fae6b8b53cda78d97c4ff1ec5c171 (patch) | |
tree | 7d63f7b91ad6bb2f46391fa1f0e1be777a789ab0 /src/mesa/drivers/common | |
parent | 66c0abba6ba89d326555389d9539894402303286 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common')
-rw-r--r-- | 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 8e229bbe388..b97b760f181 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); |