summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2008-01-17 11:05:24 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2008-01-17 11:08:56 +0800
commitc9b1fef0c9c5018efd825c42782f19ad0618696a (patch)
treea6c2c32421cb2947b445ab301ad096269d3d7c0d
parent9bae03a583fc6d2d0b916961279abe9156078d1e (diff)
i965: always call dri_emit_reloc when creating clip unit state
This fix ensures it gets the starting location of the clip program if a clip unit state is same as a unit which is created when metaops is actived and it doesn't impact metaops because the clip state offset isn't emitted when metaops is actived.
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip_state.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip_state.c b/src/mesa/drivers/dri/i965/brw_clip_state.c
index e6e9fceb14..4694ccde9a 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_state.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_state.c
@@ -113,14 +113,13 @@ clip_unit_create_from_key(struct brw_context *brw,
&clip, sizeof(clip),
NULL, NULL);
- if (!brw->metaops.active) {
- /* Emit clip program relocation */
- dri_emit_reloc(bo,
- DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_READ,
- clip.thread0.grf_reg_count << 1,
- offsetof(struct brw_clip_unit_state, thread0),
- brw->clip.prog_bo);
- }
+ /* Emit clip program relocation */
+ assert(brw->clip.prog_bo);
+ dri_emit_reloc(bo,
+ DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_READ,
+ clip.thread0.grf_reg_count << 1,
+ offsetof(struct brw_clip_unit_state, thread0),
+ brw->clip.prog_bo);
return bo;
}