diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-07-08 00:57:06 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-07-08 00:57:06 +0000 |
| commit | 1a8dcfc6cf776bacdabe7eb36caa5e0f2d0d3470 (patch) | |
| tree | 91792ed3265e9d5b201b573490c8585225dbd866 /Projects | |
| parent | Updated core submodule (diff) | |
| download | DiligentEngine-1a8dcfc6cf776bacdabe7eb36caa5e0f2d0d3470.tar.gz DiligentEngine-1a8dcfc6cf776bacdabe7eb36caa5e0f2d0d3470.zip | |
Disabled Vulkan on 32-bit Windows
Diffstat (limited to 'Projects')
| -rw-r--r-- | Projects/Asteroids/CMakeLists.txt | 8 | ||||
| -rw-r--r-- | Projects/Asteroids/src/WinWrapper.cpp | 2 | ||||
| -rw-r--r-- | Projects/Asteroids/src/asteroids_DE.cpp | 8 |
3 files changed, 17 insertions, 1 deletions
diff --git a/Projects/Asteroids/CMakeLists.txt b/Projects/Asteroids/CMakeLists.txt index 6aa9866..8fe0b5c 100644 --- a/Projects/Asteroids/CMakeLists.txt +++ b/Projects/Asteroids/CMakeLists.txt @@ -111,7 +111,6 @@ PRIVATE GraphicsEngineD3D11-shared GraphicsEngineD3D12-shared GraphicsEngineOpenGL-shared - GraphicsEngineVk-shared TargetPlatform TextureLoader Common @@ -125,6 +124,13 @@ PRIVATE shcore.lib ) +if(VULKAN_SUPPORTED) + target_link_libraries(Asteroids + PRIVATE + GraphicsEngineVk-shared + ) +endif() + set_common_target_properties(Asteroids) if(MSVC) diff --git a/Projects/Asteroids/src/WinWrapper.cpp b/Projects/Asteroids/src/WinWrapper.cpp index 6b0ecfe..adcb287 100644 --- a/Projects/Asteroids/src/WinWrapper.cpp +++ b/Projects/Asteroids/src/WinWrapper.cpp @@ -397,7 +397,9 @@ int main(int argc, char** argv) gd3d11Available = CheckDll("d3d11.dll"); gd3d12Available = CheckDll("d3d12.dll"); +#if VULKAN_SUPPORTED gVulkanAvailable = CheckDll("vulkan-1.dll"); +#endif // Must be done before any windowing-system-like things or else virtualization will kick in auto dpi = SetupDPI(); diff --git a/Projects/Asteroids/src/asteroids_DE.cpp b/Projects/Asteroids/src/asteroids_DE.cpp index 522bd8f..0ac1b3c 100644 --- a/Projects/Asteroids/src/asteroids_DE.cpp +++ b/Projects/Asteroids/src/asteroids_DE.cpp @@ -24,7 +24,11 @@ #include "RenderDeviceFactoryD3D11.h" #include "RenderDeviceFactoryD3D12.h" #include "RenderDeviceFactoryOpenGL.h" + +#if VULKAN_SUPPORTED #include "RenderDeviceFactoryVk.h" +#endif + #include "BasicShaderSourceStreamFactory.h" #include "MapHelper.h" @@ -43,8 +47,10 @@ namespace Diligent GetEngineFactoryD3D11Type GetEngineFactoryD3D11 = nullptr; GetEngineFactoryD3D12Type GetEngineFactoryD3D12 = nullptr; GetEngineFactoryOpenGLType GetEngineFactoryOpenGL = nullptr; +#if VULKAN_SUPPORTED GetEngineFactoryVkType GetEngineFactoryVulkan = nullptr; #endif +#endif } namespace AsteroidsDE { @@ -97,6 +103,7 @@ void Asteroids::InitDevice(HWND hWnd, DeviceType DevType) pFactoryD3D12->CreateDeviceAndContextsD3D12( Attribs, &mDevice, ppContexts.data(), mNumSubsets-1 ); pFactoryD3D12->CreateSwapChainD3D12( mDevice, ppContexts[0], SwapChainDesc, FullScreenModeDesc{}, hWnd, &mSwapChain ); } +#if VULKAN_SUPPORTED else if(DevType == DeviceType::Vulkan) { EngineVkAttribs Attribs; @@ -109,6 +116,7 @@ void Asteroids::InitDevice(HWND hWnd, DeviceType DevType) pFactoryVk->CreateDeviceAndContextsVk( Attribs, &mDevice, ppContexts.data(), mNumSubsets-1 ); pFactoryVk->CreateSwapChainVk( mDevice, ppContexts[0], SwapChainDesc, hWnd, &mSwapChain ); } +#endif else { UNEXPECTED("Unexpected device type"); |
