summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2017-03-10 23:40:52 +1000
committerStenzek <stenzek@gmail.com>2017-03-10 23:41:20 +1000
commit42993eeabce6745da1aede10344c9ee7b035aa2e (patch)
treecd8c889c6bae920c2d3242379f2d760a0b6b0486 /Source/Core/VideoBackends
parentae0f9c200d2b076525873e58d36e10ff2319215b (diff)
D3D11: Fix error on startup with >2.5xIR selected
Diffstat (limited to 'Source/Core/VideoBackends')
-rw-r--r--Source/Core/VideoBackends/D3D/D3DBase.cpp4
-rw-r--r--Source/Core/VideoBackends/D3D/D3DBase.h2
-rw-r--r--Source/Core/VideoBackends/D3D/main.cpp6
3 files changed, 7 insertions, 5 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DBase.cpp b/Source/Core/VideoBackends/D3D/D3DBase.cpp
index 3edd936efa..5b4328cb7f 100644
--- a/Source/Core/VideoBackends/D3D/D3DBase.cpp
+++ b/Source/Core/VideoBackends/D3D/D3DBase.cpp
@@ -526,9 +526,9 @@ bool BGRATexturesSupported()
// Returns the maximum width/height of a texture. This value only depends upon the feature level in
// DX11
-unsigned int GetMaxTextureSize()
+u32 GetMaxTextureSize(D3D_FEATURE_LEVEL feature_level)
{
- switch (featlevel)
+ switch (feature_level)
{
case D3D_FEATURE_LEVEL_11_0:
return D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION;
diff --git a/Source/Core/VideoBackends/D3D/D3DBase.h b/Source/Core/VideoBackends/D3D/D3DBase.h
index 668671fee6..737b6a8a27 100644
--- a/Source/Core/VideoBackends/D3D/D3DBase.h
+++ b/Source/Core/VideoBackends/D3D/D3DBase.h
@@ -72,7 +72,7 @@ const char* GeometryShaderVersionString();
const char* VertexShaderVersionString();
bool BGRATexturesSupported();
-unsigned int GetMaxTextureSize();
+u32 GetMaxTextureSize(D3D_FEATURE_LEVEL feature_level);
HRESULT SetFullscreenState(bool enable_fullscreen);
bool GetFullscreenState();
diff --git a/Source/Core/VideoBackends/D3D/main.cpp b/Source/Core/VideoBackends/D3D/main.cpp
index a093a05ca5..2fc00dc037 100644
--- a/Source/Core/VideoBackends/D3D/main.cpp
+++ b/Source/Core/VideoBackends/D3D/main.cpp
@@ -61,7 +61,7 @@ void VideoBackend::InitBackendInfo()
}
g_Config.backend_info.api_type = APIType::D3D;
- g_Config.backend_info.MaxTextureSize = DX11::D3D::GetMaxTextureSize();
+ g_Config.backend_info.MaxTextureSize = D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION;
g_Config.backend_info.bSupportsExclusiveFullscreen = true;
g_Config.backend_info.bSupportsDualSourceBlend = true;
g_Config.backend_info.bSupportsPrimitiveRestart = true;
@@ -104,7 +104,9 @@ void VideoBackend::InitBackendInfo()
g_Config.backend_info.AAModes.push_back(modes[i].Count);
}
- bool shader_model_5_supported = (DX11::D3D::GetFeatureLevel(ad) >= D3D_FEATURE_LEVEL_11_0);
+ D3D_FEATURE_LEVEL feature_level = D3D::GetFeatureLevel(ad);
+ bool shader_model_5_supported = feature_level >= D3D_FEATURE_LEVEL_11_0;
+ g_Config.backend_info.MaxTextureSize = D3D::GetMaxTextureSize(feature_level);
// Requires the earlydepthstencil attribute (only available in shader model 5)
g_Config.backend_info.bSupportsEarlyZ = shader_model_5_supported;