summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i965/brw_screen.h
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-10-25 00:02:16 +0100
committerKeith Whitwell <[email protected]>2009-10-25 00:02:16 +0100
commit4dd2f6640b70e2313f8771f7588aa49a861153aa (patch)
treed2cbc2b694839380de8e31a8a72f8c3d8f7c5eb1 /src/gallium/drivers/i965/brw_screen.h
parent4f7931bb3554cb1839adc2044e3abe6d4af8b0b5 (diff)
i965g: more work on compiling, particularly the brw_draw files
Diffstat (limited to 'src/gallium/drivers/i965/brw_screen.h')
-rw-r--r--src/gallium/drivers/i965/brw_screen.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/drivers/i965/brw_screen.h b/src/gallium/drivers/i965/brw_screen.h
index 79d595d0adf..b0be0e1f8a4 100644
--- a/src/gallium/drivers/i965/brw_screen.h
+++ b/src/gallium/drivers/i965/brw_screen.h
@@ -56,6 +56,14 @@ struct brw_transfer
unsigned offset;
};
+struct brw_buffer
+{
+ struct pipe_buffer base;
+ struct brw_winsys_buffer *bo;
+ void *ptr;
+ boolean is_user_buffer;
+};
+
/*
* Cast wrappers
@@ -72,5 +80,19 @@ brw_transfer(struct pipe_transfer *transfer)
return (struct brw_transfer *)transfer;
}
+static INLINE struct brw_buffer *
+brw_buffer(struct pipe_buffer *buffer)
+{
+ return (struct brw_buffer *)buffer;
+}
+
+
+/* Pipe buffer helpers
+ */
+static INLINE boolean
+brw_buffer_is_user_buffer( const struct pipe_buffer *buf )
+{
+ return ((const struct brw_buffer *)buf)->is_user_buffer;
+}
#endif /* BRW_SCREEN_H */