summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-03-03 22:11:56 -0800
committerCorbin Simpson <[email protected]>2009-03-03 22:16:24 -0800
commit60041203d5847de8ab71842a6ce5d33d96cc4930 (patch)
tree84af1958396b95db7d5de189441f8079564cfadf /src/gallium/drivers/r300
parent9e67b0a1745e50fe34efedb0a3191b4a27e10724 (diff)
r300-gallium, radeon-gallium: Continue migration to DRI2 state_tracker, part 2.
Almost there. glxinfo still works, and AFAICT so does trivial/clear.
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r--src/gallium/drivers/r300/r300_texture.c18
-rw-r--r--src/gallium/drivers/r300/r300_texture.h8
-rw-r--r--src/gallium/drivers/r300/r300_winsys.h4
3 files changed, 30 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 8251a597eab..b3425587e38 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -186,3 +186,21 @@ void r300_init_screen_texture_functions(struct pipe_screen* screen)
screen->tex_surface_release = r300_tex_surface_release;
screen->texture_blanket = r300_texture_blanket;
}
+
+boolean r300_get_texture_buffer(struct pipe_texture* texture,
+ struct pipe_buffer** buffer,
+ unsigned* stride)
+{
+ struct r300_texture* tex = (struct r300_texture*)texture;
+ if (!tex) {
+ return FALSE;
+ }
+
+ pipe_buffer_reference(texture->screen, buffer, tex->buffer);
+
+ if (stride) {
+ *stride = tex->stride;
+ }
+
+ return TRUE;
+}
diff --git a/src/gallium/drivers/r300/r300_texture.h b/src/gallium/drivers/r300/r300_texture.h
index 7964229a94f..27f5ea1eb7b 100644
--- a/src/gallium/drivers/r300/r300_texture.h
+++ b/src/gallium/drivers/r300/r300_texture.h
@@ -31,4 +31,12 @@
void r300_init_screen_texture_functions(struct pipe_screen* screen);
+#ifndef R300_WINSYS_H
+
+boolean r300_get_texture_buffer(struct pipe_texture* texture,
+ struct pipe_buffer** buffer,
+ unsigned* stride);
+
+#endif /* R300_WINSYS_H */
+
#endif /* R300_TEXTURE_H */
diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h
index b7341c4f3ad..8c9578de514 100644
--- a/src/gallium/drivers/r300/r300_winsys.h
+++ b/src/gallium/drivers/r300/r300_winsys.h
@@ -92,4 +92,8 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
}
#endif
+boolean r300_get_texture_buffer(struct pipe_texture* texture,
+ struct pipe_buffer** buffer,
+ unsigned* stride);
+
#endif /* R300_WINSYS_H */