summaryrefslogtreecommitdiff
path: root/tools/gfx/metal/metal-device.cpp
diff options
context:
space:
mode:
authorkaizhangNV <149626564+kaizhangNV@users.noreply.github.com>2025-02-14 12:05:41 -0600
committerGitHub <noreply@github.com>2025-02-14 10:05:41 -0800
commita70113c425cbd5bba2e83e04e521fb594143cb9e (patch)
treebfaa99fb52c735dea2c327cc283932cc41a5bdfd /tools/gfx/metal/metal-device.cpp
parent7435d5d1c339ae8ba531d5a11d3ddcc1b5cc353c (diff)
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 <yonghe@outlook.com>
Diffstat (limited to 'tools/gfx/metal/metal-device.cpp')
-rw-r--r--tools/gfx/metal/metal-device.cpp11
1 files changed, 10 insertions, 1 deletions
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<FenceImpl*>(fences[i]);
+ if (!fenceImpl->waitForFence(fenceValues[i], timeout))
+ {
+ return SLANG_FAIL;
+ }
+ }
+ return SLANG_OK;
}
} // namespace metal