summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_screen.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r300/r300_screen.h')
-rw-r--r--src/gallium/drivers/r300/r300_screen.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_screen.h b/src/gallium/drivers/r300/r300_screen.h
index c6b4b57c3b..58270230e1 100644
--- a/src/gallium/drivers/r300/r300_screen.h
+++ b/src/gallium/drivers/r300/r300_screen.h
@@ -30,6 +30,8 @@
#include <stdio.h>
+struct r300_winsys_screen;
+
struct r300_screen {
/* Parent class */
struct pipe_screen screen;
@@ -44,11 +46,16 @@ struct r300_screen {
};
-/* Convenience cast wrapper. */
+/* Convenience cast wrappers. */
static INLINE struct r300_screen* r300_screen(struct pipe_screen* screen) {
return (struct r300_screen*)screen;
}
+static INLINE struct r300_winsys_screen *
+r300_winsys_screen(struct pipe_screen *screen) {
+ return r300_screen(screen)->rws;
+}
+
/* Debug functionality. */
/**