diff options
| author | 2019-05-14 09:02:45 -0400 | |
|---|---|---|
| committer | 2019-05-14 09:02:47 -0400 | |
| commit | 5db1b54b58caf9dc5ce0367f183ed7cca222909e (patch) | |
| tree | 0c9d0bdcedbc19ba4a402e95755de7a42a74f533 | |
| parent | video_core/engines/maxwell_3d: Simplify for loops into ranged for loops withi... (diff) | |
| download | yuzu-5db1b54b58caf9dc5ce0367f183ed7cca222909e.tar.gz yuzu-5db1b54b58caf9dc5ce0367f183ed7cca222909e.tar.xz yuzu-5db1b54b58caf9dc5ce0367f183ed7cca222909e.zip | |
video_core/engines/maxwell3d: Get rid of three magic values in CallMethod()
We can use the named constant instead of using 32 directly.
| -rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index bdd52d5b3..241245c59 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp | |||
| @@ -178,13 +178,13 @@ void Maxwell3D::CallMethod(const GPU::MethodCall& method_call) { | |||
| 178 | 178 | ||
| 179 | // Vertex buffer | 179 | // Vertex buffer |
| 180 | if (method >= MAXWELL3D_REG_INDEX(vertex_array) && | 180 | if (method >= MAXWELL3D_REG_INDEX(vertex_array) && |
| 181 | method < MAXWELL3D_REG_INDEX(vertex_array) + 4 * 32) { | 181 | method < MAXWELL3D_REG_INDEX(vertex_array) + 4 * Regs::NumVertexArrays) { |
| 182 | dirty_flags.vertex_array.set((method - MAXWELL3D_REG_INDEX(vertex_array)) >> 2); | 182 | dirty_flags.vertex_array.set((method - MAXWELL3D_REG_INDEX(vertex_array)) >> 2); |
| 183 | } else if (method >= MAXWELL3D_REG_INDEX(vertex_array_limit) && | 183 | } else if (method >= MAXWELL3D_REG_INDEX(vertex_array_limit) && |
| 184 | method < MAXWELL3D_REG_INDEX(vertex_array_limit) + 2 * 32) { | 184 | method < MAXWELL3D_REG_INDEX(vertex_array_limit) + 2 * Regs::NumVertexArrays) { |
| 185 | dirty_flags.vertex_array.set((method - MAXWELL3D_REG_INDEX(vertex_array_limit)) >> 1); | 185 | dirty_flags.vertex_array.set((method - MAXWELL3D_REG_INDEX(vertex_array_limit)) >> 1); |
| 186 | } else if (method >= MAXWELL3D_REG_INDEX(instanced_arrays) && | 186 | } else if (method >= MAXWELL3D_REG_INDEX(instanced_arrays) && |
| 187 | method < MAXWELL3D_REG_INDEX(instanced_arrays) + 32) { | 187 | method < MAXWELL3D_REG_INDEX(instanced_arrays) + Regs::NumVertexArrays) { |
| 188 | dirty_flags.vertex_array.set(method - MAXWELL3D_REG_INDEX(instanced_arrays)); | 188 | dirty_flags.vertex_array.set(method - MAXWELL3D_REG_INDEX(instanced_arrays)); |
| 189 | } | 189 | } |
| 190 | } | 190 | } |