X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=test_util.cpp;h=6214dbc1b16ef11ffd160fd1265230e9f13b77db;hp=99ab731f6d7c1c3af31b93035b27618a770c4f27;hb=9823bfb683591e2b0fd844fa206ac888a9fef01a;hpb=4179bef190d88739038233ac5d7e5ffa2ff4282f diff --git a/test_util.cpp b/test_util.cpp index 99ab731..6214dbc 100644 --- a/test_util.cpp +++ b/test_util.cpp @@ -545,4 +545,19 @@ bool DisableComputeShadersTemporarily::should_skip() return false; } +#ifdef HAVE_BENCHMARK +bool DisableComputeShadersTemporarily::should_skip(benchmark::State *benchmark_state) +{ + if (disable_compute_shaders) { + return false; + } + + if (!movit_compute_shaders_supported) { + benchmark_state->SkipWithError("Compute shaders not supported"); + return true; + } + return false; +} +#endif + } // namespace movit