summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_clear.c
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2014-03-31 14:17:08 +0200
committerChris Forbes <[email protected]>2014-04-13 12:28:25 +1200
commita5957f7bc5e3618243f03cf9459394f9a83e5971 (patch)
tree0caeedd6f62d536dee9e5000a3a9fae43d0b9e49 /src/mesa/drivers/dri/i965/brw_clear.c
parent26224d3e00cb00e45145d4fd22cd7495eecad9e1 (diff)
i965: glClearBuffer() should only clear a single buffer.
glClearBuffer() is currently clearing all active draw color buffers (all buffers that have not been set to GL_NONE when calling glDrawBuffers) instead of only clearing the one it receives as parameter. Altough brw_clear() receives a bit mask indicating the color buffers that should be cleared, this mask is ignored when calling brw_blorp_clear_color(). This was breaking the 'fbo-drawbuffers-none glClearBuffer' piglit test. The patch provides the bit mask to brw_blorp_clear_color() so it can limit clearing to the color buffers present in the mask. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76832 Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_clear.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_clear.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clear.c b/src/mesa/drivers/dri/i965/brw_clear.c
index a487a71838f..ee8f54fec54 100644
--- a/src/mesa/drivers/dri/i965/brw_clear.c
+++ b/src/mesa/drivers/dri/i965/brw_clear.c
@@ -245,7 +245,7 @@ brw_clear(struct gl_context *ctx, GLbitfield mask)
/* BLORP is currently only supported on Gen6+. */
if (brw->gen >= 6 && brw->gen < 8) {
if (mask & BUFFER_BITS_COLOR) {
- if (brw_blorp_clear_color(brw, fb, partial_clear)) {
+ if (brw_blorp_clear_color(brw, fb, mask, partial_clear)) {
debug_mask("blorp color", mask & BUFFER_BITS_COLOR);
mask &= ~BUFFER_BITS_COLOR;
}