mirror of
https://github.com/libretro/RetroArch
synced 2025-02-07 03:40:24 +00:00
Merge pull request #9933 from driver1998/angle
Win32/UWP: D3D driver get_metrics support, D3D11 -> GL failback
This commit is contained in:
commit
07700d77bd
@ -321,7 +321,7 @@ enum midi_driver_enum
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_METAL;
|
||||
#elif defined(HAVE_VITA2D)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_VITA2D;
|
||||
#elif defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) || defined(__CELLOS_LV2__)
|
||||
#elif (defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) || defined(__CELLOS_LV2__)) && !defined(__WINRT__)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_GL;
|
||||
#elif defined(HAVE_OPENGL_CORE)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_GL_CORE;
|
||||
|
@ -970,6 +970,7 @@ static void *d3d10_gfx_init(const video_info_t* video,
|
||||
|
||||
{
|
||||
d3d10_fake_context.get_flags = d3d10_get_flags;
|
||||
d3d10_fake_context.get_metrics = win32_get_metrics;
|
||||
video_context_driver_set(&d3d10_fake_context);
|
||||
#ifdef HAVE_SLANG
|
||||
const char *shader_preset = retroarch_get_shader_preset();
|
||||
|
@ -674,8 +674,7 @@ static void *d3d11_gfx_init(const video_info_t* video,
|
||||
{
|
||||
D3D_FEATURE_LEVEL_11_0,
|
||||
D3D_FEATURE_LEVEL_10_1,
|
||||
D3D_FEATURE_LEVEL_10_0,
|
||||
D3D_FEATURE_LEVEL_9_3
|
||||
D3D_FEATURE_LEVEL_10_0
|
||||
};
|
||||
#ifdef __WINRT__
|
||||
/* UWP requires the use of newer version of the factory which requires newer version of this struct */
|
||||
@ -1046,6 +1045,7 @@ static void *d3d11_gfx_init(const video_info_t* video,
|
||||
|
||||
{
|
||||
d3d11_fake_context.get_flags = d3d11_get_flags;
|
||||
d3d11_fake_context.get_metrics = win32_get_metrics;
|
||||
video_context_driver_set(&d3d11_fake_context);
|
||||
const char *shader_preset = retroarch_get_shader_preset();
|
||||
enum rarch_shader_type type = video_shader_parse_type(shader_preset);
|
||||
@ -1131,6 +1131,17 @@ static void *d3d11_gfx_init(const video_info_t* video,
|
||||
|
||||
error:
|
||||
d3d11_gfx_free(d3d11);
|
||||
|
||||
#ifdef HAVE_OPENGL
|
||||
retroarch_force_video_driver_fallback("gl");
|
||||
#elif !defined(__WINRT__)
|
||||
#ifdef HAVE_OPENGL1
|
||||
retroarch_force_video_driver_fallback("gl1");
|
||||
#else
|
||||
retroarch_force_video_driver_fallback("gdi");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1009,6 +1009,7 @@ static void *d3d12_gfx_init(const video_info_t* video,
|
||||
|
||||
{
|
||||
d3d12_fake_context.get_flags = d3d12_get_flags;
|
||||
d3d12_fake_context.get_metrics = win32_get_metrics;
|
||||
video_context_driver_set(&d3d12_fake_context);
|
||||
const char *shader_preset = retroarch_get_shader_preset();
|
||||
enum rarch_shader_type type = video_shader_parse_type(shader_preset);
|
||||
|
@ -1216,6 +1216,9 @@ static bool d3d9_init_internal(d3d9_video_t *d3d,
|
||||
{
|
||||
|
||||
d3d9_fake_context.get_flags = d3d9_get_flags;
|
||||
#ifndef _XBOX_
|
||||
d3d9_fake_context.get_metrics = win32_get_metrics;
|
||||
#endif
|
||||
video_context_driver_set(&d3d9_fake_context);
|
||||
#if defined(HAVE_CG) || defined(HAVE_HLSL)
|
||||
{
|
||||
|
@ -1426,7 +1426,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;WANT_GLSLANG;HAVE_SLANG;HAVE_GLSLANG;HAVE_SPIRV_CROSS;HAVE_ONLINE_UPDATER;HAVE_UPDATE_ASSETS;HAVE_UPDATE_CORES;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_D3D12;HAVE_VULKAN;ENABLE_HLSL;RC_DISABLE_LUA;HAVE_WASAPI;HAVE_GLSL;HAVE_CHEEVOS;HAVE_RUNAHEAD;HAVE_TRANSLATE;HAVE_CDROM;HAVE_GRIFFIN;HAVE_GDI;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_OZONE;HAVE_SHADERPIPELINE;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGLES;HAVE_OPENGLES2;HAVE_OPENGL_CORE;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_NETPLAYDISCOVERY;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_MENU_WIDGETS;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_AUDIOMIXER;HAVE_STB_FONT;HAVE_ANGLE</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;RARCH_INTERNAL;HAVE_CC_RESAMPLER;WANT_GLSLANG;HAVE_SLANG;HAVE_GLSLANG;HAVE_SPIRV_CROSS;HAVE_ONLINE_UPDATER;HAVE_UPDATE_ASSETS;HAVE_UPDATE_CORES;HAVE_D3D;HAVE_D3D9;HAVE_D3D10;HAVE_D3D11;HAVE_D3D12;HAVE_VULKAN;ENABLE_HLSL;RC_DISABLE_LUA;HAVE_WASAPI;HAVE_GLSL;HAVE_CHEEVOS;HAVE_RUNAHEAD;HAVE_TRANSLATE;HAVE_CDROM;HAVE_GRIFFIN;HAVE_GDI;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_XMB;HAVE_OZONE;HAVE_SHADERPIPELINE;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_DINPUT;HAVE_XINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_OPENGL_CORE;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_NETPLAYDISCOVERY;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_MENU_WIDGETS;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_AUDIOMIXER;HAVE_STB_FONT</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\..\;$(MSBuildProjectDirectory)\..\..\..\deps\rcheevos\include;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include\compat\zlib;$(MSBuildProjectDirectory)\..\..\..\libretro-common\include;$(MSBuildProjectDirectory)\..\..\..\deps;$(MSBuildProjectDirectory)\..\..\..\deps\glslang;$(MSBuildProjectDirectory)\..\..\..\deps\SPIRV-Cross;$(MSBuildProjectDirectory)\..\..\..\deps\stb;$(MSBuildProjectDirectory)\..\..\..\gfx\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
|
Loading…
x
Reference in New Issue
Block a user