summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorTony Wasserka <NeoBrainX@gmail.com>2015-01-02 20:40:52 +0100
committerTony Wasserka <NeoBrainX@gmail.com>2015-02-18 14:02:59 +0100
commit67120270f2c3250aca49d813278b342787e3cae0 (patch)
tree1d30b6ddc851aeb5fa90b11cde97cc074335924f /src/video_core
parentGPU: Properly implement memory fills. (diff)
downloadyuzu-67120270f2c3250aca49d813278b342787e3cae0.tar
yuzu-67120270f2c3250aca49d813278b342787e3cae0.tar.gz
yuzu-67120270f2c3250aca49d813278b342787e3cae0.tar.bz2
yuzu-67120270f2c3250aca49d813278b342787e3cae0.tar.lz
yuzu-67120270f2c3250aca49d813278b342787e3cae0.tar.xz
yuzu-67120270f2c3250aca49d813278b342787e3cae0.tar.zst
yuzu-67120270f2c3250aca49d813278b342787e3cae0.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/command_processor.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp
index 0d9f4ba66..b2cc0f027 100644
--- a/src/video_core/command_processor.cpp
+++ b/src/video_core/command_processor.cpp
@@ -2,6 +2,8 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
+#include <boost/range/algorithm/fill.hpp>
+
#include "clipper.h"
#include "command_processor.h"
#include "math.h"
@@ -65,10 +67,14 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) {
// Information about internal vertex attributes
u32 vertex_attribute_sources[16];
- std::fill(vertex_attribute_sources, &vertex_attribute_sources[16], 0xdeadbeef);
+ boost::fill(vertex_attribute_sources, 0xdeadbeef);
u32 vertex_attribute_strides[16];
u32 vertex_attribute_formats[16];
- u32 vertex_attribute_elements[16];
+
+ // HACK: Initialize vertex_attribute_elements to zero to prevent infinite loops below.
+ // This is one of the hacks required to deal with uninitalized vertex attributes.
+ // TODO: Fix this properly.
+ u32 vertex_attribute_elements[16] = {};
u32 vertex_attribute_element_size[16];
// Setup attribute data from loaders