From 1a71b50696cc230cd055905a5f9fdbd3fa7c89af Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 14 May 2012 16:52:51 +0200 Subject: fontconfig libX11 mesa xkeyboard-config pixman git update 14 May 2012 --- mesalib/src/gallium/auxiliary/util/u_inlines.h | 37 ++++++++++++++++++++------ 1 file changed, 29 insertions(+), 8 deletions(-) (limited to 'mesalib/src/gallium/auxiliary/util/u_inlines.h') diff --git a/mesalib/src/gallium/auxiliary/util/u_inlines.h b/mesalib/src/gallium/auxiliary/util/u_inlines.h index 49b4531db..2ec153c58 100644 --- a/mesalib/src/gallium/auxiliary/util/u_inlines.h +++ b/mesalib/src/gallium/auxiliary/util/u_inlines.h @@ -233,14 +233,6 @@ pipe_buffer_create( struct pipe_screen *screen, return screen->resource_create(screen, &buffer); } - -static INLINE struct pipe_resource * -pipe_user_buffer_create( struct pipe_screen *screen, void *ptr, unsigned size, - unsigned usage ) -{ - return screen->user_buffer_create(screen, ptr, size, usage); -} - static INLINE void * pipe_buffer_map_range(struct pipe_context *pipe, struct pipe_resource *buffer, @@ -376,6 +368,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, @@ -437,6 +442,22 @@ pipe_transfer_destroy( struct pipe_context *context, context->transfer_destroy(context, transfer); } +static INLINE void +pipe_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index, + struct pipe_resource *buf) +{ + if (buf) { + struct pipe_constant_buffer cb; + cb.buffer = buf; + cb.buffer_offset = 0; + cb.buffer_size = buf->width0; + cb.user_buffer = NULL; + pipe->set_constant_buffer(pipe, shader, index, &cb); + } else { + pipe->set_constant_buffer(pipe, shader, index, NULL); + } +} + static INLINE boolean util_get_offset( const struct pipe_rasterizer_state *templ, -- cgit v1.2.3