From 1bbcf25af514a9ae24f7006747177f2d1b3b7c0d Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 11 Mar 2024 14:42:14 -0700 Subject: Link-time specialization fixes. (#3734) * Fix method synthesis logic for static differentiable methods. * Support link-time constants in thread group size reflection. --- tools/gfx-unit-test/link-time-constant.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools/gfx-unit-test/link-time-constant.cpp') diff --git a/tools/gfx-unit-test/link-time-constant.cpp b/tools/gfx-unit-test/link-time-constant.cpp index b349a7dcb..58b39a204 100644 --- a/tools/gfx-unit-test/link-time-constant.cpp +++ b/tools/gfx-unit-test/link-time-constant.cpp @@ -79,9 +79,13 @@ namespace gfx_test R"( export static const bool turnOnFeature = true; export static const float constValue = 2.0; - export static const int numthread = 1; + export static const int numthread = 2; export static const int arraySize = 4; )")); + + SlangUInt threadGroupSizes[3]; + slangReflection->findEntryPointByName("computeMain")->getComputeThreadGroupSize(3, threadGroupSizes); + SLANG_CHECK(threadGroupSizes[0] == 2 && threadGroupSizes[1] == 1 && threadGroupSizes[2] == 1); ComputePipelineStateDesc pipelineDesc = {}; pipelineDesc.program = shaderProgram.get(); -- cgit v1.2.3