From f6bc7d658677cd7750575147a6c50d2b681b6e35 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 16 Jan 2014 18:01:57 -0800 Subject: svga: fix clearing for null color buffers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes piglit "fbo-drawbuffers-none glClear" test. Reviewed-by: José Fonseca --- src/gallium/drivers/svga/svga_pipe_clear.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/svga/svga_pipe_clear.c b/src/gallium/drivers/svga/svga_pipe_clear.c index 5deebb2bc9f..21869e9d6d0 100644 --- a/src/gallium/drivers/svga/svga_pipe_clear.c +++ b/src/gallium/drivers/svga/svga_pipe_clear.c @@ -59,12 +59,12 @@ try_clear(struct svga_context *svga, } } - if ((buffers & PIPE_CLEAR_COLOR) && fb->cbufs[0]) { + if (buffers & PIPE_CLEAR_COLOR) { flags |= SVGA3D_CLEAR_COLOR; util_pack_color(color->f, PIPE_FORMAT_B8G8R8A8_UNORM, &uc); - rect.w = fb->cbufs[0]->width; - rect.h = fb->cbufs[0]->height; + rect.w = fb->width; + rect.h = fb->height; } if ((buffers & PIPE_CLEAR_DEPTHSTENCIL) && fb->zsbuf) { -- cgit v1.2.3