aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2016-12-18 15:39:56 -0800
committerYuri Kunde Schlesner <yuriks@yuriks.net>2017-01-29 21:31:36 -0800
commitbbc7844021dc34e26285a495ed86bad088b87279 (patch)
treeb2ddd0e986bd6874673fb8cf99307c49e66c3252 /src/video_core/renderer_opengl
parent5bb6753f2edd7cd8727db8ed9f820fb7c571a3ac (diff)
VideoCore: Change misleading register names
A few registers had names such as "count" or "number" when they actually contained the maximum (that is, count - 1). This can easily lead to hard to notice off by one errors.
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp2
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 2d2f4edc1..9dd9ae0fb 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -467,7 +467,7 @@ void RasterizerOpenGL::NotifyPicaRegisterChanged(u32 id) {
// Fragment lighting switches
case PICA_REG_INDEX(lighting.disable):
- case PICA_REG_INDEX(lighting.num_lights):
+ case PICA_REG_INDEX(lighting.max_light_index):
case PICA_REG_INDEX(lighting.config0):
case PICA_REG_INDEX(lighting.config1):
case PICA_REG_INDEX(lighting.abs_lut_input):
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h
index cc3e4bed5..a1aa07074 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.h
+++ b/src/video_core/renderer_opengl/gl_rasterizer.h
@@ -84,7 +84,7 @@ union PicaShaderConfig {
// Fragment lighting
state.lighting.enable = !regs.lighting.disable;
- state.lighting.src_num = regs.lighting.num_lights + 1;
+ state.lighting.src_num = regs.lighting.max_light_index + 1;
for (unsigned light_index = 0; light_index < state.lighting.src_num; ++light_index) {
unsigned num = regs.lighting.light_enable.GetNum(light_index);