From 5ee9cfef0d07bfcb31e752869f1801e978717005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 19 Oct 2020 23:28:40 +0200 Subject: [PATCH] Remove support for D3D11_level_9 (previously only really used for Windows Phone, probably). Can always fall back to D3D9, which is not going away anytime soon and still needs to be there. One less HLSL variant to care about. --- Common/GPU/D3D11/thin3d_d3d11.cpp | 3 +++ GPU/Common/DepalettizeShaderCommon.cpp | 1 - GPU/Common/PresentationCommon.cpp | 3 +-- GPU/Common/ShaderCommon.h | 1 - GPU/D3D11/ShaderManagerD3D11.cpp | 4 ++-- GPU/Directx9/FragmentShaderGeneratorHLSL.cpp | 9 ++++----- GPU/Directx9/VertexShaderGeneratorHLSL.cpp | 8 ++++---- Windows/GPU/D3D11Context.cpp | 3 --- libretro/LibretroD3D11Context.cpp | 6 ++++++ 9 files changed, 20 insertions(+), 18 deletions(-) diff --git a/Common/GPU/D3D11/thin3d_d3d11.cpp b/Common/GPU/D3D11/thin3d_d3d11.cpp index 3827b79052..2c1aaeb1f6 100644 --- a/Common/GPU/D3D11/thin3d_d3d11.cpp +++ b/Common/GPU/D3D11/thin3d_d3d11.cpp @@ -233,6 +233,9 @@ D3D11DrawContext::D3D11DrawContext(ID3D11Device *device, ID3D11DeviceContext *de hWnd_(hWnd), deviceList_(deviceList) { + // We no longer support Windows Phone. + _assert_(featureLevel_ >= D3D_FEATURE_LEVEL_9_3); + // Seems like a fair approximation... caps_.dualSourceBlend = featureLevel_ >= D3D_FEATURE_LEVEL_10_0; caps_.depthClampSupported = featureLevel_ >= D3D_FEATURE_LEVEL_10_0; diff --git a/GPU/Common/DepalettizeShaderCommon.cpp b/GPU/Common/DepalettizeShaderCommon.cpp index 28449d69b9..5a0c7c6e4a 100644 --- a/GPU/Common/DepalettizeShaderCommon.cpp +++ b/GPU/Common/DepalettizeShaderCommon.cpp @@ -329,7 +329,6 @@ void GenerateDepalShader(char *buffer, GEBufferFormat pixelFormat, ShaderLanguag case HLSL_DX9: GenerateDepalShaderFloat(buffer, pixelFormat, language); break; - case HLSL_D3D11_LEVEL9: default: _assert_msg_(false, "Depal shader language not supported: %d", (int)language); } diff --git a/GPU/Common/PresentationCommon.cpp b/GPU/Common/PresentationCommon.cpp index 5d62f1a7fe..e969e390e4 100644 --- a/GPU/Common/PresentationCommon.cpp +++ b/GPU/Common/PresentationCommon.cpp @@ -372,7 +372,7 @@ Draw::Pipeline *PresentationCommon::CreatePipeline(std::vectorfeatureLevel < D3D_FEATURE_LEVEL_10_0) { + ERROR_LOG(G3D, "D3D11 featureLevel not high enough - rejecting!\n"); + return; + } + ptr_D3DCompile = d3d11_->D3DCompile; ID3D11Device1 *device1 = nullptr;