Skip to content

Commit

Permalink
fix UNIT64_MAX not declared Tencent#2009 (Tencent#2010)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncnnnnn authored Aug 7, 2020
1 parent 5a9c99c commit e2557c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2214,7 +2214,7 @@ int VkCompute::submit_and_wait()

// wait
{
VkResult ret = vkWaitForFences(vkdev->vkdevice(), 1, &compute_command_fence, VK_TRUE, UINT64_MAX);
VkResult ret = vkWaitForFences(vkdev->vkdevice(), 1, &compute_command_fence, VK_TRUE, (uint64_t)-1);
if (ret != VK_SUCCESS)
{
NCNN_LOGE("vkWaitForFences failed %d", ret);
Expand Down Expand Up @@ -2990,7 +2990,7 @@ int VkTransfer::submit_and_wait()
// wait
if (vkdev->info.unified_compute_transfer_queue)
{
VkResult ret = vkWaitForFences(vkdev->vkdevice(), 1, &compute_command_fence, VK_TRUE, UINT64_MAX);
VkResult ret = vkWaitForFences(vkdev->vkdevice(), 1, &compute_command_fence, VK_TRUE, (uint64_t)-1);
if (ret != VK_SUCCESS)
{
NCNN_LOGE("vkWaitForFences failed %d", ret);
Expand All @@ -3001,7 +3001,7 @@ int VkTransfer::submit_and_wait()
{
VkFence fences[2] = {upload_command_fence, compute_command_fence};

VkResult ret = vkWaitForFences(vkdev->vkdevice(), 2, fences, VK_TRUE, UINT64_MAX);
VkResult ret = vkWaitForFences(vkdev->vkdevice(), 2, fences, VK_TRUE, (uint64_t)-1);
if (ret != VK_SUCCESS)
{
NCNN_LOGE("vkWaitForFences failed %d", ret);
Expand Down

0 comments on commit e2557c1

Please sign in to comment.