From fa1a66d7fc4fd7854de7958a48e4992edd154489 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Mon, 5 Nov 2007 18:04:35 +0000 Subject: Supply buffer usage hints to winsys. Winsys driver needs some hints in order to allocate the appropriate kind of memory for the buffer. --- src/mesa/drivers/x11/xm_winsys.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers/x11') diff --git a/src/mesa/drivers/x11/xm_winsys.c b/src/mesa/drivers/x11/xm_winsys.c index 36805437f01..f863cdbc151 100644 --- a/src/mesa/drivers/x11/xm_winsys.c +++ b/src/mesa/drivers/x11/xm_winsys.c @@ -140,7 +140,7 @@ xm_buffer_reference(struct pipe_winsys *pws, static void xm_buffer_data(struct pipe_winsys *pws, struct pipe_buffer_handle *buf, - unsigned size, const void *data ) + unsigned size, const void *data, unsigned usage) { struct xm_buffer *xm_buf = xm_bo(buf); assert(!xm_buf->userBuffer); @@ -265,7 +265,8 @@ xm_region_alloc(struct pipe_winsys *winsys, winsys->buffer_data( winsys, region->buffer, region->pitch * cpp * height, - NULL ); + NULL, + PIPE_BUFFER_USAGE_PIXEL ); return region; } -- cgit v1.2.3