diff options
| author | 2014-12-12 17:32:57 +0100 | |
|---|---|---|
| committer | 2014-12-12 17:32:57 +0100 | |
| commit | 33e61ef514d2b1a32eea10161d900f1e2e5c0ba2 (patch) | |
| tree | d4f7e432ab42cf7fad3834bb14ba72b54b346cc0 /src/video_core/vertex_shader.cpp | |
| parent | Merge pull request #268 from bunnei/dsp-read-pipe-if-possible (diff) | |
| parent | StringUtil: Perform some minimal cleanup. (diff) | |
| download | yuzu-33e61ef514d2b1a32eea10161d900f1e2e5c0ba2.tar.gz yuzu-33e61ef514d2b1a32eea10161d900f1e2e5c0ba2.tar.xz yuzu-33e61ef514d2b1a32eea10161d900f1e2e5c0ba2.zip | |
Merge pull request #261 from neobrain/boost
Add Boost as a submodule and add some minor cleanups using Boost.Range
Diffstat (limited to 'src/video_core/vertex_shader.cpp')
| -rw-r--r-- | src/video_core/vertex_shader.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/video_core/vertex_shader.cpp b/src/video_core/vertex_shader.cpp index 96625791c..0dff11a0f 100644 --- a/src/video_core/vertex_shader.cpp +++ b/src/video_core/vertex_shader.cpp | |||
| @@ -2,11 +2,16 @@ | |||
| 2 | // Licensed under GPLv2 | 2 | // Licensed under GPLv2 |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <boost/range/algorithm.hpp> | ||
| 6 | |||
| 7 | #include <common/file_util.h> | ||
| 8 | |||
| 9 | #include <core/mem_map.h> | ||
| 10 | |||
| 11 | #include "debug_utils/debug_utils.h" | ||
| 12 | |||
| 5 | #include "pica.h" | 13 | #include "pica.h" |
| 6 | #include "vertex_shader.h" | 14 | #include "vertex_shader.h" |
| 7 | #include "debug_utils/debug_utils.h" | ||
| 8 | #include <core/mem_map.h> | ||
| 9 | #include <common/file_util.h> | ||
| 10 | 15 | ||
| 11 | namespace Pica { | 16 | namespace Pica { |
| 12 | 17 | ||
| @@ -238,7 +243,7 @@ OutputVertex RunShader(const InputVertex& input, int num_attributes) | |||
| 238 | // Setup input register table | 243 | // Setup input register table |
| 239 | const auto& attribute_register_map = registers.vs_input_register_map; | 244 | const auto& attribute_register_map = registers.vs_input_register_map; |
| 240 | float24 dummy_register; | 245 | float24 dummy_register; |
| 241 | std::fill(&state.input_register_table[0], &state.input_register_table[16], &dummy_register); | 246 | boost::fill(state.input_register_table, &dummy_register); |
| 242 | if(num_attributes > 0) state.input_register_table[attribute_register_map.attribute0_register] = &input.attr[0].x; | 247 | if(num_attributes > 0) state.input_register_table[attribute_register_map.attribute0_register] = &input.attr[0].x; |
| 243 | if(num_attributes > 1) state.input_register_table[attribute_register_map.attribute1_register] = &input.attr[1].x; | 248 | if(num_attributes > 1) state.input_register_table[attribute_register_map.attribute1_register] = &input.attr[1].x; |
| 244 | if(num_attributes > 2) state.input_register_table[attribute_register_map.attribute2_register] = &input.attr[2].x; | 249 | if(num_attributes > 2) state.input_register_table[attribute_register_map.attribute2_register] = &input.attr[2].x; |
| @@ -272,8 +277,7 @@ OutputVertex RunShader(const InputVertex& input, int num_attributes) | |||
| 272 | 277 | ||
| 273 | state.status_registers[0] = false; | 278 | state.status_registers[0] = false; |
| 274 | state.status_registers[1] = false; | 279 | state.status_registers[1] = false; |
| 275 | std::fill(state.call_stack, state.call_stack + sizeof(state.call_stack) / sizeof(state.call_stack[0]), | 280 | boost::fill(state.call_stack, VertexShaderState::INVALID_ADDRESS); |
| 276 | VertexShaderState::INVALID_ADDRESS); | ||
| 277 | state.call_stack_pointer = &state.call_stack[0]; | 281 | state.call_stack_pointer = &state.call_stack[0]; |
| 278 | 282 | ||
| 279 | ProcessShaderCode(state); | 283 | ProcessShaderCode(state); |