summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_context.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-03-23 17:26:40 -0700
committerEric Anholt <[email protected]>2015-03-24 10:39:12 -0700
commitaf3d7471943d54e692f2dd7448321a4f96e56ed2 (patch)
tree493052e8ab687b82cdf84ff638086b801e3c7ef9 /src/gallium/drivers/vc4/vc4_context.h
parent9bafcf630ab009b3b39bbe3c0f4370386bc5a6b2 (diff)
vc4: Make a new #define for making code conditional on the simulator.
I'd like to compile as much of the device-specific code as possible when building for simulator, and using if (using_simulator) instead of ifdefs helps.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_context.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_context.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_context.h b/src/gallium/drivers/vc4/vc4_context.h
index e3d797e02b8..fa1cc43ccd6 100644
--- a/src/gallium/drivers/vc4/vc4_context.h
+++ b/src/gallium/drivers/vc4/vc4_context.h
@@ -38,6 +38,12 @@
#include "vc4_cl.h"
#include "vc4_qir.h"
+#ifdef USE_VC4_SIMULATOR
+#define using_vc4_simulator true
+#else
+#define using_vc4_simulator false
+#endif
+
#define VC4_DIRTY_BLEND (1 << 0)
#define VC4_DIRTY_RASTERIZER (1 << 1)
#define VC4_DIRTY_ZSA (1 << 2)