diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-04-23 05:10:22 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-04-23 05:10:22 +0000 |
| commit | 4ec57381190d632e56d4b56b2a0f1ec7d80d1446 (patch) | |
| tree | 9e631d6bb1d317fa63ce90ec863d11ca89307a42 /Graphics/GraphicsEngineVulkan | |
| parent | First Vulkan triangle! (diff) | |
| download | DiligentCore-4ec57381190d632e56d4b56b2a0f1ec7d80d1446.tar.gz DiligentCore-4ec57381190d632e56d4b56b2a0f1ec7d80d1446.zip | |
Fixed Vulkan clip space using viewport inversion & VK_KHR_MAINTENANCE1_EXTENSION_NAME
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp | 4 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/src/RenderDeviceFactoryVk.cpp | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp index ea131505..fb6bff25 100644 --- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp @@ -775,9 +775,9 @@ namespace Diligent for( Uint32 vp = 0; vp < m_NumViewports; ++vp ) { VkViewports[vp].x = m_Viewports[vp].TopLeftX; - VkViewports[vp].y = m_Viewports[vp].TopLeftY; + VkViewports[vp].y = m_FramebufferHeight - m_Viewports[vp].TopLeftY; VkViewports[vp].width = m_Viewports[vp].Width; - VkViewports[vp].height = m_Viewports[vp].Height; + VkViewports[vp].height = -m_Viewports[vp].Height; VkViewports[vp].minDepth = m_Viewports[vp].MinDepth; VkViewports[vp].maxDepth = m_Viewports[vp].MaxDepth; } diff --git a/Graphics/GraphicsEngineVulkan/src/RenderDeviceFactoryVk.cpp b/Graphics/GraphicsEngineVulkan/src/RenderDeviceFactoryVk.cpp index 47300c06..2cfab085 100644 --- a/Graphics/GraphicsEngineVulkan/src/RenderDeviceFactoryVk.cpp +++ b/Graphics/GraphicsEngineVulkan/src/RenderDeviceFactoryVk.cpp @@ -160,7 +160,11 @@ void EngineFactoryVkImpl::CreateDeviceAndContextsVk( const EngineVkAttribs& Crea DeviceCreateInfo.pEnabledFeatures = &DeviceFeatures; // NULL or a pointer to a VkPhysicalDeviceFeatures structure that contains // boolean indicators of all the features to be enabled. - std::vector<const char*> DeviceExtensions = { VK_KHR_SWAPCHAIN_EXTENSION_NAME }; + std::vector<const char*> DeviceExtensions = + { + VK_KHR_SWAPCHAIN_EXTENSION_NAME, + VK_KHR_MAINTENANCE1_EXTENSION_NAME // To allow negative viewport height + }; const bool DebugMarkersSupported = PhysicalDevice->IsExtensionSupported(VK_EXT_DEBUG_MARKER_EXTENSION_NAME); if (DebugMarkersSupported && CreationAttribs.EnableValidation) { |
