summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends
diff options
context:
space:
mode:
authorMichael Maltese <michaeljosephmaltese@gmail.com>2017-03-05 15:17:54 -0800
committerMichael Maltese <michaeljosephmaltese@gmail.com>2017-03-15 17:20:47 -0700
commitde940a5fd6a07728c51d53ebdab7489aa03cdb55 (patch)
treec309017a947d25eede6daf32158b7fa1e713e52d /Source/Core/VideoBackends
parent8e6d25672292d1ca90e5acc6170df0b9cc618db6 (diff)
VideoConfig: add bSupportsFragmentStoresAndAtomics
Diffstat (limited to 'Source/Core/VideoBackends')
-rw-r--r--Source/Core/VideoBackends/D3D/main.cpp3
-rw-r--r--Source/Core/VideoBackends/D3D12/main.cpp3
-rw-r--r--Source/Core/VideoBackends/OGL/BoundingBox.cpp6
-rw-r--r--Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp2
-rw-r--r--Source/Core/VideoBackends/OGL/Render.cpp4
-rw-r--r--Source/Core/VideoBackends/Vulkan/VulkanContext.cpp4
6 files changed, 15 insertions, 7 deletions
diff --git a/Source/Core/VideoBackends/D3D/main.cpp b/Source/Core/VideoBackends/D3D/main.cpp
index 2fc00dc037..e8a51d3441 100644
--- a/Source/Core/VideoBackends/D3D/main.cpp
+++ b/Source/Core/VideoBackends/D3D/main.cpp
@@ -112,7 +112,8 @@ void VideoBackend::InitBackendInfo()
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.bSupportsBBox =
+ g_Config.backend_info.bSupportsFragmentStoresAndAtomics = shader_model_5_supported;
// Requires the instance attribute (only available in shader model 5)
g_Config.backend_info.bSupportsGSInstancing = shader_model_5_supported;
diff --git a/Source/Core/VideoBackends/D3D12/main.cpp b/Source/Core/VideoBackends/D3D12/main.cpp
index bae916e0f8..7a48647c0e 100644
--- a/Source/Core/VideoBackends/D3D12/main.cpp
+++ b/Source/Core/VideoBackends/D3D12/main.cpp
@@ -120,7 +120,8 @@ void VideoBackend::InitBackendInfo()
g_Config.backend_info.bSupportsEarlyZ = true;
// Requires full UAV functionality (only available in shader model 5)
- g_Config.backend_info.bSupportsBBox = true;
+ g_Config.backend_info.bSupportsBBox =
+ g_Config.backend_info.bSupportsFragmentStoresAndAtomics = true;
// Requires the instance attribute (only available in shader model 5)
g_Config.backend_info.bSupportsGSInstancing = true;
diff --git a/Source/Core/VideoBackends/OGL/BoundingBox.cpp b/Source/Core/VideoBackends/OGL/BoundingBox.cpp
index 0ee4bd2afe..6bce10754e 100644
--- a/Source/Core/VideoBackends/OGL/BoundingBox.cpp
+++ b/Source/Core/VideoBackends/OGL/BoundingBox.cpp
@@ -17,7 +17,7 @@ namespace OGL
{
void BoundingBox::Init()
{
- if (g_ActiveConfig.backend_info.bSupportsBBox)
+ if (g_ActiveConfig.backend_info.bSupportsFragmentStoresAndAtomics)
{
int initial_values[4] = {0, 0, 0, 0};
glGenBuffers(1, &s_bbox_buffer_id);
@@ -29,8 +29,10 @@ void BoundingBox::Init()
void BoundingBox::Shutdown()
{
- if (g_ActiveConfig.backend_info.bSupportsBBox)
+ if (g_ActiveConfig.backend_info.bSupportsFragmentStoresAndAtomics)
+ {
glDeleteBuffers(1, &s_bbox_buffer_id);
+ }
}
void BoundingBox::Set(int index, int value)
diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp
index ef91b01f02..508d6e41ed 100644
--- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp
+++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp
@@ -618,7 +618,7 @@ void ProgramShaderCache::CreateHeader()
"#define SAMPLER_BINDING(x)\n",
// Input/output blocks are matched by name during program linking
"#define VARYING_LOCATION(x)\n",
- !is_glsles && g_ActiveConfig.backend_info.bSupportsBBox ?
+ !is_glsles && g_ActiveConfig.backend_info.bSupportsFragmentStoresAndAtomics ?
"#extension GL_ARB_shader_storage_buffer_object : enable" :
"",
v < GLSL_400 && g_ActiveConfig.backend_info.bSupportsGSInstancing ?
diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp
index f898d73722..341e6b3686 100644
--- a/Source/Core/VideoBackends/OGL/Render.cpp
+++ b/Source/Core/VideoBackends/OGL/Render.cpp
@@ -411,7 +411,7 @@ Renderer::Renderer()
g_Config.backend_info.bSupportsPrimitiveRestart =
!DriverDetails::HasBug(DriverDetails::BUG_PRIMITIVE_RESTART) &&
((GLExtensions::Version() >= 310) || GLExtensions::Supports("GL_NV_primitive_restart"));
- g_Config.backend_info.bSupportsBBox =
+ g_Config.backend_info.bSupportsBBox = g_Config.backend_info.bSupportsFragmentStoresAndAtomics =
GLExtensions::Supports("GL_ARB_shader_storage_buffer_object");
g_Config.backend_info.bSupportsGSInstancing = GLExtensions::Supports("GL_ARB_gpu_shader5");
g_Config.backend_info.bSupportsSSAA = GLExtensions::Supports("GL_ARB_gpu_shader5") &&
@@ -498,6 +498,7 @@ Renderer::Renderer()
g_Config.backend_info.bSupportsGeometryShaders && g_ogl_config.SupportedESPointSize > 0;
g_Config.backend_info.bSupportsSSAA = g_ogl_config.bSupportsAEP;
g_Config.backend_info.bSupportsBBox = true;
+ g_Config.backend_info.bSupportsFragmentStoresAndAtomics = true;
g_ogl_config.bSupportsMSAA = true;
g_ogl_config.bSupports2DTextureStorage = true;
if (g_ActiveConfig.iStereoMode > 0 && g_ActiveConfig.iMultisamples > 1 &&
@@ -519,6 +520,7 @@ Renderer::Renderer()
g_Config.backend_info.bSupportsPaletteConversion = true;
g_Config.backend_info.bSupportsSSAA = true;
g_Config.backend_info.bSupportsBBox = true;
+ g_Config.backend_info.bSupportsFragmentStoresAndAtomics = true;
g_ogl_config.bSupportsCopySubImage = true;
g_ogl_config.bSupportsGLBaseVertex = true;
g_ogl_config.bSupportsDebug = true;
diff --git a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
index 1487e09afc..74e7786130 100644
--- a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
+++ b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
@@ -240,6 +240,7 @@ void VulkanContext::PopulateBackendInfo(VideoConfig* config)
config->backend_info.bSupportsGeometryShaders = false; // Dependent on features.
config->backend_info.bSupportsGSInstancing = false; // Dependent on features.
config->backend_info.bSupportsBBox = false; // Dependent on features.
+ config->backend_info.bSupportsFragmentStoresAndAtomics = false; // Dependent on features.
config->backend_info.bSupportsSSAA = false; // Dependent on features.
config->backend_info.bSupportsDepthClamp = false; // Dependent on features.
config->backend_info.bSupportsReversedDepthRange = false; // No support yet due to driver bugs.
@@ -264,7 +265,8 @@ void VulkanContext::PopulateBackendInfoFeatures(VideoConfig* config, VkPhysicalD
config->backend_info.bSupportsDualSourceBlend = (features.dualSrcBlend == VK_TRUE);
config->backend_info.bSupportsGeometryShaders = (features.geometryShader == VK_TRUE);
config->backend_info.bSupportsGSInstancing = (features.geometryShader == VK_TRUE);
- config->backend_info.bSupportsBBox = (features.fragmentStoresAndAtomics == VK_TRUE);
+ config->backend_info.bSupportsBBox = config->backend_info.bSupportsFragmentStoresAndAtomics =
+ (features.fragmentStoresAndAtomics == VK_TRUE);
config->backend_info.bSupportsSSAA = (features.sampleRateShading == VK_TRUE);
// Disable geometry shader when shaderTessellationAndGeometryPointSize is not supported.