summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2007-11-05 18:04:35 +0000
committerJosé Fonseca <[email protected]>2007-11-06 14:49:38 +0000
commitfa1a66d7fc4fd7854de7958a48e4992edd154489 (patch)
treece48a896ebbef8b09ee363774cdfdf86dfb52da6 /src/mesa/drivers
parent4f79dbd5aa6b8a955ac9dcc43cf0852acd89a320 (diff)
Supply buffer usage hints to winsys.
Winsys driver needs some hints in order to allocate the appropriate kind of memory for the buffer.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c6
-rw-r--r--src/mesa/drivers/x11/xm_winsys.c5
2 files changed, 7 insertions, 4 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 af05a3398c8..cc76a40a5a8 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c
@@ -107,7 +107,8 @@ intel_buffer_reference(struct pipe_winsys *sws,
*/
static void intel_buffer_data(struct pipe_winsys *sws,
struct pipe_buffer_handle *buf,
- unsigned size, const void *data )
+ unsigned size, const void *data,
+ unsigned usage )
{
struct intel_context *intel = intel_pipe_winsys(sws)->intel;
@@ -229,7 +230,8 @@ intel_i915_region_alloc(struct pipe_winsys *winsys,
winsys->buffer_data( winsys,
region->buffer,
pitch * cpp * height,
- NULL );
+ NULL,
+ PIPE_BUFFER_USAGE_PIXEL );
return region;
}
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;
}