summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_regions.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-12-12 10:25:19 -0800
committerEric Anholt <eric@anholt.net>2007-12-12 11:52:10 -0800
commit7c71ef3a3d0cf2620525f468960cdc76a0fb0d33 (patch)
tree7b7e071b5c854bc5b737401990b54e488febf650 /src/mesa/drivers/dri/intel/intel_regions.h
parent00e10a1385bfd376f5f45ad94e3543ac87f15de8 (diff)
[intel] Move bufmgr back to context instead of screen, fixing glthreads.
Putting the bufmgr in the screen is not thread-safe since the emit_reloc changes. It also led to a significant performance hit from pthread usage for the attempted thread-safety (up to 12% of a cpu spent on refcounting protection in single-threaded 965). The motivation had been to allow multi-context bufmgr sharing in classic mode, but it wasn't worth the cost.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_regions.h')
-rw-r--r--src/mesa/drivers/dri/intel/intel_regions.h47
1 files changed, 14 insertions, 33 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_regions.h b/src/mesa/drivers/dri/intel/intel_regions.h
index a0d9a9005f..1975d729e4 100644
--- a/src/mesa/drivers/dri/intel/intel_regions.h
+++ b/src/mesa/drivers/dri/intel/intel_regions.h
@@ -29,7 +29,7 @@
#define INTEL_REGIONS_H
#include "mtypes.h"
-#include "intel_screen.h"
+#include "dri_bufmgr.h"
struct intel_context;
struct intel_buffer_object;
@@ -62,7 +62,7 @@ struct intel_region
/* Allocate a refcounted region. Pointers to regions should only be
* copied by calling intel_reference_region().
*/
-struct intel_region *intel_region_alloc(intelScreenPrivate *intelScreen,
+struct intel_region *intel_region_alloc(struct intel_context *intel,
GLuint cpp,
GLuint pitch, GLuint height);
@@ -71,41 +71,22 @@ void intel_region_reference(struct intel_region **dst,
void intel_region_release(struct intel_region **ib);
-extern struct intel_region
-*intel_region_create_static(intelScreenPrivate *intelScreen,
- const char *name,
- GLuint mem_type,
- unsigned int bo_handle,
- GLuint offset,
- void *virtual,
- GLuint cpp,
- GLuint pitch, GLuint height, GLboolean tiled);
-extern void
-intel_region_update_static(intelScreenPrivate *intelScreen,
- struct intel_region *region,
- const char *name,
- GLuint mem_type,
- unsigned int bo_handle,
- GLuint offset,
- void *virtual,
- GLuint cpp, GLuint pitch, GLuint height,
- GLboolean tiled);
-
-
-void intel_region_idle(intelScreenPrivate *intelScreen,
+void intel_recreate_static_regions(struct intel_context *intel);
+
+void intel_region_idle(struct intel_context *intel,
struct intel_region *ib);
/* Map/unmap regions. This is refcounted also:
*/
-GLubyte *intel_region_map(intelScreenPrivate *intelScreen,
+GLubyte *intel_region_map(struct intel_context *intel,
struct intel_region *ib);
-void intel_region_unmap(intelScreenPrivate *intelScreen, struct intel_region *ib);
+void intel_region_unmap(struct intel_context *intel, struct intel_region *ib);
/* Upload data to a rectangular sub-region
*/
-void intel_region_data(intelScreenPrivate *intelScreen,
+void intel_region_data(struct intel_context *intel,
struct intel_region *dest,
GLuint dest_offset,
GLuint destx, GLuint desty,
@@ -114,7 +95,7 @@ void intel_region_data(intelScreenPrivate *intelScreen,
/* Copy rectangular sub-regions
*/
-void intel_region_copy(intelScreenPrivate *intelScreen,
+void intel_region_copy(struct intel_context *intel,
struct intel_region *dest,
GLuint dest_offset,
GLuint destx, GLuint desty,
@@ -124,7 +105,7 @@ void intel_region_copy(intelScreenPrivate *intelScreen,
/* Fill a rectangular sub-region
*/
-void intel_region_fill(intelScreenPrivate *intelScreen,
+void intel_region_fill(struct intel_context *intel,
struct intel_region *dest,
GLuint dest_offset,
GLuint destx, GLuint desty,
@@ -132,15 +113,15 @@ void intel_region_fill(intelScreenPrivate *intelScreen,
/* Helpers for zerocopy uploads, particularly texture image uploads:
*/
-void intel_region_attach_pbo(intelScreenPrivate *intelScreen,
+void intel_region_attach_pbo(struct intel_context *intel,
struct intel_region *region,
struct intel_buffer_object *pbo);
-void intel_region_release_pbo(intelScreenPrivate *intelScreen,
+void intel_region_release_pbo(struct intel_context *intel,
struct intel_region *region);
-void intel_region_cow(intelScreenPrivate *intelScreen,
+void intel_region_cow(struct intel_context *intel,
struct intel_region *region);
-dri_bo *intel_region_buffer(intelScreenPrivate *intelScreen,
+dri_bo *intel_region_buffer(struct intel_context *intel,
struct intel_region *region,
GLuint flag);