Skip to content

Commit bc63bd7

Browse files
authored
Merge pull request #19951 from hrydgard/remove-dx9
Remove D3D9 support, to make future changes easier
2 parents 3eafb1b + 6cfea96 commit bc63bd7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+89
-5777
lines changed

CMakeLists.txt

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -604,12 +604,6 @@ source_group(LOONGARCH64 FILES ${CommonLOONGARCH64})
604604

605605
if(WIN32)
606606
set(CommonD3D
607-
Common/GPU/D3D9/D3D9ShaderCompiler.cpp
608-
Common/GPU/D3D9/D3D9ShaderCompiler.h
609-
Common/GPU/D3D9/D3D9StateCache.cpp
610-
Common/GPU/D3D9/D3D9StateCache.h
611-
Common/GPU/D3D9/thin3d_d3d9.cpp
612-
Common/GPU/D3D9/D3DCompilerLoader.cpp
613607
Common/GPU/D3D11/thin3d_d3d11.cpp
614608
Common/GPU/D3D11/D3D11Loader.cpp
615609
Common/GPU/D3D11/D3D11Loader.h
@@ -1516,7 +1510,7 @@ else()
15161510
endif()
15171511

15181512
if(WIN32)
1519-
target_link_libraries(Common winmm d3d9 dsound dxguid Version)
1513+
target_link_libraries(Common winmm dsound dxguid Version)
15201514
endif()
15211515

15221516
if(NOT LIBRETRO)
@@ -1875,21 +1869,6 @@ set(GPU_VULKAN
18751869
GPU/Vulkan/VulkanUtil.h
18761870
)
18771871

1878-
set(GPU_D3D9
1879-
GPU/Directx9/DrawEngineDX9.cpp
1880-
GPU/Directx9/DrawEngineDX9.h
1881-
GPU/Directx9/FramebufferManagerDX9.cpp
1882-
GPU/Directx9/FramebufferManagerDX9.h
1883-
GPU/Directx9/GPU_DX9.cpp
1884-
GPU/Directx9/GPU_DX9.h
1885-
GPU/Directx9/ShaderManagerDX9.cpp
1886-
GPU/Directx9/ShaderManagerDX9.h
1887-
GPU/Directx9/StateMappingDX9.cpp
1888-
GPU/Directx9/StateMappingDX9.h
1889-
GPU/Directx9/TextureCacheDX9.cpp
1890-
GPU/Directx9/TextureCacheDX9.h
1891-
)
1892-
18931872
set(GPU_D3D11
18941873
GPU/D3D11/DrawEngineD3D11.cpp
18951874
GPU/D3D11/DrawEngineD3D11.h
@@ -1910,7 +1889,7 @@ set(GPU_D3D11
19101889
# We build Vulkan even on Apple to avoid annoying build differences.
19111890
set(GPU_IMPLS ${GPU_GLES} ${GPU_VULKAN})
19121891
if(WIN32)
1913-
list(APPEND GPU_IMPLS ${GPU_D3D9} ${GPU_D3D11})
1892+
list(APPEND GPU_IMPLS ${GPU_D3D11})
19141893
endif()
19151894

19161895
set(GPU_SOURCES
@@ -2693,8 +2672,7 @@ set(WindowsFiles
26932672
Windows/DSoundStream.h
26942673
Windows/EmuThread.cpp
26952674
Windows/EmuThread.h
2696-
Windows/GPU/D3D9Context.cpp
2697-
Windows/GPU/D3D9Context.h
2675+
Windows/GeDebugger/GeDebugger.cpp
26982676
Windows/GPU/D3D11Context.cpp
26992677
Windows/GPU/D3D11Context.h
27002678
Windows/GPU/WindowsGLContext.cpp
@@ -2743,7 +2721,7 @@ set(WindowsFiles
27432721
list(APPEND LinkCommon ${CoreLibName} ${CMAKE_THREAD_LIBS_INIT})
27442722

27452723
if(WIN32)
2746-
list(APPEND LinkCommon kernel32 user32 gdi32 shell32 comctl32 dsound xinput d3d9 winmm dinput8 ole32 winspool ksuser dwmapi mf uxtheme mfplat mfreadwrite mfuuid shlwapi)
2724+
list(APPEND LinkCommon kernel32 user32 gdi32 shell32 comctl32 dsound xinput winmm dinput8 ole32 winspool ksuser dwmapi mf uxtheme mfplat mfreadwrite mfuuid shlwapi)
27472725
#setup_target_project(${TargetBin} Windows)
27482726
list(APPEND NativeAppSource ${WindowsFiles})
27492727
endif()
@@ -2800,8 +2778,6 @@ if(HEADLESS)
28002778
list(APPEND HeadlessSource
28012779
headless/WindowsHeadlessHost.cpp
28022780
headless/WindowsHeadlessHost.h
2803-
Windows/GPU/D3D9Context.cpp
2804-
Windows/GPU/D3D9Context.h
28052781
Windows/GPU/D3D11Context.cpp
28062782
Windows/GPU/D3D11Context.h
28072783
Windows/GPU/WindowsGLContext.cpp

Common/Common.vcxproj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,6 @@
500500
<ClInclude Include="File\VFS\VFS.h" />
501501
<ClInclude Include="File\VFS\ZipFileReader.h" />
502502
<ClInclude Include="GPU\D3D11\D3D11Loader.h" />
503-
<ClInclude Include="GPU\D3D9\D3DCompilerLoader.h" />
504-
<ClInclude Include="GPU\D3D9\D3D9ShaderCompiler.h" />
505-
<ClInclude Include="GPU\D3D9\D3D9StateCache.h" />
506503
<ClInclude Include="GPU\DataFormat.h" />
507504
<ClInclude Include="GPU\GPUBackendCommon.h" />
508505
<ClInclude Include="GPU\MiscTypes.h" />
@@ -996,10 +993,6 @@
996993
<ClCompile Include="File\VFS\ZipFileReader.cpp" />
997994
<ClCompile Include="GPU\D3D11\D3D11Loader.cpp" />
998995
<ClCompile Include="GPU\D3D11\thin3d_d3d11.cpp" />
999-
<ClCompile Include="GPU\D3D9\D3DCompilerLoader.cpp" />
1000-
<ClCompile Include="GPU\D3D9\D3D9ShaderCompiler.cpp" />
1001-
<ClCompile Include="GPU\D3D9\D3D9StateCache.cpp" />
1002-
<ClCompile Include="GPU\D3D9\thin3d_d3d9.cpp" />
1003996
<ClCompile Include="GPU\GPUBackendCommon.cpp" />
1004997
<ClCompile Include="GPU\OpenGL\DataFormatGL.cpp" />
1005998
<ClCompile Include="GPU\OpenGL\gl3stub.c" />

Common/Common.vcxproj.filters

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,6 @@
250250
<ClInclude Include="UI\ViewGroup.h">
251251
<Filter>UI</Filter>
252252
</ClInclude>
253-
<ClInclude Include="GPU\D3D9\D3DCompilerLoader.h">
254-
<Filter>GPU\D3D9</Filter>
255-
</ClInclude>
256-
<ClInclude Include="GPU\D3D9\D3D9ShaderCompiler.h">
257-
<Filter>GPU\D3D9</Filter>
258-
</ClInclude>
259-
<ClInclude Include="GPU\D3D9\D3D9StateCache.h">
260-
<Filter>GPU\D3D9</Filter>
261-
</ClInclude>
262253
<ClInclude Include="GPU\D3D11\D3D11Loader.h">
263254
<Filter>GPU\D3D11</Filter>
264255
</ClInclude>
@@ -923,21 +914,9 @@
923914
<ClCompile Include="UI\ViewGroup.cpp">
924915
<Filter>UI</Filter>
925916
</ClCompile>
926-
<ClCompile Include="GPU\D3D9\thin3d_d3d9.cpp">
927-
<Filter>GPU\D3D9</Filter>
928-
</ClCompile>
929917
<ClCompile Include="GPU\D3D11\thin3d_d3d11.cpp">
930918
<Filter>GPU\D3D11</Filter>
931919
</ClCompile>
932-
<ClCompile Include="GPU\D3D9\D3DCompilerLoader.cpp">
933-
<Filter>GPU\D3D9</Filter>
934-
</ClCompile>
935-
<ClCompile Include="GPU\D3D9\D3D9ShaderCompiler.cpp">
936-
<Filter>GPU\D3D9</Filter>
937-
</ClCompile>
938-
<ClCompile Include="GPU\D3D9\D3D9StateCache.cpp">
939-
<Filter>GPU\D3D9</Filter>
940-
</ClCompile>
941920
<ClCompile Include="GPU\D3D11\D3D11Loader.cpp">
942921
<Filter>GPU\D3D11</Filter>
943922
</ClCompile>
@@ -1383,9 +1362,6 @@
13831362
<Filter Include="GPU">
13841363
<UniqueIdentifier>{3b448d70-d5c6-4732-96f0-29f3e101bfe8}</UniqueIdentifier>
13851364
</Filter>
1386-
<Filter Include="GPU\D3D9">
1387-
<UniqueIdentifier>{a1745de8-f61a-4f11-b715-705a8812862e}</UniqueIdentifier>
1388-
</Filter>
13891365
<Filter Include="GPU\D3D11">
13901366
<UniqueIdentifier>{8241d0c2-78c8-4fc6-9543-69042ec5eb54}</UniqueIdentifier>
13911367
</Filter>

Common/GPU/D3D11/thin3d_d3d11.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -357,12 +357,6 @@ D3D11DrawContext::D3D11DrawContext(ComPtr<ID3D11Device> device, ComPtr<ID3D11Dev
357357

358358
caps_.isTilingGPU = false;
359359

360-
// Hide D3D9 when we know it likely won't work well.
361-
caps_.supportsD3D9 = true;
362-
if (!strcmp(adapterDesc_.c_str(), "Intel(R) Iris(R) Xe Graphics")) {
363-
caps_.supportsD3D9 = false;
364-
}
365-
366360
#ifndef __LIBRETRO__ // their build server uses an old SDK
367361
if (swapChain_) {
368362
DXGI_SWAP_CHAIN_DESC swapChainDesc;
@@ -373,6 +367,7 @@ D3D11DrawContext::D3D11DrawContext(ComPtr<ID3D11Device> device, ComPtr<ID3D11Dev
373367
}
374368
}
375369
#endif
370+
376371
// Temp texture for read-back of small images. Custom textures are created on demand for larger ones.
377372
// TODO: Should really benchmark if this extra complexity has any benefit.
378373
D3D11_TEXTURE2D_DESC packDesc{};
@@ -1650,7 +1645,6 @@ void D3D11DrawContext::CopyFramebufferImage(Framebuffer *srcfb, int level, int x
16501645
break;
16511646
case Aspect::NO_BIT:
16521647
case Aspect::STENCIL_BIT:
1653-
case Aspect::SURFACE_BIT:
16541648
case Aspect::VIEW_BIT:
16551649
case Aspect::FORMAT_BIT:
16561650
break;
@@ -1833,7 +1827,6 @@ bool D3D11DrawContext::CopyFramebufferToMemory(Framebuffer *src, Aspect channelB
18331827
}
18341828
break;
18351829
case Aspect::NO_BIT:
1836-
case Aspect::SURFACE_BIT:
18371830
case Aspect::VIEW_BIT:
18381831
case Aspect::FORMAT_BIT:
18391832
break;

Common/GPU/D3D9/D3D9ShaderCompiler.cpp

Lines changed: 0 additions & 70 deletions
This file was deleted.

Common/GPU/D3D9/D3D9ShaderCompiler.h

Lines changed: 0 additions & 13 deletions
This file was deleted.

Common/GPU/D3D9/D3D9StateCache.cpp

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)