[Mesa-dev] [PATCH 2/2] svga: fix crash when clearing null color buffer
Jose Fonseca
jfonseca at vmware.com
Fri Jan 17 05:46:28 PST 2014
----- Original Message -----
> Fixes regression since 9baa45f78b8ca7d66280e36009b6a685055d7cd6
> but some of the piglit fbo-drawbuffers-none tests still don't
> pass.
> ---
> src/gallium/drivers/svga/svga_pipe_clear.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/src/gallium/drivers/svga/svga_pipe_clear.c
> b/src/gallium/drivers/svga/svga_pipe_clear.c
> index 47f6258..ebdce3b 100644
> --- a/src/gallium/drivers/svga/svga_pipe_clear.c
> +++ b/src/gallium/drivers/svga/svga_pipe_clear.c
> @@ -111,9 +111,13 @@ svga_clear(struct pipe_context *pipe, unsigned buffers,
> struct svga_context *svga = svga_context( pipe );
> enum pipe_error ret;
>
> - if (buffers & PIPE_CLEAR_COLOR)
> - SVGA_DBG(DEBUG_DMA, "clear sid %p\n",
> - svga_surface(svga->curr.framebuffer.cbufs[0])->handle);
> + if (buffers & PIPE_CLEAR_COLOR) {
> + struct svga_winsys_handle *h = NULL;
> + if (svga->curr.framebuffer.cbufs[0]) {
> + h = svga_surface(svga->curr.framebuffer.cbufs[0])->handle;
> + }
> + SVGA_DBG(DEBUG_DMA, "clear sid %p\n", h);
> + }
>
> /* flush any queued prims (don't want them to appear after the clear!) */
> svga_hwtnl_flush_retry(svga);
> --
> 1.8.3.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://urldefense.proofpoint.com/v1/url?u=http://lists.freedesktop.org/mailman/listinfo/mesa-dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=NMr9uy2iTjWVixC0wOcYCWEIYhfo80qKwRgdodpoDzA%3D%0A&m=OUomIkBN13xAFvxxWHODUEiG1q28%2B7LMvw3w3IuPljQ%3D%0A&s=10d5e6f10f13a2244c8a47dd8298e9767e20c8236c5f28932cb1fcc82fcbe50c
>
Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
More information about the mesa-dev
mailing list