summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/p_state.h
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-07-31 15:44:50 -0600
committerBrian <[email protected]>2007-07-31 15:44:50 -0600
commit2f245bce420c7a6c6928c4927d0f9a5701cde17f (patch)
tree452d9fc0bf376477f1eb69ee085171f5b6792282 /src/mesa/pipe/p_state.h
parent33891b64a9a00ddfd7b9c57a2020e83449af62e5 (diff)
Lift region-related functions up to the pipe interface.
Some of these functions probably should be driver-private. Note: intel_buffer_object is in p_state.h and should be fixed/removed. There are just a few i915 dependencies in intel_region.c
Diffstat (limited to 'src/mesa/pipe/p_state.h')
-rw-r--r--src/mesa/pipe/p_state.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/pipe/p_state.h b/src/mesa/pipe/p_state.h
index 9973a7b8dd7..d81c3f17782 100644
--- a/src/mesa/pipe/p_state.h
+++ b/src/mesa/pipe/p_state.h
@@ -272,6 +272,24 @@ struct pipe_surface
};
+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 */
+ GLuint height; /**< in pixels */
+ GLubyte *map; /**< only non-NULL when region is actually mapped */
+ GLuint map_refcount; /**< Reference count for mapping */
+
+ GLuint draw_offset; /**< Offset of drawing address within the region */
+
+ struct intel_buffer_object *pbo; /* zero-copy uploads */
+};
+
/**
* Texture object.
* Mipmap levels, cube faces, 3D slices can be accessed as surfaces.