diff options
author | Jason Ekstrand <[email protected]> | 2015-01-07 21:13:15 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-01-22 10:21:07 -0800 |
commit | 3298b1235a303ad1fa261c52b22174430b2e90ff (patch) | |
tree | 2d8695a5e9713d2e52b8538d5b1176dc2486ead1 | |
parent | adc8cdfa351240f1ce28b677e1be79a30a36b594 (diff) |
mesa/dd: Add a function for creating a texture from a buffer object
Reviewed-by: Neil Roberts <[email protected]>
-rw-r--r-- | src/mesa/main/dd.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 2f40915d91f..6883e1808f9 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -415,6 +415,22 @@ 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, + * GL_TEXTURE_RECTANGLE, and GL_TEXTURE_2D_ARRAY; have only a single + * mipmap 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, + bool read_only); + /** * Map a renderbuffer into user space. * \param mode bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and |