summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-07-08 00:24:08 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-07-08 00:24:08 +0000
commit411ce89cfa239d5fcca8416ced74542123509625 (patch)
tree17e43125242c7df631bd8536460641d96929a16d /Graphics/GraphicsEngineVulkan
parentAdded vulkan-1.lib (diff)
downloadDiligentCore-411ce89cfa239d5fcca8416ced74542123509625.tar.gz
DiligentCore-411ce89cfa239d5fcca8416ced74542123509625.zip
Disabled Vulkan on 32-bit windows
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h4
-rw-r--r--Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h6
-rw-r--r--Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanMemoryManager.h2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp6
4 files changed, 11 insertions, 7 deletions
diff --git a/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h b/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h
index 3d4f11a0..9bcd789d 100644
--- a/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h
@@ -91,8 +91,8 @@ public:
virtual void* GetNativeHandle()override final
{
- auto VkBuffer = GetVkBuffer();
- return VkBuffer;
+ auto vkBuffer = GetVkBuffer();
+ return vkBuffer;
}
virtual void SetAccessFlags(VkAccessFlags AccessFlags)override final
diff --git a/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h b/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h
index 20223b3e..660dd151 100644
--- a/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h
@@ -68,7 +68,11 @@ public:
virtual void Unmap( IDeviceContext* pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags )override;
virtual VkImage GetVkImage()const override final{ return m_VulkanImage; }
- virtual void* GetNativeHandle()override final { return GetVkImage(); }
+ virtual void* GetNativeHandle()override final
+ {
+ auto vkImage = GetVkImage();
+ return vkImage;
+ }
/*
virtual void SetVkResourceState(Vk_RESOURCE_STATES state)override final{ SetState(state); }
*/
diff --git a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanMemoryManager.h b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanMemoryManager.h
index 8a50da8d..270a3030 100644
--- a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanMemoryManager.h
+++ b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanMemoryManager.h
@@ -171,7 +171,7 @@ public:
m_CurrAllocatedSize (rhs.m_CurrAllocatedSize),
m_PeakAllocatedSize (rhs.m_PeakAllocatedSize)
{
- for(int i=0; i < m_CurrUsedSize.size(); ++i)
+ for(size_t i=0; i < m_CurrUsedSize.size(); ++i)
m_CurrUsedSize[i].store(rhs.m_CurrUsedSize[i].load());
}
diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
index fda3cf55..9ff94d20 100644
--- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
@@ -972,7 +972,7 @@ namespace Diligent
}
else
{
- FBKey.DSV = nullptr;
+ FBKey.DSV = VK_NULL_HANDLE;
RenderPassKey.DSVFormat = TEX_FORMAT_UNKNOWN;
}
@@ -994,7 +994,7 @@ namespace Diligent
}
else
{
- FBKey.RTVs[rt] = nullptr;
+ FBKey.RTVs[rt] = VK_NULL_HANDLE;
RenderPassKey.RTVFormats[rt] = TEX_FORMAT_UNKNOWN;
}
}
@@ -1043,7 +1043,7 @@ namespace Diligent
{
VERIFY(pBuffVk->GetDesc().Usage != USAGE_DYNAMIC, "Dynamic buffers must be updated via Map()");
VERIFY_EXPR( static_cast<size_t>(NumBytes) == NumBytes );
- auto TmpSpace = m_UploadHeap.Allocate(NumBytes);
+ auto TmpSpace = m_UploadHeap.Allocate(static_cast<size_t>(NumBytes));
auto CPUAddress = TmpSpace.MemAllocation.Page->GetCPUMemory();
memcpy(reinterpret_cast<Uint8*>(CPUAddress) + TmpSpace.MemAllocation.UnalignedOffset, pData, static_cast<size_t>(NumBytes));
UpdateBufferRegion(pBuffVk, DstOffset, NumBytes, TmpSpace.vkBuffer, TmpSpace.MemAllocation.UnalignedOffset);