summaryrefslogtreecommitdiffstats
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.h53
1 files changed, 17 insertions, 36 deletions
diff --git a/src/mesa/pipe/p_state.h b/src/mesa/pipe/p_state.h
index d81c3f17782..0767fc2fcb5 100644
--- a/src/mesa/pipe/p_state.h
+++ b/src/mesa/pipe/p_state.h
@@ -233,51 +233,17 @@ struct pipe_sampler_state
/***
- *** Non-state Objects
+ *** Resource Objects
***/
-/**
- * A mappable buffer (vertex data, pixel data, etc)
- * XXX replace with "intel_region".
- */
-struct pipe_buffer
-{
- void (*buffer_data)(struct pipe_buffer *pb, GLuint size, const void *src);
- void (*buffer_sub_data)(struct pipe_buffer *pb, GLuint offset, GLuint size,
- const void *src);
- void *(*map)(struct pipe_buffer *pb, GLuint access_mode);
- void (*unmap)(struct pipe_buffer *pb);
- GLubyte *ptr; /**< address, only valid while mapped */
- GLuint mode; /**< PIPE_MAP_x, only valid while mapped */
-};
-
-
-/**
- * 2D surface.
- * May be a renderbuffer, texture mipmap level, etc.
- */
-struct pipe_surface
-{
- struct pipe_buffer buffer; /**< surfaces can be mapped */
- GLuint format:5; /**< PIPE_FORMAT_x */
- GLuint width, height;
-
- GLint stride, cpp;
- GLubyte *ptr; /**< only valid while mapped, may not equal buffer->ptr */
-
- void *rb; /**< Ptr back to renderbuffer (temporary?) */
-
- void (*resize)(struct pipe_surface *ps, GLuint width, GLuint height);
-};
-
-
struct _DriBufferObject;
struct intel_buffer_object;
struct pipe_region
{
struct _DriBufferObject *buffer; /**< buffer manager's buffer ID */
+
GLuint refcount; /**< Reference count for region */
GLuint cpp; /**< bytes per pixel */
GLuint pitch; /**< in pixels */
@@ -290,6 +256,21 @@ struct pipe_region
struct intel_buffer_object *pbo; /* zero-copy uploads */
};
+
+/**
+ * 2D surface.
+ * May be a renderbuffer, texture mipmap level, etc.
+ */
+struct pipe_surface
+{
+ struct pipe_region *region;
+ GLuint format:5; /**< PIPE_FORMAT_x */
+ GLuint width, height;
+
+ void *rb; /**< Ptr back to renderbuffer (temporary?) */
+};
+
+
/**
* Texture object.
* Mipmap levels, cube faces, 3D slices can be accessed as surfaces.