Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite7ea066

Browse files
igl | vulkan | Return the waiting result fromPlatformDevice::waitOnSubmitHandle()
Reviewed By: xiendong, rudybearDifferential Revision: D71230828fbshipit-source-id: ac84eeb4921b46f2f87bc7a04276119568b87acb
1 parentdf41c6e commite7ea066

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

‎src/igl/vulkan/PlatformDevice.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,17 @@ VkFence PlatformDevice::getVkFenceFromSubmitHandle(SubmitHandle handle) const {
174174
return vkFence;
175175
}
176176

177-
voidPlatformDevice::waitOnSubmitHandle(SubmitHandle handle,uint64_t timeoutNanoseconds)const {
177+
boolPlatformDevice::waitOnSubmitHandle(SubmitHandle handle,uint64_t timeoutNanoseconds)const {
178178
if (handle ==0) {
179179
IGL_LOG_ERROR("Invalid submit handle passed to waitOnSubmitHandle");
180-
return;
180+
returnfalse;
181181
}
182182

183183
constauto& ctx = device_.getVulkanContext();
184184
constauto& immediateCommands = ctx.immediate_;
185185

186-
immediateCommands->wait(VulkanImmediateCommands::SubmitHandle(handle), timeoutNanoseconds);
186+
return immediateCommands->wait(VulkanImmediateCommands::SubmitHandle(handle),
187+
timeoutNanoseconds) != VK_TIMEOUT;
187188
}
188189

189190
#if defined(IGL_PLATFORM_ANDROID) && defined(VK_KHR_external_fence_fd)

‎src/igl/vulkan/PlatformDevice.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ class PlatformDevice : public IPlatformDevice {
5454

5555
/// Waits on the GPU Fence associated with the handle
5656
/// @param handle The handle to the GPU Fence
57-
voidwaitOnSubmitHandle(SubmitHandle handle,uint64_t timeoutNanoseconds = UINT64_MAX)const;
57+
/// @return 'true' when ready or 'false' on time out (can be ignored)
58+
// NOLINTNEXTLINE(modernize-use-nodiscard)
59+
boolwaitOnSubmitHandle(SubmitHandle handle,uint64_t timeoutNanoseconds = UINT64_MAX)const;
5860

5961
/// Android only for now - Creates the file descriptor for the underlying VkFence
6062
/// @param handle The handle to the GPU Fence

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp