summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/BoundingBox.cpp
diff options
context:
space:
mode:
authorMichael Maltese <michaeljosephmaltese@gmail.com>2017-03-10 00:07:49 -0800
committerMichael Maltese <michaeljosephmaltese@gmail.com>2017-03-15 17:41:33 -0700
commit134317e07f7c371000389e7c3f45ceaf046eea69 (patch)
tree7e0319c38e4ad94a5bd13bd7b0d653cfdaf10cf2 /Source/Core/VideoBackends/OGL/BoundingBox.cpp
parent53224d41d05a9ec70d0a2715e1a7601a0e60bb14 (diff)
videoconfig: add BBoxPreferStencilImplementation
@JMC47 requested this to be able to do performance comparisons.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/BoundingBox.cpp')
-rw-r--r--Source/Core/VideoBackends/OGL/BoundingBox.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/Core/VideoBackends/OGL/BoundingBox.cpp b/Source/Core/VideoBackends/OGL/BoundingBox.cpp
index 2d370a115d..ebf8433d92 100644
--- a/Source/Core/VideoBackends/OGL/BoundingBox.cpp
+++ b/Source/Core/VideoBackends/OGL/BoundingBox.cpp
@@ -28,7 +28,7 @@ namespace OGL
{
void BoundingBox::SetTargetSizeChanged(int target_width, int target_height)
{
- if (g_ActiveConfig.backend_info.bSupportsFragmentStoresAndAtomics)
+ if (g_ActiveConfig.BBoxUseFragmentShaderImplementation())
return;
s_target_width = target_width;
@@ -42,7 +42,7 @@ void BoundingBox::SetTargetSizeChanged(int target_width, int target_height)
void BoundingBox::Init(int target_width, int target_height)
{
- if (g_ActiveConfig.backend_info.bSupportsFragmentStoresAndAtomics)
+ if (g_ActiveConfig.BBoxUseFragmentShaderImplementation())
{
int initial_values[4] = {0, 0, 0, 0};
glGenBuffers(1, &s_bbox_buffer_id);
@@ -60,7 +60,7 @@ void BoundingBox::Init(int target_width, int target_height)
void BoundingBox::Shutdown()
{
- if (g_ActiveConfig.backend_info.bSupportsFragmentStoresAndAtomics)
+ if (g_ActiveConfig.BBoxUseFragmentShaderImplementation())
{
glDeleteBuffers(1, &s_bbox_buffer_id);
}
@@ -72,7 +72,7 @@ void BoundingBox::Shutdown()
void BoundingBox::Set(int index, int value)
{
- if (g_ActiveConfig.backend_info.bSupportsFragmentStoresAndAtomics)
+ if (g_ActiveConfig.BBoxUseFragmentShaderImplementation())
{
glBindBuffer(GL_SHADER_STORAGE_BUFFER, s_bbox_buffer_id);
glBufferSubData(GL_SHADER_STORAGE_BUFFER, index * sizeof(int), sizeof(int), &value);
@@ -95,7 +95,7 @@ void BoundingBox::Set(int index, int value)
int BoundingBox::Get(int index)
{
- if (g_ActiveConfig.backend_info.bSupportsFragmentStoresAndAtomics)
+ if (g_ActiveConfig.BBoxUseFragmentShaderImplementation())
{
int data = 0;
glBindBuffer(GL_SHADER_STORAGE_BUFFER, s_bbox_buffer_id);
@@ -170,7 +170,6 @@ void BoundingBox::StencilWasUpdated()
bool BoundingBox::NeedsStencilBuffer()
{
- return g_ActiveConfig.bBBoxEnable &&
- !g_ActiveConfig.backend_info.bSupportsFragmentStoresAndAtomics;
+ return g_ActiveConfig.bBBoxEnable && !g_ActiveConfig.BBoxUseFragmentShaderImplementation();
}
};