Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove D3D9 support, to make future changes easier #19951

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 3 additions & 28 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -608,12 +608,6 @@ source_group(LOONGARCH64 FILES ${CommonLOONGARCH64})

if(WIN32)
set(CommonD3D
Common/GPU/D3D9/D3D9ShaderCompiler.cpp
Common/GPU/D3D9/D3D9ShaderCompiler.h
Common/GPU/D3D9/D3D9StateCache.cpp
Common/GPU/D3D9/D3D9StateCache.h
Common/GPU/D3D9/thin3d_d3d9.cpp
Common/GPU/D3D9/D3DCompilerLoader.cpp
Common/GPU/D3D11/thin3d_d3d11.cpp
Common/GPU/D3D11/D3D11Loader.cpp
Common/GPU/D3D11/D3D11Loader.h
Expand Down Expand Up @@ -1510,7 +1504,7 @@ else()
endif()

if(WIN32)
target_link_libraries(Common winmm d3d9 dsound dxguid Version)
target_link_libraries(Common winmm dsound dxguid Version)
endif()

if(NOT LIBRETRO)
Expand Down Expand Up @@ -1863,21 +1857,6 @@ set(GPU_VULKAN
GPU/Vulkan/VulkanUtil.h
)

set(GPU_D3D9
GPU/Directx9/DrawEngineDX9.cpp
GPU/Directx9/DrawEngineDX9.h
GPU/Directx9/FramebufferManagerDX9.cpp
GPU/Directx9/FramebufferManagerDX9.h
GPU/Directx9/GPU_DX9.cpp
GPU/Directx9/GPU_DX9.h
GPU/Directx9/ShaderManagerDX9.cpp
GPU/Directx9/ShaderManagerDX9.h
GPU/Directx9/StateMappingDX9.cpp
GPU/Directx9/StateMappingDX9.h
GPU/Directx9/TextureCacheDX9.cpp
GPU/Directx9/TextureCacheDX9.h
)

set(GPU_D3D11
GPU/D3D11/DrawEngineD3D11.cpp
GPU/D3D11/DrawEngineD3D11.h
Expand All @@ -1898,7 +1877,7 @@ set(GPU_D3D11
# We build Vulkan even on Apple to avoid annoying build differences.
set(GPU_IMPLS ${GPU_GLES} ${GPU_VULKAN})
if(WIN32)
list(APPEND GPU_IMPLS ${GPU_D3D9} ${GPU_D3D11})
list(APPEND GPU_IMPLS ${GPU_D3D11})
endif()

set(GPU_SOURCES
Expand Down Expand Up @@ -2674,8 +2653,6 @@ set(WindowsFiles
Windows/EmuThread.cpp
Windows/EmuThread.h
Windows/GeDebugger/GeDebugger.cpp
Windows/GPU/D3D9Context.cpp
Windows/GPU/D3D9Context.h
Windows/GPU/D3D11Context.cpp
Windows/GPU/D3D11Context.h
Windows/GPU/WindowsGLContext.cpp
Expand Down Expand Up @@ -2724,7 +2701,7 @@ set(WindowsFiles
list(APPEND LinkCommon ${CoreLibName} ${CMAKE_THREAD_LIBS_INIT})

if(WIN32)
list(APPEND LinkCommon kernel32 user32 gdi32 shell32 comctl32 dsound xinput d3d9 winmm dinput8 ole32 winspool ksuser dwmapi mf uxtheme mfplat mfreadwrite mfuuid shlwapi)
list(APPEND LinkCommon kernel32 user32 gdi32 shell32 comctl32 dsound xinput winmm dinput8 ole32 winspool ksuser dwmapi mf uxtheme mfplat mfreadwrite mfuuid shlwapi)
#setup_target_project(${TargetBin} Windows)
list(APPEND NativeAppSource ${WindowsFiles})
endif()
Expand Down Expand Up @@ -2781,8 +2758,6 @@ if(HEADLESS)
list(APPEND HeadlessSource
headless/WindowsHeadlessHost.cpp
headless/WindowsHeadlessHost.h
Windows/GPU/D3D9Context.cpp
Windows/GPU/D3D9Context.h
Windows/GPU/D3D11Context.cpp
Windows/GPU/D3D11Context.h
Windows/GPU/WindowsGLContext.cpp
Expand Down
7 changes: 0 additions & 7 deletions Common/Common.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,6 @@
<ClInclude Include="File\VFS\VFS.h" />
<ClInclude Include="File\VFS\ZipFileReader.h" />
<ClInclude Include="GPU\D3D11\D3D11Loader.h" />
<ClInclude Include="GPU\D3D9\D3DCompilerLoader.h" />
<ClInclude Include="GPU\D3D9\D3D9ShaderCompiler.h" />
<ClInclude Include="GPU\D3D9\D3D9StateCache.h" />
<ClInclude Include="GPU\DataFormat.h" />
<ClInclude Include="GPU\GPUBackendCommon.h" />
<ClInclude Include="GPU\MiscTypes.h" />
Expand Down Expand Up @@ -991,10 +988,6 @@
<ClCompile Include="File\VFS\ZipFileReader.cpp" />
<ClCompile Include="GPU\D3D11\D3D11Loader.cpp" />
<ClCompile Include="GPU\D3D11\thin3d_d3d11.cpp" />
<ClCompile Include="GPU\D3D9\D3DCompilerLoader.cpp" />
<ClCompile Include="GPU\D3D9\D3D9ShaderCompiler.cpp" />
<ClCompile Include="GPU\D3D9\D3D9StateCache.cpp" />
<ClCompile Include="GPU\D3D9\thin3d_d3d9.cpp" />
<ClCompile Include="GPU\GPUBackendCommon.cpp" />
<ClCompile Include="GPU\OpenGL\DataFormatGL.cpp" />
<ClCompile Include="GPU\OpenGL\gl3stub.c" />
Expand Down
24 changes: 0 additions & 24 deletions Common/Common.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,6 @@
<ClInclude Include="UI\ViewGroup.h">
<Filter>UI</Filter>
</ClInclude>
<ClInclude Include="GPU\D3D9\D3DCompilerLoader.h">
<Filter>GPU\D3D9</Filter>
</ClInclude>
<ClInclude Include="GPU\D3D9\D3D9ShaderCompiler.h">
<Filter>GPU\D3D9</Filter>
</ClInclude>
<ClInclude Include="GPU\D3D9\D3D9StateCache.h">
<Filter>GPU\D3D9</Filter>
</ClInclude>
<ClInclude Include="GPU\D3D11\D3D11Loader.h">
<Filter>GPU\D3D11</Filter>
</ClInclude>
Expand Down Expand Up @@ -911,21 +902,9 @@
<ClCompile Include="UI\ViewGroup.cpp">
<Filter>UI</Filter>
</ClCompile>
<ClCompile Include="GPU\D3D9\thin3d_d3d9.cpp">
<Filter>GPU\D3D9</Filter>
</ClCompile>
<ClCompile Include="GPU\D3D11\thin3d_d3d11.cpp">
<Filter>GPU\D3D11</Filter>
</ClCompile>
<ClCompile Include="GPU\D3D9\D3DCompilerLoader.cpp">
<Filter>GPU\D3D9</Filter>
</ClCompile>
<ClCompile Include="GPU\D3D9\D3D9ShaderCompiler.cpp">
<Filter>GPU\D3D9</Filter>
</ClCompile>
<ClCompile Include="GPU\D3D9\D3D9StateCache.cpp">
<Filter>GPU\D3D9</Filter>
</ClCompile>
<ClCompile Include="GPU\D3D11\D3D11Loader.cpp">
<Filter>GPU\D3D11</Filter>
</ClCompile>
Expand Down Expand Up @@ -1368,9 +1347,6 @@
<Filter Include="GPU">
<UniqueIdentifier>{3b448d70-d5c6-4732-96f0-29f3e101bfe8}</UniqueIdentifier>
</Filter>
<Filter Include="GPU\D3D9">
<UniqueIdentifier>{a1745de8-f61a-4f11-b715-705a8812862e}</UniqueIdentifier>
</Filter>
<Filter Include="GPU\D3D11">
<UniqueIdentifier>{8241d0c2-78c8-4fc6-9543-69042ec5eb54}</UniqueIdentifier>
</Filter>
Expand Down
7 changes: 1 addition & 6 deletions Common/GPU/D3D11/thin3d_d3d11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,12 +352,6 @@ D3D11DrawContext::D3D11DrawContext(ID3D11Device *device, ID3D11DeviceContext *de

caps_.isTilingGPU = false;

// Hide D3D9 when we know it likely won't work well.
caps_.supportsD3D9 = true;
if (!strcmp(adapterDesc_.c_str(), "Intel(R) Iris(R) Xe Graphics")) {
caps_.supportsD3D9 = false;
}

#ifndef __LIBRETRO__ // their build server uses an old SDK
if (swapChain_) {
DXGI_SWAP_CHAIN_DESC swapChainDesc;
Expand All @@ -368,6 +362,7 @@ D3D11DrawContext::D3D11DrawContext(ID3D11Device *device, ID3D11DeviceContext *de
}
}
#endif

// Temp texture for read-back of small images. Custom textures are created on demand for larger ones.
// TODO: Should really benchmark if this extra complexity has any benefit.
D3D11_TEXTURE2D_DESC packDesc{};
Expand Down
70 changes: 0 additions & 70 deletions Common/GPU/D3D9/D3D9ShaderCompiler.cpp

This file was deleted.

13 changes: 0 additions & 13 deletions Common/GPU/D3D9/D3D9ShaderCompiler.h

This file was deleted.

64 changes: 0 additions & 64 deletions Common/GPU/D3D9/D3D9StateCache.cpp

This file was deleted.

Loading
Loading