summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_state.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-08-04 17:06:24 +0200
committerMarek Olšák <[email protected]>2017-08-07 21:12:24 +0200
commita7b0014d1a809268e55483ccc2c66674847f4a6e (patch)
tree853b0db26da2b0db745822e12e7ff4c0c1a448b9 /src/gallium/drivers/radeonsi/si_state.h
parent58d062b87d0f2cc66292c5b16ff2f34093aeaa89 (diff)
radeonsi: add and use si_pm4_state_enabled_and_changed
Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.h')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h
index 9fbede702a7..48e88afe1b8 100644
--- a/src/gallium/drivers/radeonsi/si_state.h
+++ b/src/gallium/drivers/radeonsi/si_state.h
@@ -288,6 +288,9 @@ struct si_buffer_resources {
#define si_pm4_state_changed(sctx, member) \
((sctx)->queued.named.member != (sctx)->emitted.named.member)
+#define si_pm4_state_enabled_and_changed(sctx, member) \
+ ((sctx)->queued.named.member && si_pm4_state_changed(sctx, member))
+
#define si_pm4_bind_state(sctx, member, value) \
do { \
(sctx)->queued.named.member = (value); \