From 1a840cc5925f52079916feb2c456816a7a91d627 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 12 May 2012 12:56:19 +0200 Subject: gallium/graw: stop using user_buffer_create This is compile-tested. --- src/gallium/auxiliary/util/u_inlines.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/gallium/auxiliary/util/u_inlines.h') 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, -- cgit v1.2.3