diff options
Diffstat (limited to 'src/gallium/drivers/radeon/r600_cs.h')
-rw-r--r-- | src/gallium/drivers/radeon/r600_cs.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_cs.h b/src/gallium/drivers/radeon/r600_cs.h index f56c92c1017..fa749dad6c9 100644 --- a/src/gallium/drivers/radeon/r600_cs.h +++ b/src/gallium/drivers/radeon/r600_cs.h @@ -94,4 +94,18 @@ static INLINE void r600_write_context_reg(struct radeon_winsys_cs *cs, unsigned radeon_emit(cs, value); } +static INLINE void cik_write_uconfig_reg_seq(struct radeon_winsys_cs *cs, unsigned reg, unsigned num) +{ + assert(reg >= CIK_UCONFIG_REG_OFFSET && reg < CIK_UCONFIG_REG_END); + assert(cs->cdw+2+num <= RADEON_MAX_CMDBUF_DWORDS); + radeon_emit(cs, PKT3(PKT3_SET_UCONFIG_REG, num, 0)); + radeon_emit(cs, (reg - CIK_UCONFIG_REG_OFFSET) >> 2); +} + +static INLINE void cik_write_uconfig_reg(struct radeon_winsys_cs *cs, unsigned reg, unsigned value) +{ + cik_write_uconfig_reg_seq(cs, reg, 1); + radeon_emit(cs, value); +} + #endif |