OSDN Git Service

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 bffc8c2..7fb060c 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