diff options
Diffstat (limited to 'src/radeon_state.c')
-rw-r--r-- | src/radeon_state.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/radeon_state.c b/src/radeon_state.c index 6cba23d..d501282 100644 --- a/src/radeon_state.c +++ b/src/radeon_state.c @@ -78,7 +78,7 @@ struct radeon_state *radeon_state_duplicate(struct radeon_state *state) memcpy(nstate->reloc_bo_id, state->reloc_bo_id, 8 * 4); memcpy(nstate->bo_dirty, state->bo_dirty, 4 * 4); for (i = 0; i < state->nbo; i++) { - nstate->bo[i] = radeon_object_incref(state->bo[i]); + nstate->bo[i] = radeon_bo_incref(state->radeon, state->bo[i]); } return nstate; } @@ -99,7 +99,7 @@ struct radeon_state *radeon_state_decref(struct radeon_state *state) return NULL; } for (i = 0; i < state->nbo; i++) { - state->bo[i] = radeon_object_decref(state->bo[i]); + state->bo[i] = radeon_bo_decref(state->radeon, state->bo[i]); } free(state->immd); free(state->states); @@ -146,11 +146,12 @@ int radeon_state_pm4(struct radeon_state *state) { int r; - if (state == NULL) + if (state == NULL || state->cpm4) return 0; - state->cpm4 = 0; r = state->radeon->type[state->type].pm4(state); if (r) { + fprintf(stderr, "%s failed to build PM4 for state(%d %d)\n", + __func__, state->type, state->id); return r; } state->pm4_crc = crc32(state->pm4, state->cpm4 * 4); |