i965: Avoid extra MOV in VS indirect register reads.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_vs_state.c
index 0ba81977dfa09bd31df0dfda1030cb6b2c5005f6..9b2dd5b3d1ce5198f617efc812056b2069eccd25 100644 (file)
@@ -79,12 +79,12 @@ vs_unit_populate_key(struct brw_context *brw, struct brw_vs_unit_key *key)
    }
 }
 
-static dri_bo *
+static drm_intel_bo *
 vs_unit_create_from_key(struct brw_context *brw, struct brw_vs_unit_key *key)
 {
    struct intel_context *intel = &brw->intel;
    struct brw_vs_unit_state vs;
-   dri_bo *bo;
+   drm_intel_bo *bo;
 
    memset(&vs, 0, sizeof(vs));
 
@@ -167,11 +167,9 @@ vs_unit_create_from_key(struct brw_context *brw, struct brw_vs_unit_key *key)
                         &vs, sizeof(vs));
 
    /* Emit VS program relocation */
-   dri_bo_emit_reloc(bo,
-                    I915_GEM_DOMAIN_INSTRUCTION, 0,
-                    vs.thread0.grf_reg_count << 1,
-                    offsetof(struct brw_vs_unit_state, thread0),
-                    brw->vs.prog_bo);
+   drm_intel_bo_emit_reloc(bo, offsetof(struct brw_vs_unit_state, thread0),
+                          brw->vs.prog_bo, vs.thread0.grf_reg_count << 1,
+                          I915_GEM_DOMAIN_INSTRUCTION, 0);
 
    return bo;
 }
@@ -182,7 +180,7 @@ static void prepare_vs_unit(struct brw_context *brw)
 
    vs_unit_populate_key(brw, &key);
 
-   dri_bo_unreference(brw->vs.state_bo);
+   drm_intel_bo_unreference(brw->vs.state_bo);
    brw->vs.state_bo = brw_search_cache(&brw->cache, BRW_VS_UNIT,
                                       &key, sizeof(key),
                                       &brw->vs.prog_bo, 1,