svga: add svga_surface_const() cast wrapper
authorBrian Paul <brianp@vmware.com>
Wed, 13 Jun 2012 17:41:03 +0000 (11:41 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 14 Jun 2012 14:20:40 +0000 (08:20 -0600)
src/gallium/drivers/svga/svga_surface.h

index bffc8c22c60d946d0a9483ab8034d13941228c83..7fb060c5097b8f7fdf9bb46f6a62fea30ec51013 100644 (file)
@@ -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