summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGangzheng Tong <tonggangzheng@gmail.com>2025-05-16 20:59:55 -0700
committerGitHub <noreply@github.com>2025-05-17 03:59:55 +0000
commit49667272add1963c6937a63898de6881b2e455aa (patch)
treea51b22e1a53ca969fc6797a0875cc7c5a6456861 /tools
parentd58243d9041947c99f18b82385e62c082507decb (diff)
fix the break to make sure only valid data will be accessed (#7148)
Diffstat (limited to 'tools')
-rw-r--r--tools/slang-unit-test/unit-test-compile-benchmark.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/slang-unit-test/unit-test-compile-benchmark.cpp b/tools/slang-unit-test/unit-test-compile-benchmark.cpp
index e38edc6ad..1c0b86156 100644
--- a/tools/slang-unit-test/unit-test-compile-benchmark.cpp
+++ b/tools/slang-unit-test/unit-test-compile-benchmark.cpp
@@ -88,11 +88,12 @@ void main(uint3 threadIdx : SV_DispatchThreadID)
SLANG_CHECK(module != nullptr);
ComPtr<slang::IEntryPoint> entryPoint;
- module->findAndCheckEntryPoint(
+ SlangResult res = module->findAndCheckEntryPoint(
"main",
- SLANG_STAGE_VERTEX,
+ SLANG_STAGE_COMPUTE,
entryPoint.writeRef(),
diagnosticBlob.writeRef());
+ SLANG_CHECK(res == SLANG_OK);
slang::IComponentType* componentTypes[2] = {module, entryPoint.get()};
ComPtr<slang::IComponentType> composedProgram;