Mesa (master): svga: fix another pipe_reference strict aliasing violation

Roland Scheidegger sroland at kemper.freedesktop.org
Tue Dec 8 18:28:44 UTC 2009


Module: Mesa
Branch: master
Commit: c977dd9c7716b0a086eeb0c07f2da148065c3b18
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c977dd9c7716b0a086eeb0c07f2da148065c3b18

Author: Roland Scheidegger <sroland at vmware.com>
Date:   Fri Dec  4 18:23:35 2009 +0100

svga: fix another pipe_reference strict aliasing violation

---

 src/gallium/drivers/svga/svga_screen_buffer.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_screen_buffer.c b/src/gallium/drivers/svga/svga_screen_buffer.c
index 1f8a889..58a1aba 100644
--- a/src/gallium/drivers/svga/svga_screen_buffer.c
+++ b/src/gallium/drivers/svga/svga_screen_buffer.c
@@ -356,7 +356,8 @@ svga_buffer_upload_flush(struct svga_context *svga,
    sbuf->hw.boxes = NULL;
 
    /* Decrement reference count */
-   pipe_buffer_reference((struct pipe_buffer **)&sbuf, NULL);
+   pipe_reference(&(sbuf->base.reference), NULL);
+   sbuf = NULL;
 }
 
 




More information about the mesa-commit mailing list