summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/r600/drm/r600_state.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-09-16 20:22:09 +1000
committerDave Airlie <airlied@redhat.com>2010-09-17 10:57:49 +1000
commitf70f79f6f6027bdf2f7de09bb39e12a24420f338 (patch)
tree8ee84c9ddd557fddc10ee11837108eb23768235d /src/gallium/winsys/r600/drm/r600_state.c
parentec9d838aa56d2c4bc5649d7c26ac61abb6c4b9bb (diff)
r600g: attempt to abstract kernel bos from pipe driver.
introduce an abstraction layer between kernel bos and the winsys BOs. this is to allow plugging in pb manager with minimal disruption to pipe driver.
Diffstat (limited to 'src/gallium/winsys/r600/drm/r600_state.c')
-rw-r--r--src/gallium/winsys/r600/drm/r600_state.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gallium/winsys/r600/drm/r600_state.c b/src/gallium/winsys/r600/drm/r600_state.c
index b8ef89dfd6..82eb0cc863 100644
--- a/src/gallium/winsys/r600/drm/r600_state.c
+++ b/src/gallium/winsys/r600/drm/r600_state.c
@@ -155,7 +155,7 @@ static int r600_state_pm4_bytecode(struct radeon_state *state, unsigned offset,
r = radeon_state_reloc(state, state->cpm4, regs[id + i].bo_id);
if (r)
return r;
- state->pm4[state->cpm4++] = state->bo[regs[id + i].bo_id]->handle;
+ state->pm4[state->cpm4++] = state->bo[regs[id + i].bo_id]->bo->handle;
}
}
return 0;
@@ -172,7 +172,7 @@ static int r600_state_pm4_bytecode(struct radeon_state *state, unsigned offset,
r = radeon_state_reloc(state, state->cpm4, regs[id + i].bo_id);
if (r)
return r;
- state->pm4[state->cpm4++] = state->bo[regs[id + i].bo_id]->handle;
+ state->pm4[state->cpm4++] = state->bo[regs[id + i].bo_id]->bo->handle;
}
}
return 0;
@@ -220,7 +220,7 @@ static int eg_state_pm4_bytecode(struct radeon_state *state, unsigned offset, un
r = radeon_state_reloc(state, state->cpm4, regs[id + i].bo_id);
if (r)
return r;
- state->pm4[state->cpm4++] = state->bo[regs[id + i].bo_id]->handle;
+ state->pm4[state->cpm4++] = state->bo[regs[id + i].bo_id]->bo->handle;
}
}
return 0;
@@ -237,7 +237,7 @@ static int eg_state_pm4_bytecode(struct radeon_state *state, unsigned offset, un
r = radeon_state_reloc(state, state->cpm4, regs[id + i].bo_id);
if (r)
return r;
- state->pm4[state->cpm4++] = state->bo[regs[id + i].bo_id]->handle;
+ state->pm4[state->cpm4++] = state->bo[regs[id + i].bo_id]->bo->handle;
}
}
return 0;
@@ -318,7 +318,7 @@ static void r600_state_pm4_with_flush(struct radeon_state *state, u32 flags, int
}
}
for (i = 0; i < state->nreloc; i++) {
- size = (state->bo[state->reloc_bo_id[i]]->size + 255) >> 8;
+ size = (state->bo[state->reloc_bo_id[i]]->bo->size + 255) >> 8;
state->pm4[state->cpm4++] = PKT3(PKT3_SURFACE_SYNC, 3);
if (bufs_are_cbs)
flags |= S_0085F0_CB0_DEST_BASE_ENA(1 << i);
@@ -328,7 +328,7 @@ static void r600_state_pm4_with_flush(struct radeon_state *state, u32 flags, int
state->pm4[state->cpm4++] = 0x0000000A;
state->pm4[state->cpm4++] = PKT3(PKT3_NOP, 0);
state->reloc_pm4_id[i] = state->cpm4;
- state->pm4[state->cpm4++] = state->bo[state->reloc_bo_id[i]]->handle;
+ state->pm4[state->cpm4++] = state->bo[state->reloc_bo_id[i]]->bo->handle;
}
}
@@ -384,7 +384,7 @@ static int r600_state_pm4_query_begin(struct radeon_state *state)
r = radeon_state_reloc(state, state->cpm4, 0);
if (r)
return r;
- state->pm4[state->cpm4++] = state->bo[0]->handle;
+ state->pm4[state->cpm4++] = state->bo[0]->bo->handle;
return 0;
}
@@ -401,7 +401,7 @@ static int r600_state_pm4_query_end(struct radeon_state *state)
r = radeon_state_reloc(state, state->cpm4, 0);
if (r)
return r;
- state->pm4[state->cpm4++] = state->bo[0]->handle;
+ state->pm4[state->cpm4++] = state->bo[0]->bo->handle;
return 0;
}
@@ -486,7 +486,7 @@ static int r600_state_pm4_draw(struct radeon_state *state)
r = radeon_state_reloc(state, state->cpm4, 0);
if (r)
return r;
- state->pm4[state->cpm4++] = state->bo[0]->handle;
+ state->pm4[state->cpm4++] = state->bo[0]->bo->handle;
} else {
state->pm4[state->cpm4++] = PKT3(PKT3_DRAW_INDEX_AUTO, 1);
state->pm4[state->cpm4++] = state->states[R600_DRAW__VGT_NUM_INDICES];
@@ -572,13 +572,13 @@ static int r600_state_pm4_resource(struct radeon_state *state)
r = radeon_state_reloc(state, state->cpm4, 0);
if (r)
return r;
- state->pm4[state->cpm4++] = state->bo[0]->handle;
+ state->pm4[state->cpm4++] = state->bo[0]->bo->handle;
if (type == 2) {
state->pm4[state->cpm4++] = PKT3(PKT3_NOP, 0);
r = radeon_state_reloc(state, state->cpm4, 1);
if (r)
return r;
- state->pm4[state->cpm4++] = state->bo[1]->handle;
+ state->pm4[state->cpm4++] = state->bo[1]->bo->handle;
}
return 0;
}