Hi,<br><br>I am proposing to add a pointer to a user buffer in pipe_resource. There are two reasons for this:<br><br>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.<br>

<br>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.<br><br>This will allow to move more driver-specific code to auxiliary/util.<br>

<br><br>diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h<br>index 574a7a8..e2b0b8a 100644<br>--- a/src/gallium/include/pipe/p_state.h<br>+++ b/src/gallium/include/pipe/p_state.h<br>@@ -365,6 +365,8 @@ struct pipe_resource<br>

 <br>    unsigned bind;            /**&lt; bitmask of PIPE_BIND_x */<br>    unsigned flags;           /**&lt; bitmask of PIPE_RESOURCE_FLAG_x */<br>+<br>+   void *user_ptr;           /**&lt; pointer from user_buffer_create */<br>

 };<br> <br> struct pipe_stream_output_state<br><br><br>Please comment.<br><br>Best regards<br>Marek<br>