summaryrefslogtreecommitdiff
path: root/src/gpu/effects/shader_composer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/effects/shader_composer.cc')
-rw-r--r--src/gpu/effects/shader_composer.cc6
1 files changed, 5 insertions, 1 deletions
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);
}
}