diff options
Diffstat (limited to 'src/effects/passthrough_effect.cc')
| -rw-r--r-- | src/effects/passthrough_effect.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/effects/passthrough_effect.cc b/src/effects/passthrough_effect.cc index c4106b1..8cbd425 100644 --- a/src/effects/passthrough_effect.cc +++ b/src/effects/passthrough_effect.cc @@ -1,6 +1,7 @@ // Passthrough effect v2 implementation #include "effects/passthrough_effect.h" +#include "util/fatal_error.h" #include "gpu/post_process_helper.h" #include "gpu/shaders.h" @@ -9,10 +10,8 @@ PassthroughEffect::PassthroughEffect(const GpuContext& ctx, const std::vector<std::string>& outputs) : Effect(ctx, inputs, outputs), pipeline_(nullptr), bind_group_(nullptr), sampler_(nullptr) { - // Headless mode: skip GPU resource creation - if (ctx_.device == nullptr) { - return; - } + // Headless mode: skip GPU resource creation (compiled out in STRIP_ALL) + HEADLESS_RETURN_IF_NULL(ctx_.device); // Init uniform buffer uniforms_buffer_.init(ctx_.device); |
