summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/i915simple/i915_texture.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-03-02 13:27:46 +0000
committerJosé Fonseca <jfonseca@vmware.com>2009-03-02 13:27:46 +0000
commit97a1fd158c9acfaa3a8deda7eb5bf0b253e85c15 (patch)
tree37e6c11507c1ef044aa8f0ee009136bb1d8b5bbc /src/gallium/drivers/i915simple/i915_texture.c
parent60e5fe65067da76dea816535bec1e9073adc0ba7 (diff)
parentb70f344e223fc10df8df08a6d82a813505225712 (diff)
Merge commit 'origin/master' into gallium-map-range
Diffstat (limited to 'src/gallium/drivers/i915simple/i915_texture.c')
-rw-r--r--src/gallium/drivers/i915simple/i915_texture.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/drivers/i915simple/i915_texture.c b/src/gallium/drivers/i915simple/i915_texture.c
index 957726523f..6aead3e75e 100644
--- a/src/gallium/drivers/i915simple/i915_texture.c
+++ b/src/gallium/drivers/i915simple/i915_texture.c
@@ -42,6 +42,7 @@
#include "i915_texture.h"
#include "i915_debug.h"
#include "i915_screen.h"
+#include "i915_winsys.h"
/*
* Helper function and arrays
@@ -765,3 +766,20 @@ i915_init_screen_texture_functions(struct pipe_screen *screen)
screen->texture_blanket = i915_texture_blanket;
screen->tex_surface_release = i915_tex_surface_release;
}
+
+boolean i915_get_texture_buffer( struct pipe_texture *texture,
+ struct pipe_buffer **buf,
+ unsigned *stride )
+{
+ struct i915_texture *tex = (struct i915_texture *)texture;
+
+ if (!tex)
+ return FALSE;
+
+ pipe_buffer_reference(texture->screen, buf, tex->buffer);
+
+ if (stride)
+ *stride = tex->stride;
+
+ return TRUE;
+}