diff options
Diffstat (limited to 'src/gpu')
| -rw-r--r-- | src/gpu/effect.cc | 6 | ||||
| -rw-r--r-- | src/gpu/effects/shader_composer.cc | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gpu/effect.cc b/src/gpu/effect.cc index e0a9c24..3ee2acd 100644 --- a/src/gpu/effect.cc +++ b/src/gpu/effect.cc @@ -457,13 +457,9 @@ void MainSequence::register_auxiliary_texture(const char* name, int width, int height) { const std::string key(name); - // Check if already exists + // Check if already exists (silent, idempotent registration is valid) auto it = auxiliary_textures_.find(key); if (it != auxiliary_textures_.end()) { -#if !defined(STRIP_ALL) - fprintf(stderr, "Warning: Auxiliary texture '%s' already registered\n", - name); -#endif /* !defined(STRIP_ALL) */ return; } diff --git a/src/gpu/effects/shader_composer.cc b/src/gpu/effects/shader_composer.cc index fe3ad74..9234b7a 100644 --- a/src/gpu/effects/shader_composer.cc +++ b/src/gpu/effects/shader_composer.cc @@ -89,6 +89,9 @@ ShaderComposer::Compose(const std::vector<std::string>& dependencies, void ShaderComposer::VerifyIncludes() const { #if !defined(STRIP_ALL) + // Known placeholders that get substituted at composition time + std::set<std::string> known_placeholders = {"render/scene_query_mode"}; + std::set<std::string> missing; for (const auto& [name, code] : snippets_) { std::istringstream stream(code); @@ -99,7 +102,8 @@ void ShaderComposer::VerifyIncludes() const { size_t end = line.find('"', start + 1); if (start != std::string::npos && end != std::string::npos) { std::string included = line.substr(start + 1, end - start - 1); - if (snippets_.find(included) == snippets_.end()) { + if (snippets_.find(included) == snippets_.end() && + known_placeholders.find(included) == known_placeholders.end()) { missing.insert(included); } } |
