diff options
author | Marek Olšák <[email protected]> | 2012-05-12 12:56:19 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-05-12 23:13:45 +0200 |
commit | 1a840cc5925f52079916feb2c456816a7a91d627 (patch) | |
tree | 1d44a4feeddbd623ae08a93a0c94a7ec6a98981d /src/gallium/auxiliary/util/u_inlines.h | |
parent | 685a28fd8a046e8dac02c2c26ab8b169de7a2a29 (diff) |
gallium/graw: stop using user_buffer_create
This is compile-tested.
Diffstat (limited to 'src/gallium/auxiliary/util/u_inlines.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_inlines.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h index b0ba585b9bf..2ec1ccfe9d3 100644 --- a/src/gallium/auxiliary/util/u_inlines.h +++ b/src/gallium/auxiliary/util/u_inlines.h @@ -376,6 +376,19 @@ pipe_buffer_write_nooverlap(struct pipe_context *pipe, 0, 0); } +static INLINE struct pipe_resource * +pipe_buffer_create_with_data(struct pipe_context *pipe, + unsigned bind, + unsigned usage, + unsigned size, + void *ptr) +{ + struct pipe_resource *res = pipe_buffer_create(pipe->screen, + bind, usage, size); + pipe_buffer_write_nooverlap(pipe, res, 0, size, ptr); + return res; +} + static INLINE void pipe_buffer_read(struct pipe_context *pipe, struct pipe_resource *buf, |