summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/string_util.cpp6
-rw-r--r--src/video_core/vertex_shader.cpp16
2 files changed, 13 insertions, 9 deletions
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp
index 19e162c27..7a8274a91 100644
--- a/src/common/string_util.cpp
+++ b/src/common/string_util.cpp
@@ -2,7 +2,7 @@
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 <algorithm> 5#include <boost/range/algorithm.hpp>
6 6
7#include "common/common.h" 7#include "common/common.h"
8#include "common/string_util.h" 8#include "common/string_util.h"
@@ -18,13 +18,13 @@ namespace Common {
18 18
19/// Make a string lowercase 19/// Make a string lowercase
20std::string ToLower(std::string str) { 20std::string ToLower(std::string str) {
21 std::transform(str.begin(), str.end(), str.begin(), ::tolower); 21 boost::transform(str, str.begin(), ::tolower);
22 return str; 22 return str;
23} 23}
24 24
25/// Make a string uppercase 25/// Make a string uppercase
26std::string ToUpper(std::string str) { 26std::string ToUpper(std::string str) {
27 std::transform(str.begin(), str.end(), str.begin(), ::toupper); 27 boost::transform(str, str.begin(), ::toupper);
28 return str; 28 return str;
29} 29}
30 30
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
11namespace Pica { 16namespace 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);