gallium: New pipe_screen interface to overlay a texture on existing memory.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 6 May 2008 05:57:18 +0000 (14:57 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 6 May 2008 05:57:18 +0000 (14:57 +0900)
src/gallium/include/pipe/p_screen.h

index c080579c26e8462b24da729a07f1065239507058..cc8430dae1695c90295bf3b0e85332660f9902f1 100644 (file)
@@ -89,6 +89,18 @@ struct pipe_screen {
    struct pipe_texture * (*texture_create)(struct pipe_screen *,
                                            const struct pipe_texture *templat);
 
+   /**
+    * Create a new texture object, using the given template info, but on top of 
+    * existing memory.
+    * 
+    * It is assumed that the buffer data is layed out according to the expected
+    * by the hardware. NULL will be returned if any inconsistency is found.  
+    */
+   struct pipe_texture * (*texture_blanket)(struct pipe_screen *,
+                                            const struct pipe_texture *templat,
+                                            const unsigned *pitch,
+                                            struct pipe_buffer *buffer);
+
    void (*texture_release)(struct pipe_screen *,
                            struct pipe_texture **pt);