summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/p_state.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/p_state.h')
-rw-r--r--src/mesa/pipe/p_state.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/mesa/pipe/p_state.h b/src/mesa/pipe/p_state.h
index 146a479cf3..83ca43f678 100644
--- a/src/mesa/pipe/p_state.h
+++ b/src/mesa/pipe/p_state.h
@@ -60,8 +60,21 @@
struct pipe_surface;
struct pipe_winsys;
-/* opaque type */
-struct pipe_buffer_handle;
+
+
+/**
+ * The driver will certainly subclass this to include actual memory
+ * management information.
+ */
+struct pipe_buffer {
+ unsigned alignment;
+ unsigned usage;
+ unsigned size;
+
+ /** Reference count */
+ unsigned refcount;
+};
+
@@ -129,7 +142,7 @@ struct pipe_clip_state {
* Constants for vertex/fragment shaders
*/
struct pipe_constant_buffer {
- struct pipe_buffer_handle *buffer;
+ struct pipe_buffer *buffer;
unsigned size; /** in bytes */
};
@@ -240,7 +253,7 @@ struct pipe_sampler_state
*/
struct pipe_surface
{
- struct pipe_buffer_handle *buffer; /**< driver private buffer handle */
+ struct pipe_buffer *buffer; /**< driver private buffer handle */
enum pipe_format format; /**< PIPE_FORMAT_x */
unsigned status; /**< PIPE_SURFACE_STATUS_x */
unsigned clear_value; /**< may be temporary */
@@ -290,7 +303,7 @@ struct pipe_vertex_buffer
unsigned pitch:11; /**< stride to same attrib in next vertex, in bytes */
unsigned max_index; /**< number of vertices in this buffer */
unsigned buffer_offset; /**< offset to start of data in buffer, in bytes */
- struct pipe_buffer_handle *buffer; /**< the actual buffer */
+ struct pipe_buffer *buffer; /**< the actual buffer */
};