[Mesa-dev] [PATCH 1/3] svga: fix clearing for null color buffers

Brian Paul brianp at vmware.com
Thu Jan 16 18:45:52 PST 2014


Fixes piglit "fbo-drawbuffers-none glClear" test.
---
 src/gallium/drivers/svga/svga_pipe_clear.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_pipe_clear.c b/src/gallium/drivers/svga/svga_pipe_clear.c
index 5deebb2..21869e9 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) {
-- 
1.8.3.2



More information about the mesa-dev mailing list