summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 8a762fd0d..84c285db8 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -54,6 +54,8 @@ MICROPROFILE_DEFINE(OpenGL_PrimitiveAssembly, "OpenGL", "Prim Asmbl", MP_RGB(255
54 54
55namespace { 55namespace {
56 56
57constexpr std::size_t NumSupportedVertexAttributes = 16;
58
57template <typename Engine, typename Entry> 59template <typename Engine, typename Entry>
58Tegra::Texture::FullTextureInfo GetTextureInfo(const Engine& engine, const Entry& entry, 60Tegra::Texture::FullTextureInfo GetTextureInfo(const Engine& engine, const Entry& entry,
59 Tegra::Engines::ShaderType shader_type, 61 Tegra::Engines::ShaderType shader_type,
@@ -134,7 +136,7 @@ void RasterizerOpenGL::SetupVertexFormat() {
134 // avoid OpenGL errors. 136 // avoid OpenGL errors.
135 // TODO(Subv): Analyze the shader to identify which attributes are actually used and don't 137 // TODO(Subv): Analyze the shader to identify which attributes are actually used and don't
136 // assume every shader uses them all. 138 // assume every shader uses them all.
137 for (std::size_t index = 0; index < 16; ++index) { 139 for (std::size_t index = 0; index < NumSupportedVertexAttributes; ++index) {
138 if (!flags[Dirty::VertexFormat0 + index]) { 140 if (!flags[Dirty::VertexFormat0 + index]) {
139 continue; 141 continue;
140 } 142 }
@@ -207,7 +209,7 @@ void RasterizerOpenGL::SetupVertexInstances() {
207 flags[Dirty::VertexInstances] = false; 209 flags[Dirty::VertexInstances] = false;
208 210
209 const auto& regs = gpu.regs; 211 const auto& regs = gpu.regs;
210 for (std::size_t index = 0; index < 16; ++index) { 212 for (std::size_t index = 0; index < NumSupportedVertexAttributes; ++index) {
211 if (!flags[Dirty::VertexInstance0 + index]) { 213 if (!flags[Dirty::VertexInstance0 + index]) {
212 continue; 214 continue;
213 } 215 }