Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
si_set_atom_dirty(struct si_context *sctx,
struct r600_atom *atom, bool dirty)
{
- unsigned bit = 1 << (atom->id - 1);
+ unsigned bit = 1 << atom->id;
if (dirty)
sctx->dirty_atoms |= bit;
si_is_atom_dirty(struct si_context *sctx,
struct r600_atom *atom)
{
- unsigned bit = 1 << (atom->id - 1);
+ unsigned bit = 1 << atom->id;
return sctx->dirty_atoms & bit;
}
si_init_external_atom(struct si_context *sctx, struct r600_atom *atom,
struct r600_atom **list_elem)
{
- atom->id = list_elem - sctx->atoms.array + 1;
+ atom->id = list_elem - sctx->atoms.array;
*list_elem = atom;
}
void (*emit_func)(struct si_context *ctx, struct r600_atom *state))
{
atom->emit = (void*)emit_func;
- atom->id = list_elem - sctx->atoms.array + 1; /* index+1 in the atom array */
+ atom->id = list_elem - sctx->atoms.array;
*list_elem = atom;
}