summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-09-26 09:44:08 -0700
committerGitHub <noreply@github.com>2024-09-26 09:44:08 -0700
commit5a0224a0773f6d7f5eae8515424af5fa8faa9c14 (patch)
treeac14b54ad253d4ac5413a3c86254929f332b9e1a /source/slang/slang-emit.cpp
parent7398e1e09312ed4e19195e060de9a2c9a073fcc1 (diff)
Move texture format inference to frontend and add reflection api for it. (#5155)
Diffstat (limited to 'source/slang/slang-emit.cpp')
-rw-r--r--source/slang/slang-emit.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp
index a29142ba1..97ee2a595 100644
--- a/source/slang/slang-emit.cpp
+++ b/source/slang/slang-emit.cpp
@@ -63,6 +63,7 @@
#include "slang-ir-redundancy-removal.h"
#include "slang-ir-restructure.h"
#include "slang-ir-restructure-scoping.h"
+#include "slang-ir-resolve-texture-format.h"
#include "slang-ir-sccp.h"
#include "slang-ir-specialize.h"
#include "slang-ir-specialize-arrays.h"
@@ -1251,6 +1252,15 @@ Result linkAndOptimizeIR(
break;
}
+ switch (target)
+ {
+ case CodeGenTarget::GLSL:
+ case CodeGenTarget::SPIRV:
+ case CodeGenTarget::WGSL:
+ resolveTextureFormat(irModule);
+ break;
+ }
+
// For GLSL only, we will need to perform "legalization" of
// the entry point and any entry-point parameters.
//