Commit b8f6cc23 authored by Jonathan Ross's avatar Jonathan Ross Committed by Commit Bot

Fix Vulkan Compile on Windows

gpu/vulkan was not compiling on Windows. This fixes the errors.

Bug: 961874
Change-Id: I7c3412819d0d445d48c12f43ce175284317c99d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1610450Reviewed-by: default avatarJonathan Ross <jonross@chromium.org>
Reviewed-by: default avatarJonathan Backer <backer@chromium.org>
Commit-Queue: Jonathan Ross <jonross@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659191}
parent c5b0e657
...@@ -38,7 +38,7 @@ SemaphoreHandle SemaphoreHandle::Duplicate() const { ...@@ -38,7 +38,7 @@ SemaphoreHandle SemaphoreHandle::Duplicate() const {
base::ScopedFD(HANDLE_EINTR(dup(handle_.get())))); base::ScopedFD(HANDLE_EINTR(dup(handle_.get()))));
#elif defined(OS_WIN) #elif defined(OS_WIN)
HANDLE handle_dup; HANDLE handle_dup;
if (!::DuplicateHandle(::GetCurrentProcess(), handle_.get(), if (!::DuplicateHandle(::GetCurrentProcess(), handle_.Get(),
::GetCurrentProcess(), &handle_dup, 0, FALSE, ::GetCurrentProcess(), &handle_dup, 0, FALSE,
DUPLICATE_SAME_ACCESS)) { DUPLICATE_SAME_ACCESS)) {
return SemaphoreHandle(); return SemaphoreHandle();
......
...@@ -51,7 +51,13 @@ class VULKAN_EXPORT SemaphoreHandle { ...@@ -51,7 +51,13 @@ class VULKAN_EXPORT SemaphoreHandle {
VkExternalSemaphoreHandleTypeFlagBits vk_handle_type() { return type_; } VkExternalSemaphoreHandleTypeFlagBits vk_handle_type() { return type_; }
bool is_valid() const { return handle_.is_valid(); } bool is_valid() const {
#if defined(OS_WIN)
return handle_.IsValid();
#else
return handle_.is_valid();
#endif
}
// Returns underlying platform-specific handle for the semaphore. is_valid() // Returns underlying platform-specific handle for the semaphore. is_valid()
// becomes false after this function returns. // becomes false after this function returns.
......
...@@ -22,7 +22,7 @@ class VulkanDeviceQueue; ...@@ -22,7 +22,7 @@ class VulkanDeviceQueue;
class VULKAN_EXPORT VulkanSwapChain { class VULKAN_EXPORT VulkanSwapChain {
public: public:
class ScopedWrite { class VULKAN_EXPORT ScopedWrite {
public: public:
explicit ScopedWrite(VulkanSwapChain* swap_chain); explicit ScopedWrite(VulkanSwapChain* swap_chain);
~ScopedWrite(); ~ScopedWrite();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment