From af3d7471943d54e692f2dd7448321a4f96e56ed2 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 23 Mar 2015 17:26:40 -0700 Subject: 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. --- src/gallium/drivers/vc4/vc4_context.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gallium/drivers/vc4/vc4_context.h') 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) -- cgit v1.2.3