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

VideoBackends: Use DXGI 1.6 and D3D11_4 #13322

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 2 additions & 3 deletions Source/Core/VideoBackends/D3D/D3DBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@

#pragma once

#include <d3d11.h>
#include <d3d11_1.h>
#include <d3d11_4.h>
#include <d3dcompiler.h>
#include <dxgi1_5.h>
#include <dxgi1_6.h>
#include <fmt/format.h>
#include <vector>
#include <wrl/client.h>
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/VideoBackends/D3D/D3DGfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

#pragma once

#include <d3d11.h>
#include <d3d11_4.h>
#include <string_view>

#include "VideoBackends/D3D/D3DState.h"
#include "VideoCommon/AbstractGfx.h"

Expand Down
3 changes: 1 addition & 2 deletions Source/Core/VideoBackends/D3D/D3DSwapChain.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

#pragma once

#include <d3d11.h>
Copy link
Contributor

@iwubcode iwubcode Feb 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is using references to these headers, so the headers need to stay. We adopt an "include what you use" mentality, you can't rely on the fact this is pulling in D3DBase.h because that file could hypothetically be rewritten in the future to not include those headers.

Please fix all files that had removed header references but actually need them.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did what you asked.
I left #include <dxgi.h> removed in D3DSwapChain.h and in D3D12SwapChain.h because it is not used.

#include <dxgi.h>
#include <d3d11_4.h>
#include <memory>
#include <vector>

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/VideoBackends/D3D/D3DVertexManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "VideoBackends/D3D/D3DVertexManager.h"

#include <d3d11.h>
#include <d3d11_4.h>

#include "Common/Align.h"
#include "Common/Assert.h"
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/VideoBackends/D3D/DXPipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#pragma once

#include <d3d11.h>
#include <d3d11_4.h>
#include <memory>

#include "VideoBackends/D3D/D3DBase.h"
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/VideoBackends/D3D/DXTexture.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@

#pragma once

#include <d3d11.h>
#include <d3d11_4.h>
#include <memory>
#include <string>
#include <string_view>
#include <vector>

#include "Common/CommonTypes.h"

#include "VideoBackends/D3D/D3DBase.h"
Expand Down
1 change: 1 addition & 0 deletions Source/Core/VideoBackends/D3D12/D3D12Gfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#pragma once

#include <d3d12.h>

#include "VideoBackends/D3D12/DescriptorAllocator.h"
#include "VideoBackends/D3D12/DescriptorHeapManager.h"
#include "VideoCommon/AbstractGfx.h"
Expand Down
1 change: 0 additions & 1 deletion Source/Core/VideoBackends/D3D12/D3D12SwapChain.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#pragma once

#include <d3d12.h>
#include <dxgi.h>
#include <memory>
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions Source/Core/VideoBackends/D3D12/D3D12VertexManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#pragma once

#include <memory>

#include "VideoBackends/D3D12/D3D12StreamBuffer.h"
#include "VideoBackends/D3D12/DescriptorHeapManager.h"
#include "VideoCommon/VertexManagerBase.h"
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/VideoBackends/D3D12/DX12Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <algorithm>
#include <array>
#include <dxgi1_2.h>
#include <dxgi1_6.h>
#include <queue>
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions Source/Core/VideoBackends/D3D12/DX12Shader.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <memory>
#include <string>
#include <string_view>

#include "VideoBackends/D3D12/Common.h"
#include "VideoBackends/D3DCommon/Shader.h"

Expand Down
1 change: 1 addition & 0 deletions Source/Core/VideoBackends/D3D12/DX12Texture.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <memory>
#include <string>
#include <string_view>

#include "Common/CommonTypes.h"
#include "VideoBackends/D3D12/Common.h"
#include "VideoBackends/D3D12/DescriptorHeapManager.h"
Expand Down
1 change: 1 addition & 0 deletions Source/Core/VideoBackends/D3D12/DescriptorAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#pragma once

#include <map>

#include "VideoBackends/D3D12/DescriptorHeapManager.h"
#include "VideoCommon/Constants.h"

Expand Down
1 change: 1 addition & 0 deletions Source/Core/VideoBackends/D3D12/DescriptorHeapManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <bitset>
#include <unordered_map>

#include "VideoBackends/D3D12/Common.h"
#include "VideoCommon/RenderState.h"

Expand Down
1 change: 1 addition & 0 deletions Source/Core/VideoBackends/D3D12/VideoBackend.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#pragma once

#include <string>

#include "VideoCommon/VideoBackendBase.h"

namespace DX12
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/VideoBackends/D3DCommon/D3DCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#include "VideoBackends/D3DCommon/D3DCommon.h"

#include <d3d11.h>
#include <d3d11_4.h>
#include <d3d12.h>
#include <dxgi1_3.h>
#include <dxgi1_6.h>
#include <wrl/client.h>

#include "Common/Assert.h"
Expand Down