mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 15:49:50 -06:00
Merge pull request #9190 from iwubcode/enable_vulkan_windows_solution
VideoCommon: enable vulkan in windows solution, update CMake vulkan option to match opengl
This commit is contained in:
@ -115,8 +115,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Binaries)
|
|||||||
if (WIN32)
|
if (WIN32)
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/Binary)
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/Binary)
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||||
string(APPEND CMAKE_RUNTIME_OUTPUT_DIRECTORY /ARM64)
|
string(APPEND CMAKE_RUNTIME_OUTPUT_DIRECTORY /ARM64)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||||
@ -557,7 +557,12 @@ add_subdirectory(Externals/imgui)
|
|||||||
add_subdirectory(Externals/glslang)
|
add_subdirectory(Externals/glslang)
|
||||||
|
|
||||||
if(ENABLE_VULKAN)
|
if(ENABLE_VULKAN)
|
||||||
add_definitions(-DUSE_VULKAN)
|
add_definitions(-DHAS_VULKAN)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT WIN32 OR (NOT (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")))
|
||||||
|
# OpenGL is available on all platforms except windows-arm64
|
||||||
|
add_definitions(-DHAS_OPENGL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(pugixml)
|
find_package(pugixml)
|
||||||
|
@ -22,11 +22,6 @@
|
|||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
|
|
||||||
// OpenGL is not available on Windows-on-ARM64
|
|
||||||
#if !defined(_WIN32) || !defined(_M_ARM64)
|
|
||||||
#define HAS_OPENGL 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// TODO: ugly
|
// TODO: ugly
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "VideoBackends/D3D/VideoBackend.h"
|
#include "VideoBackends/D3D/VideoBackend.h"
|
||||||
@ -37,7 +32,9 @@
|
|||||||
#include "VideoBackends/OGL/VideoBackend.h"
|
#include "VideoBackends/OGL/VideoBackend.h"
|
||||||
#include "VideoBackends/Software/VideoBackend.h"
|
#include "VideoBackends/Software/VideoBackend.h"
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAS_VULKAN
|
||||||
#include "VideoBackends/Vulkan/VideoBackend.h"
|
#include "VideoBackends/Vulkan/VideoBackend.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "VideoCommon/AsyncRequests.h"
|
#include "VideoCommon/AsyncRequests.h"
|
||||||
#include "VideoCommon/BPStructs.h"
|
#include "VideoCommon/BPStructs.h"
|
||||||
@ -225,7 +222,7 @@ const std::vector<std::unique_ptr<VideoBackendBase>>& VideoBackendBase::GetAvail
|
|||||||
backends.push_back(std::make_unique<DX11::VideoBackend>());
|
backends.push_back(std::make_unique<DX11::VideoBackend>());
|
||||||
backends.push_back(std::make_unique<DX12::VideoBackend>());
|
backends.push_back(std::make_unique<DX12::VideoBackend>());
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_VULKAN
|
#ifdef HAS_VULKAN
|
||||||
backends.push_back(std::make_unique<Vulkan::VideoBackend>());
|
backends.push_back(std::make_unique<Vulkan::VideoBackend>());
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAS_OPENGL
|
#ifdef HAS_OPENGL
|
||||||
|
@ -15,6 +15,16 @@
|
|||||||
<Import Project="$(VSPropsDir)PCHUse.props" />
|
<Import Project="$(VSPropsDir)PCHUse.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<PreprocessorDefinitions>HAS_OPENGL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<PreprocessorDefinitions>HAS_VULKAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="AbstractFramebuffer.cpp" />
|
<ClCompile Include="AbstractFramebuffer.cpp" />
|
||||||
<ClCompile Include="AbstractStagingTexture.cpp" />
|
<ClCompile Include="AbstractStagingTexture.cpp" />
|
||||||
@ -191,4 +201,4 @@
|
|||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
Reference in New Issue
Block a user