summaryrefslogtreecommitdiff
path: root/intel
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2012-01-13 11:31:31 -0800
committerBen Widawsky <ben@bwidawsk.net>2012-06-27 09:57:16 -0700
commitb3b123dfb1e81f254fb419d8eef6f63128e5b9c9 (patch)
tree79f02a51a69934739896d1d1d261feb09729c024 /intel
parenta5b2946889471f6075852949f90f660e43b68532 (diff)
intel/context: Add drm_intel_context type
Add an opaque type representing a HW context. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'intel')
-rw-r--r--intel/intel_bufmgr.h1
-rw-r--r--intel/intel_bufmgr_priv.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/intel/intel_bufmgr.h b/intel/intel_bufmgr.h
index fa6c4ddc..fedffb58 100644
--- a/intel/intel_bufmgr.h
+++ b/intel/intel_bufmgr.h
@@ -41,6 +41,7 @@
struct drm_clip_rect;
typedef struct _drm_intel_bufmgr drm_intel_bufmgr;
+typedef struct _drm_intel_context drm_intel_context;
typedef struct _drm_intel_bo drm_intel_bo;
struct _drm_intel_bo {
diff --git a/intel/intel_bufmgr_priv.h b/intel/intel_bufmgr_priv.h
index 0b625200..2592d42d 100644
--- a/intel/intel_bufmgr_priv.h
+++ b/intel/intel_bufmgr_priv.h
@@ -280,6 +280,11 @@ struct _drm_intel_bufmgr {
int debug;
};
+struct _drm_intel_context {
+ unsigned int ctx_id;
+ struct _drm_intel_bufmgr *bufmgr;
+};
+
#define ALIGN(value, alignment) ((value + alignment - 1) & ~(alignment - 1))
#define ROUND_UP_TO(x, y) (((x) + (y) - 1) / (y) * (y))
#define ROUND_UP_TO_MB(x) ROUND_UP_TO((x), 1024*1024)