summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-05-08 20:52:09 -0700
committerGitHub <noreply@github.com>2024-05-08 20:52:09 -0700
commit448e21adac9ec260d7854076a686bd506bb371ec (patch)
tree9a7c61fcf0cab16a1e6a4939d1f4e3c451ac9b2b
parent756ce3d91faf80b6a3e6a695d0dec3968048c11e (diff)
`slangc` tool experience improvements. (#4140)
* `slangc` tool experience improvements. Fixes #4123. Fixes #4127. * Update doc.
-rw-r--r--docs/command-line-slangc-reference.mdbin52312 -> 78370 bytes
-rw-r--r--source/slang/slang-options.cpp4
-rw-r--r--source/slang/slang.cpp6
3 files changed, 8 insertions, 2 deletions
diff --git a/docs/command-line-slangc-reference.md b/docs/command-line-slangc-reference.md
index c3a7b2ccd..1308f35fe 100644
--- a/docs/command-line-slangc-reference.md
+++ b/docs/command-line-slangc-reference.md
Binary files differ
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp
index b6fcafb61..fc2fd42c2 100644
--- a/source/slang/slang-options.cpp
+++ b/source/slang/slang-options.cpp
@@ -386,8 +386,8 @@ void initCommandOptions(CommandOptions& options)
{ OptionKind::Optimization, "-O...", "-O<optimization-level>", "Set the optimization level."},
{ OptionKind::Obfuscate, "-obfuscate", nullptr, "Remove all source file information from outputs." },
{ OptionKind::GLSLForceScalarLayout,
- "-force-glsl-scalar-layout", nullptr,
- "Force using scalar block layout for uniform and shader storage buffers in GLSL output."},
+ "-force-glsl-scalar-layout,-fvk-use-scalar-layout", nullptr,
+ "Make data accessed through ConstantBuffer, ParameterBlock, StructuredBuffer, ByteAddressBuffer and general pointers follow the 'scalar' layout when targeting GLSL or SPIRV."},
{ OptionKind::VulkanBindShift, vkShiftNames.getBuffer(), "-fvk-<vulkan-shift>-shift <N> <space>",
"For example '-fvk-b-shift <N> <space>' shifts by N the inferred binding numbers for all resources in 'b' registers of space <space>. "
"For a resource attached with :register(bX, <space>) but not [vk::binding(...)], "
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index 45a6933de..bebcd7fab 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -316,6 +316,12 @@ SlangResult Session::compileStdLib(slang::CompileStdLibFlags compileFlags)
return SLANG_FAIL;
}
+#ifdef _DEBUG
+ // Print a message in debug builds to notice the user that compiling the stdlib
+ // can take a while.
+ fprintf(stderr, "Compiling stdlib on debug build, this can take a while.\n");
+#endif
+
// TODO(JS): Could make this return a SlangResult as opposed to exception
StringBuilder stdLibSrcBuilder;
stdLibSrcBuilder