void BM_DeinterlaceEffect(benchmark::State &state, TestFormat format, bool spatial_interlacing_check, const std::string &shader_type)
{
DisableComputeShadersTemporarily disabler(shader_type == "fragment");
- if (disabler.should_skip()) return;
+ if (disabler.should_skip(&state)) return;
unsigned width = state.range(0), height = state.range(1);
unsigned field_height = height / 2;
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
// compute shaders). Will also output a message to stderr if so.
bool should_skip();
+#ifdef HAVE_BENCHMARK
+ // Same, but outputs a message to the benchmark instead of to stderr.
+ bool should_skip(benchmark::State *benchmark_state);
+#endif
+
bool active() const { return disable_compute_shaders; }
private: