diff options
author | 2016-10-10 17:04:52 -0400 | |
---|---|---|
committer | 2016-10-11 19:15:09 +0000 | |
commit | bbdf45e34ffdd6a873033d393de433dca8931c04 (patch) | |
tree | e32990bbd476269730642b428dfd729fdc499d2d | |
parent | 31d097e865f266c8398f45114e4c75c0dfdef058 (diff) |
Fix 32-bit Vulkan build
In 32-bit land, VkFence is uint64_t, so reinterpret_cast (between two
identical integral types) is illegal.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3143
Change-Id: Iba9507f5678f647710f4abd35023c192bf6eed66
Reviewed-on: https://skia-review.googlesource.com/3143
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
-rw-r--r-- | tools/gpu/vk/VkTestContext.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/gpu/vk/VkTestContext.cpp b/tools/gpu/vk/VkTestContext.cpp index a76a361a37..92bef7cf46 100644 --- a/tools/gpu/vk/VkTestContext.cpp +++ b/tools/gpu/vk/VkTestContext.cpp @@ -77,18 +77,18 @@ public: submitInfo.pSignalSemaphores = nullptr; GR_VK_CALL_ERRCHECK(fVk, QueueSubmit(fQueue, 1, &submitInfo, fence)); SkDEBUGCODE(++fUnfinishedSyncs;) - return reinterpret_cast<sk_gpu_test::PlatformFence>(fence); + return (sk_gpu_test::PlatformFence)fence; } bool waitFence(sk_gpu_test::PlatformFence opaqueFence) const override { - VkFence fence = reinterpret_cast<VkFence>(opaqueFence); + VkFence fence = (VkFence)opaqueFence; static constexpr uint64_t kForever = ~((uint64_t)0); auto result = GR_VK_CALL(fVk, WaitForFences(fDevice, 1, &fence, true, kForever)); return result != VK_TIMEOUT; } void deleteFence(sk_gpu_test::PlatformFence opaqueFence) const override { - VkFence fence = reinterpret_cast<VkFence>(opaqueFence); + VkFence fence = (VkFence)opaqueFence; GR_VK_CALL(fVk, DestroyFence(fDevice, fence, nullptr)); SkDEBUGCODE(--fUnfinishedSyncs;) } |