summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/radeon.h
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-09-16 20:22:09 +1000
committerDave Airlie <[email protected]>2010-09-17 10:57:49 +1000
commitf70f79f6f6027bdf2f7de09bb39e12a24420f338 (patch)
tree8ee84c9ddd557fddc10ee11837108eb23768235d /src/gallium/drivers/r600/radeon.h
parentec9d838aa56d2c4bc5649d7c26ac61abb6c4b9bb (diff)
r600g: attempt to abstract kernel bos from pipe driver.
introduce an abstraction layer between kernel bos and the winsys BOs. this is to allow plugging in pb manager with minimal disruption to pipe driver.
Diffstat (limited to 'src/gallium/drivers/r600/radeon.h')
-rw-r--r--src/gallium/drivers/r600/radeon.h31
1 files changed, 12 insertions, 19 deletions
diff --git a/src/gallium/drivers/r600/radeon.h b/src/gallium/drivers/r600/radeon.h
index 12e8b993c8f..be28ad19ff6 100644
--- a/src/gallium/drivers/r600/radeon.h
+++ b/src/gallium/drivers/r600/radeon.h
@@ -87,24 +87,17 @@ enum {
enum radeon_family radeon_get_family(struct radeon *rw);
-/*
- * radeon object functions
- */
-struct radeon_bo {
- unsigned refcount;
- unsigned handle;
- unsigned size;
- unsigned alignment;
- unsigned map_count;
- void *data;
-};
-struct radeon_bo *radeon_bo(struct radeon *radeon, unsigned handle,
- unsigned size, unsigned alignment, void *ptr);
-int radeon_bo_map(struct radeon *radeon, struct radeon_bo *bo);
-void radeon_bo_unmap(struct radeon *radeon, struct radeon_bo *bo);
-struct radeon_bo *radeon_bo_incref(struct radeon *radeon, struct radeon_bo *bo);
-struct radeon_bo *radeon_bo_decref(struct radeon *radeon, struct radeon_bo *bo);
-int radeon_bo_wait(struct radeon *radeon, struct radeon_bo *bo);
+/* lowlevel WS bo */
+struct radeon_ws_bo;
+struct radeon_ws_bo *radeon_ws_bo(struct radeon *radeon,
+ unsigned size, unsigned alignment);
+struct radeon_ws_bo *radeon_ws_bo_handle(struct radeon *radeon,
+ unsigned handle);
+void *radeon_ws_bo_map(struct radeon *radeon, struct radeon_ws_bo *bo);
+void radeon_ws_bo_unmap(struct radeon *radeon, struct radeon_ws_bo *bo);
+void radeon_ws_bo_reference(struct radeon *radeon, struct radeon_ws_bo **dst,
+ struct radeon_ws_bo *src);
+int radeon_ws_bo_wait(struct radeon *radeon, struct radeon_ws_bo *bo);
struct radeon_stype_info;
/*
@@ -124,7 +117,7 @@ struct radeon_state {
u32 pm4_crc;
u32 pm4[128];
unsigned nbo;
- struct radeon_bo *bo[4];
+ struct radeon_ws_bo *bo[4];
unsigned nreloc;
unsigned reloc_pm4_id[8];
unsigned reloc_bo_id[8];