OSDN Git Service

radeon: reference the correct cdw/max_dw
authorEmil Velikov <emil.velikov@collabora.com>
Fri, 8 Jul 2016 21:04:34 +0000 (22:04 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 8 Jul 2016 22:48:11 +0000 (23:48 +0100)
With commit f41f78cda10 ("radeonsi: drop the DRAW_PREAMBLE packet on
Polaris") we failed to attribute that the separate current/prev
radeon_winsys_cs_chunk(s) are not applicable/available in branch.

The latter of which introduced with commit 89ba076de4c ("radeon/winsys:
introduce radeon_winsys_cs_chunk").

Just drop "current." from the respective places to get things up and
running again.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96864
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
src/gallium/drivers/radeon/r600_cs.h

index f5e5039..80006b2 100644 (file)
@@ -102,7 +102,7 @@ static inline void radeon_set_context_reg_idx(struct radeon_winsys_cs *cs,
                                              unsigned value)
 {
        assert(reg >= R600_CONTEXT_REG_OFFSET);
-       assert(cs->current.cdw + 3 <= cs->current.max_dw);
+       assert(cs->cdw + 3 <= cs->max_dw);
        radeon_emit(cs, PKT3(PKT3_SET_CONTEXT_REG, 1, 0));
        radeon_emit(cs, (reg - R600_CONTEXT_REG_OFFSET) >> 2 | (idx << 28));
        radeon_emit(cs, value);
@@ -141,7 +141,7 @@ static inline void radeon_set_uconfig_reg_idx(struct radeon_winsys_cs *cs,
                                              unsigned value)
 {
        assert(reg >= CIK_UCONFIG_REG_OFFSET && reg < CIK_UCONFIG_REG_END);
-       assert(cs->current.cdw + 3 <= cs->current.max_dw);
+       assert(cs->cdw + 3 <= cs->max_dw);
        radeon_emit(cs, PKT3(PKT3_SET_UCONFIG_REG, 1, 0));
        radeon_emit(cs, (reg - CIK_UCONFIG_REG_OFFSET) >> 2 | (idx << 28));
        radeon_emit(cs, value);