diff options
| author | Scott Mansell <phiren@gmail.com> | 2023-02-13 16:05:51 +1300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-13 16:05:51 +1300 |
| commit | f37113204fe8e930c4e33e5e0149fbe0309fe425 (patch) | |
| tree | 9974c89131a5e1092f6551034926d9de0c32413e /Source/Core/VideoBackends/D3D | |
| parent | 2c24d07837b9ab94219de592adf34a35a2dc897e (diff) | |
| parent | af313f84198d2eb52690b406164eebcb1866d251 (diff) | |
Merge pull request #11550 from iwubcode/set_common_samplers_count
VideoCommon: add constant value for maximum number of pixel samplers
Diffstat (limited to 'Source/Core/VideoBackends/D3D')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/D3DState.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/D3D/D3DState.h | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DState.cpp b/Source/Core/VideoBackends/D3D/D3DState.cpp index 66ccec2416..8ab1991e90 100644 --- a/Source/Core/VideoBackends/D3D/D3DState.cpp +++ b/Source/Core/VideoBackends/D3D/D3DState.cpp @@ -205,7 +205,7 @@ u32 StateManager::UnsetTexture(ID3D11ShaderResourceView* srv) { u32 mask = 0; - for (u32 index = 0; index < 8; ++index) + for (u32 index = 0; index < VideoCommon::MAX_PIXEL_SHADER_SAMPLERS; ++index) { if (m_current.textures[index] == srv) { diff --git a/Source/Core/VideoBackends/D3D/D3DState.h b/Source/Core/VideoBackends/D3D/D3DState.h index 795e7a0432..812fc778ae 100644 --- a/Source/Core/VideoBackends/D3D/D3DState.h +++ b/Source/Core/VideoBackends/D3D/D3DState.h @@ -12,6 +12,7 @@ #include "Common/BitField.h" #include "Common/CommonTypes.h" #include "VideoBackends/D3D/D3DBase.h" +#include "VideoCommon/Constants.h" #include "VideoCommon/RenderState.h" namespace DX11 @@ -263,8 +264,8 @@ private: struct Resources { - std::array<ID3D11ShaderResourceView*, 8> textures; - std::array<ID3D11SamplerState*, 8> samplers; + std::array<ID3D11ShaderResourceView*, VideoCommon::MAX_PIXEL_SHADER_SAMPLERS> textures; + std::array<ID3D11SamplerState*, VideoCommon::MAX_PIXEL_SHADER_SAMPLERS> samplers; std::array<ID3D11Buffer*, 2> pixelConstants; ID3D11Buffer* vertexConstants; ID3D11Buffer* geometryConstants; |
