Mesa (master): svga: add svga_surface_const() cast wrapper

Brian Paul brianp at kemper.freedesktop.org
Thu Jun 14 14:32:50 UTC 2012


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

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Jun 13 11:41:03 2012 -0600

svga: add svga_surface_const() cast wrapper

---

 src/gallium/drivers/svga/svga_surface.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_surface.h b/src/gallium/drivers/svga/svga_surface.h
index bffc8c2..7fb060c 100644
--- a/src/gallium/drivers/svga/svga_surface.h
+++ b/src/gallium/drivers/svga/svga_surface.h
@@ -91,4 +91,12 @@ svga_surface(struct pipe_surface *surface)
    return (struct svga_surface *)surface;
 }
 
+
+static INLINE const struct svga_surface *
+svga_surface_const(const struct pipe_surface *surface)
+{
+   assert(surface);
+   return (const struct svga_surface *)surface;
+}
+
 #endif




More information about the mesa-commit mailing list