summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/r600/drm/radeon_priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/r600/drm/radeon_priv.h')
-rw-r--r--src/gallium/winsys/r600/drm/radeon_priv.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/gallium/winsys/r600/drm/radeon_priv.h b/src/gallium/winsys/r600/drm/radeon_priv.h
index b5a4eeae6b..6bd8d9850f 100644
--- a/src/gallium/winsys/r600/drm/radeon_priv.h
+++ b/src/gallium/winsys/r600/drm/radeon_priv.h
@@ -23,9 +23,14 @@
#include <errno.h>
#include "radeon.h"
+#include "pipe/p_compiler.h"
+#include "util/u_inlines.h"
+#include "pipe/p_defines.h"
+
struct radeon;
struct radeon_ctx;
+
/*
* radeon functions
*/
@@ -37,6 +42,15 @@ struct radeon_register {
char name[64];
};
+struct radeon_bo {
+ struct pipe_reference reference;
+ unsigned handle;
+ unsigned size;
+ unsigned alignment;
+ unsigned map_count;
+ void *data;
+};
+
struct radeon_sub_type {
int shader_type;
const struct radeon_register *regs;
@@ -61,7 +75,7 @@ struct radeon_ctx {
unsigned nreloc;
struct radeon_cs_reloc *reloc;
unsigned nbo;
- struct radeon_bo **bo;
+ struct radeon_ws_bo **bo;
};
struct radeon {
@@ -74,6 +88,11 @@ struct radeon {
unsigned max_states;
};
+struct radeon_ws_bo {
+ struct pipe_reference reference;
+ struct radeon_bo *bo;
+};
+
extern struct radeon *radeon_new(int fd, unsigned device);
extern struct radeon *radeon_incref(struct radeon *radeon);
extern struct radeon *radeon_decref(struct radeon *radeon);
@@ -102,4 +121,13 @@ extern int radeon_state_reloc(struct radeon_state *state, unsigned id, unsigned
*/
extern int radeon_draw_pm4(struct radeon_draw *draw);
+/* bo */
+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);
+void radeon_bo_reference(struct radeon *radeon, struct radeon_bo **dst,
+ struct radeon_bo *src);
+int radeon_bo_wait(struct radeon *radeon, struct radeon_bo *bo);
+
#endif