From a70113c425cbd5bba2e83e04e521fb594143cb9e Mon Sep 17 00:00:00 2001 From: kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> Date: Fri, 14 Feb 2025 12:05:41 -0600 Subject: Fix metal issue (#6361) * Fix metal issue - implement waitForFences for metal backend - fix a bug that it misses clear the entryPoints when initializing RootShaderObject * format --------- Co-authored-by: Yong He --- tools/gfx/metal/metal-device.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tools/gfx/metal/metal-device.cpp') diff --git a/tools/gfx/metal/metal-device.cpp b/tools/gfx/metal/metal-device.cpp index 623cd8a81..e20d3ea3b 100644 --- a/tools/gfx/metal/metal-device.cpp +++ b/tools/gfx/metal/metal-device.cpp @@ -875,7 +875,16 @@ Result DeviceImpl::waitForFences( bool waitForAll, uint64_t timeout) { - return SLANG_E_NOT_IMPLEMENTED; + // return SLANG_E_NOT_IMPLEMENTED; + for (GfxCount i = 0; i < fenceCount; ++i) + { + FenceImpl* fenceImpl = static_cast(fences[i]); + if (!fenceImpl->waitForFence(fenceValues[i], timeout)) + { + return SLANG_FAIL; + } + } + return SLANG_OK; } } // namespace metal -- cgit v1.2.3