summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2009-08-11 18:33:58 +0100
committerJakob Bornecrantz <[email protected]>2009-08-11 18:34:43 +0100
commita41a253ce3b667fc8ad1bfbafce9e3e633667383 (patch)
tree2a9b3c733bee3ef41bd1b13ddfabeaf2e3eaf81d /src/gallium/drivers/softpipe
parent7013a4dfb84ce730f093600326fa158cdb1563ff (diff)
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.
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r--src/gallium/drivers/softpipe/sp_texture.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c
index b7e52af0322..70f09324311 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;