summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_texture.c
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-04-23 12:57:46 +0100
committerMichel Dänzer <daenzer@vmware.com>2009-04-23 12:57:46 +0100
commit13cb8264d81f09ce046c73fd751596572d13512e (patch)
tree61d663c2871c386d8bfca075a2387108d7e9a012 /src/gallium/drivers/softpipe/sp_texture.c
parent49ba80dff335226a54dae60477b256384005b393 (diff)
gallium/intel/gem: Use softpipe rather than i915simple if INTEL_SOFTPIPE is set.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_texture.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_texture.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c
index c0113c47ad..9e19745889 100644
--- a/src/gallium/drivers/softpipe/sp_texture.c
+++ b/src/gallium/drivers/softpipe/sp_texture.c
@@ -399,3 +399,22 @@ softpipe_init_screen_texture_funcs(struct pipe_screen *screen)
screen->transfer_map = softpipe_transfer_map;
screen->transfer_unmap = softpipe_transfer_unmap;
}
+
+
+boolean
+softpipe_get_texture_buffer( struct pipe_texture *texture,
+ struct pipe_buffer **buf,
+ unsigned *stride )
+{
+ struct softpipe_texture *tex = (struct softpipe_texture *)texture;
+
+ if (!tex)
+ return FALSE;
+
+ pipe_buffer_reference(buf, tex->buffer);
+
+ if (stride)
+ *stride = tex->stride[0];
+
+ return TRUE;
+}