vc4: check preprocessor token existence using #ifdef instead of #if
authorEric Engestrom <eric.engestrom@imgtec.com>
Fri, 24 Nov 2017 16:58:43 +0000 (16:58 +0000)
committerEric Engestrom <eric.engestrom@imgtec.com>
Tue, 28 Nov 2017 09:50:36 +0000 (09:50 +0000)
(other uses of USE_VC4_SIMULATOR are already correct)

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/drivers/vc4/vc4_screen.c

index a42ba675c130c25976bedd0e593705037f26bf4d..74dd9d5767e38dbc461b6f9d0cf707e8a29b3e64 100644 (file)
@@ -64,7 +64,7 @@ static const struct debug_named_value debug_options[] = {
           "Flush after each draw call" },
         { "always_sync", VC4_DEBUG_ALWAYS_SYNC,
           "Wait for finish after each flush" },
-#if USE_VC4_SIMULATOR
+#ifdef USE_VC4_SIMULATOR
         { "dump", VC4_DEBUG_DUMP,
           "Write a GPU command stream trace file" },
 #endif
@@ -105,7 +105,7 @@ vc4_screen_destroy(struct pipe_screen *pscreen)
         slab_destroy_parent(&screen->transfer_pool);
         free(screen->ro);
 
-#if USE_VC4_SIMULATOR
+#ifdef USE_VC4_SIMULATOR
         vc4_simulator_destroy(screen);
 #endif
 
@@ -710,7 +710,7 @@ vc4_screen_create(int fd, struct renderonly *ro)
         if (vc4_debug & VC4_DEBUG_SHADERDB)
                 vc4_debug |= VC4_DEBUG_NORAST;
 
-#if USE_VC4_SIMULATOR
+#ifdef USE_VC4_SIMULATOR
         vc4_simulator_init(screen);
 #endif