From a41a253ce3b667fc8ad1bfbafce9e3e633667383 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Tue, 11 Aug 2009 18:33:58 +0100 Subject: gallium: Add texture usage information to surface_buffer_create We need aditional meta data about the usage of the surface in softpipe because we need to be able tell the diffrence between PRIMARY and DISPLAY_TARGET surfaces. --- src/gallium/drivers/softpipe/sp_texture.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gallium/drivers/softpipe') diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c index b7e52af032..70f0932431 100644 --- a/src/gallium/drivers/softpipe/sp_texture.c +++ b/src/gallium/drivers/softpipe/sp_texture.c @@ -95,6 +95,7 @@ softpipe_displaytarget_layout(struct pipe_screen *screen, { unsigned usage = (PIPE_BUFFER_USAGE_CPU_READ_WRITE | PIPE_BUFFER_USAGE_GPU_READ_WRITE); + unsigned tex_usage = spt->base.tex_usage; spt->base.nblocksx[0] = pf_get_nblocksx(&spt->base.block, spt->base.width[0]); spt->base.nblocksy[0] = pf_get_nblocksy(&spt->base.block, spt->base.height[0]); @@ -104,6 +105,7 @@ softpipe_displaytarget_layout(struct pipe_screen *screen, spt->base.height[0], spt->base.format, usage, + tex_usage, &spt->stride[0]); return spt->buffer != NULL; -- cgit v1.2.3