From 86e688a2a3bbc81aea7dc58ab548a13c421e5405 Mon Sep 17 00:00:00 2001 From: bridgewaterrobbie Date: Mon, 31 Mar 2025 18:44:18 -0400 Subject: [PATCH] Update libs/filamat/src/GLSLPostProcessor.cpp per suggestion Co-authored-by: Powei Feng --- libs/filamat/src/GLSLPostProcessor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/filamat/src/GLSLPostProcessor.cpp b/libs/filamat/src/GLSLPostProcessor.cpp index e2ac5a38bb..42de376f24 100644 --- a/libs/filamat/src/GLSLPostProcessor.cpp +++ b/libs/filamat/src/GLSLPostProcessor.cpp @@ -538,6 +538,8 @@ void GLSLPostProcessor::rebindImageSamplerForWGSL(std::vector &spirv) }; //Parse through debug name info to determine which bindings are samplers and which are not. + // This is possible because the sampler splitting pass outputs sampler and texture pairs of the form: + // `uniform sampler2D var_x` => `uniform sampler var_sampler` and `uniform texture2D var_texture`; //TODO This works, but may limit what optimizations can be done. Ideally, trace usage to determine binding type. pass(spv::Op::OpName, [&](uint32_t pos) { auto target = data[pos];