diff options
author | Brian <[email protected]> | 2007-10-11 09:10:43 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-10-11 09:10:43 -0600 |
commit | 98e638aa8df9f5b789b68a7a742666a4b06b6cb3 (patch) | |
tree | acf167fad39b583ee5e34a28a704ddb0907b3adf /src/mesa | |
parent | cdc156d52f4ac33898b4a0e4930a1a9ebe3c81cf (diff) |
implement intel_user_buffer_create()
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c b/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c index 2b2731446d2..72fb24acbf3 100644 --- a/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c +++ b/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c @@ -151,6 +151,21 @@ intel_buffer_create(struct pipe_winsys *sws, } +static struct pipe_buffer_handle * +intel_user_buffer_create(struct pipe_winsys *sws, void *ptr, unsigned bytes) +{ + struct intel_context *intel = intel_pipe_winsys(sws)->intel; + struct _DriBufferObject *buffer; + + LOCK_HARDWARE( intel ); + driGenUserBuffer( intel->intelScreen->regionPool, + "pipe user buffer", &buffer, ptr, bytes); + UNLOCK_HARDWARE( intel ); + + return pipe_bo(buffer); +} + + static void intel_wait_idle( struct pipe_winsys *sws ) { struct intel_context *intel = intel_pipe_winsys(sws)->intel; @@ -206,6 +221,7 @@ intel_create_pipe_winsys( struct intel_context *intel ) * that rendering be done to an appropriate _DriBufferObject. */ iws->winsys.buffer_create = intel_buffer_create; + iws->winsys.user_buffer_create = intel_user_buffer_create; iws->winsys.buffer_map = intel_buffer_map; iws->winsys.buffer_unmap = intel_buffer_unmap; iws->winsys.buffer_reference = intel_buffer_reference; |