From 49667272add1963c6937a63898de6881b2e455aa Mon Sep 17 00:00:00 2001 From: Gangzheng Tong Date: Fri, 16 May 2025 20:59:55 -0700 Subject: fix the break to make sure only valid data will be accessed (#7148) --- tools/slang-unit-test/unit-test-compile-benchmark.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/slang-unit-test/unit-test-compile-benchmark.cpp') 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 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 composedProgram; -- cgit v1.2.3