diff options
| author | 2014-12-07 22:22:04 +0100 | |
|---|---|---|
| committer | 2014-12-07 23:52:17 +0100 | |
| commit | 4d4572c697616c43ce47f43fc5de1a1b9ae27d5f (patch) | |
| tree | 8562e5e0b520cb7faae514595871e76c250553b5 /src | |
| parent | externals: Add boost submodule. (diff) | |
| download | yuzu-4d4572c697616c43ce47f43fc5de1a1b9ae27d5f.tar.gz yuzu-4d4572c697616c43ce47f43fc5de1a1b9ae27d5f.tar.xz yuzu-4d4572c697616c43ce47f43fc5de1a1b9ae27d5f.zip | |
Integrate Boost into build system and perform a trivial cleanup in vertex_shader.cpp.
Diffstat (limited to '')
| -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); |