[Mesa-dev] [PATCH 2/5] mesa/dd: Add a function for creating a texture from a buffer object

Jason Ekstrand jason at jlekstrand.net
Thu Jan 8 16:47:14 PST 2015


---
 src/mesa/main/dd.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 2f40915..72c87fe 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -415,6 +415,20 @@ struct dd_function_table {
                             struct gl_texture_object *texObj,
                             struct gl_texture_object *origTexObj);
 
+   /** Sets the given buffer object as the texture's storage.  The given
+    * texture must have target GL_TEXTURE_1D, GL_TEXTURE_2D, or
+    * GL_TEXTURE_RECTANGLE; have only a single level; be immutable; and
+    * must not have any assigned storage.  The format and dimensions of the
+    * gl_texture_object will already be initialized.
+    *
+    * This function is used by the meta PBO texture upload path.
+    */
+   bool (*SetTextureStorageForBufferObject)(struct gl_context *ctx,
+                                            struct gl_texture_object *texObj,
+                                            struct gl_buffer_object *bufferObj,
+                                            uint32_t buffer_offset,
+                                            uint32_t row_stride);
+
    /**
     * Map a renderbuffer into user space.
     * \param mode  bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
-- 
2.2.0



More information about the mesa-dev mailing list