[Mesa-dev] Gallium proposal: add a user pointer in pipe_resource
maraeo at gmail.com
Sat Jan 29 15:12:57 PST 2011
I am proposing to add a pointer to a user buffer in pipe_resource. There are
two reasons for this:
1) I would like to have a way to query outside of a driver whether a buffer
is a user buffer. Simply comparing the pointer with NULL would do the trick.
2) I would like to efficiently obtain a pointer to a user buffer outside of
a driver without going through the sequence of functions get_transfer,
transfer_map, transfer_unmap, and transfer_destroy.
This will allow to move more driver-specific code to auxiliary/util.
diff --git a/src/gallium/include/pipe/p_state.h
index 574a7a8..e2b0b8a 100644
@@ -365,6 +365,8 @@ struct pipe_resource
unsigned bind; /**< bitmask of PIPE_BIND_x */
unsigned flags; /**< bitmask of PIPE_RESOURCE_FLAG_x */
+ void *user_ptr; /**< pointer from user_buffer_create */
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mesa-dev