summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_cc.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-08-08 15:32:24 -0700
committerEric Anholt <eric@anholt.net>2008-08-08 15:32:24 -0700
commit53675e5c05c0598b7ea206d5c27dbcae786a2c03 (patch)
treed4bc5c9aa659b6b0e82245b0405ca740cc3d2a66 /src/mesa/drivers/dri/i965/brw_cc.c
parent501338d70e96e0388fd5198625d856c4ec07745f (diff)
parentd2796939f18815935c8fe1effb01fa9765d6c7d8 (diff)
Merge branch 'drm-gem'
Conflicts: src/mesa/drivers/dri/intel/intel_span.c src/mesa/main/fbobject.c This converts the i915 driver to use the GEM interfaces for object management.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_cc.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_cc.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cc.c b/src/mesa/drivers/dri/i965/brw_cc.c
index 9d8984f05c..d662cf7521 100644
--- a/src/mesa/drivers/dri/i965/brw_cc.c
+++ b/src/mesa/drivers/dri/i965/brw_cc.c
@@ -37,7 +37,7 @@
#include "macros.h"
#include "enums.h"
-static int upload_cc_vp( struct brw_context *brw )
+static void prepare_cc_vp( struct brw_context *brw )
{
struct brw_cc_viewport ccv;
@@ -48,7 +48,6 @@ static int upload_cc_vp( struct brw_context *brw )
dri_bo_unreference(brw->cc.vp_bo);
brw->cc.vp_bo = brw_cache_data( &brw->cache, BRW_CC_VP, &ccv, NULL, 0 );
- return dri_bufmgr_check_aperture_space(brw->cc.vp_bo);
}
const struct brw_tracked_state brw_cc_vp = {
@@ -57,7 +56,7 @@ const struct brw_tracked_state brw_cc_vp = {
.brw = BRW_NEW_CONTEXT,
.cache = 0
},
- .prepare = upload_cc_vp
+ .prepare = prepare_cc_vp
};
struct brw_cc_unit_key {
@@ -256,16 +255,17 @@ cc_unit_create_from_key(struct brw_context *brw, struct brw_cc_unit_key *key)
NULL, NULL);
/* Emit CC viewport relocation */
- dri_emit_reloc(bo,
- DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_READ,
- 0,
- offsetof(struct brw_cc_unit_state, cc4),
- brw->cc.vp_bo);
+ intel_bo_emit_reloc(bo,
+ I915_GEM_DOMAIN_INSTRUCTION,
+ 0,
+ 0,
+ offsetof(struct brw_cc_unit_state, cc4),
+ brw->cc.vp_bo);
return bo;
}
-static int prepare_cc_unit( struct brw_context *brw )
+static void prepare_cc_unit( struct brw_context *brw )
{
struct brw_cc_unit_key key;
@@ -279,7 +279,6 @@ static int prepare_cc_unit( struct brw_context *brw )
if (brw->cc.state_bo == NULL)
brw->cc.state_bo = cc_unit_create_from_key(brw, &key);
- return dri_bufmgr_check_aperture_space(brw->cc.state_bo);
}
const struct brw_tracked_state brw_cc_unit = {