summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2023-02-13 16:05:51 +1300
committerGitHub <noreply@github.com>2023-02-13 16:05:51 +1300
commitf37113204fe8e930c4e33e5e0149fbe0309fe425 (patch)
tree9974c89131a5e1092f6551034926d9de0c32413e /Source/Core/VideoBackends/OGL
parent2c24d07837b9ab94219de592adf34a35a2dc897e (diff)
parentaf313f84198d2eb52690b406164eebcb1866d251 (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/OGL')
-rw-r--r--Source/Core/VideoBackends/OGL/OGLGfx.h3
-rw-r--r--Source/Core/VideoBackends/OGL/SamplerCache.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/OGL/OGLGfx.h b/Source/Core/VideoBackends/OGL/OGLGfx.h
index 410b7d562e..51784c2ec8 100644
--- a/Source/Core/VideoBackends/OGL/OGLGfx.h
+++ b/Source/Core/VideoBackends/OGL/OGLGfx.h
@@ -4,6 +4,7 @@
#pragma once
#include "VideoCommon/AbstractGfx.h"
+#include "VideoCommon/Constants.h"
class GLContext;
@@ -100,7 +101,7 @@ private:
std::unique_ptr<GLContext> m_main_gl_context;
std::unique_ptr<OGLFramebuffer> m_system_framebuffer;
- std::array<const OGLTexture*, 8> m_bound_textures{};
+ std::array<const OGLTexture*, VideoCommon::MAX_PIXEL_SHADER_SAMPLERS> m_bound_textures{};
AbstractTexture* m_bound_image_texture = nullptr;
RasterizationState m_current_rasterization_state;
DepthState m_current_depth_state;
diff --git a/Source/Core/VideoBackends/OGL/SamplerCache.h b/Source/Core/VideoBackends/OGL/SamplerCache.h
index be8860c9f8..5d87c4daa2 100644
--- a/Source/Core/VideoBackends/OGL/SamplerCache.h
+++ b/Source/Core/VideoBackends/OGL/SamplerCache.h
@@ -9,6 +9,7 @@
#include "Common/CommonTypes.h"
#include "Common/GL/GLUtil.h"
+#include "VideoCommon/Constants.h"
#include "VideoCommon/RenderState.h"
namespace OGL
@@ -35,7 +36,8 @@ private:
static void SetParameters(GLuint sampler_id, const SamplerState& params);
std::map<SamplerState, GLuint> m_cache;
- std::array<std::pair<SamplerState, GLuint>, 8> m_active_samplers{};
+ std::array<std::pair<SamplerState, GLuint>, VideoCommon::MAX_PIXEL_SHADER_SAMPLERS>
+ m_active_samplers{};
GLuint m_point_sampler;
GLuint m_linear_sampler;