diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.h | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index da6aca123d1..13b1e34d722 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -435,7 +435,7 @@ static inline void 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; @@ -447,7 +447,7 @@ static inline bool 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; } diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index df4b8135a25..359058b99a2 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -40,7 +40,7 @@ static void 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; } @@ -50,7 +50,7 @@ void si_init_atom(struct si_context *sctx, struct r600_atom *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; } |