summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/main.cpp
diff options
context:
space:
mode:
authorMarkus Wick <markus+github@selfnet.de>2014-12-08 09:05:22 +0100
committerMarkus Wick <markus+github@selfnet.de>2014-12-08 09:05:22 +0100
commitff4526b4a9b7dbcbdbaff35a657739e272aea637 (patch)
treeafa330fc93476afb8ffe731ec197abcaf487c0fc /Source/Core/VideoBackends/D3D/main.cpp
parent3a149c3aab63be54c5932563b2957e9e3016a8aa (diff)
parentcf7512683c04e6e9836929c34f458515928eca4b (diff)
Merge pull request #1657 from Tinob/master
Add HW bounding Box support to d3d backend
Diffstat (limited to 'Source/Core/VideoBackends/D3D/main.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/main.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/Core/VideoBackends/D3D/main.cpp b/Source/Core/VideoBackends/D3D/main.cpp
index ed5868c91b..34a11d493f 100644
--- a/Source/Core/VideoBackends/D3D/main.cpp
+++ b/Source/Core/VideoBackends/D3D/main.cpp
@@ -13,6 +13,7 @@
#include "Core/Core.h"
#include "Core/Host.h"
+#include "VideoBackends/D3D/BoundingBox.h"
#include "VideoBackends/D3D/D3DBase.h"
#include "VideoBackends/D3D/D3DUtil.h"
#include "VideoBackends/D3D/Globals.h"
@@ -77,7 +78,6 @@ void InitBackendInfo()
g_Config.backend_info.bSupportsDualSourceBlend = true;
g_Config.backend_info.bSupportsPrimitiveRestart = true;
g_Config.backend_info.bSupportsOversizedViewports = false;
- g_Config.backend_info.bSupportsBBox = false; // TODO: not implemented
g_Config.backend_info.bSupportsStereoscopy = false; // TODO: not implemented
IDXGIFactory* factory;
@@ -112,15 +112,15 @@ void InitBackendInfo()
g_Config.backend_info.AAModes.push_back(samples);
}
-
+ bool shader_model_5_supported = (DX11::D3D::GetFeatureLevel(ad) >= D3D_FEATURE_LEVEL_11_0);
// Requires the earlydepthstencil attribute (only available in shader model 5)
- g_Config.backend_info.bSupportsEarlyZ = (DX11::D3D::GetFeatureLevel(ad) == D3D_FEATURE_LEVEL_11_0);
+ g_Config.backend_info.bSupportsEarlyZ = shader_model_5_supported;
+ // Requires full UAV functionality (only available in shader model 5)
+ g_Config.backend_info.bSupportsBBox = shader_model_5_supported;
}
-
g_Config.backend_info.Adapters.push_back(UTF16ToUTF8(desc.Description));
ad->Release();
}
-
factory->Release();
// Clear ppshaders string vector
@@ -180,6 +180,7 @@ void VideoBackend::Video_Prepare()
PixelShaderManager::Init();
CommandProcessor::Init();
PixelEngine::Init();
+ BBox::Init();
// Tell the host that the window is ready
Host_Message(WM_USER_CREATE);
@@ -204,6 +205,8 @@ void VideoBackend::Shutdown()
D3D::ShutdownUtils();
PixelShaderCache::Shutdown();
VertexShaderCache::Shutdown();
+ BBox::Shutdown();
+
delete g_perf_query;
delete g_vertex_manager;
delete g_texture_cache;