summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2014-10-29 17:28:10 -0400
committercomex <comexk@gmail.com>2014-10-29 17:28:10 -0400
commit67452c53f1e439236f856473e4d0f18ba8ba241a (patch)
treef94c77748e4da29f5e923a243e04d45fa8af8286 /Source/Core/VideoCommon
parenteb22adf24a7b9cdd823f6643a6ba51327be2354a (diff)
parent6afdff6023c16402a30e5e26d58d1438c94a6d90 (diff)
Merge pull request #1386 from booto/small-loop-fix
VideoCommon: loop bug in ShaderGenCommon.h debug
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/ShaderGenCommon.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/ShaderGenCommon.h b/Source/Core/VideoCommon/ShaderGenCommon.h
index 0d2cb208c8..54adb1ba17 100644
--- a/Source/Core/VideoCommon/ShaderGenCommon.h
+++ b/Source/Core/VideoCommon/ShaderGenCommon.h
@@ -94,6 +94,7 @@ public:
template<class uid_data2>
uid_data2* GetUidData() { return &data; }
const uid_data* GetUidData() const { return &data; }
+ const u8* GetUidDataRaw() const { return &values[0]; }
size_t GetUidDataSize() const { return sizeof(values); }
@@ -192,7 +193,7 @@ public:
file << "\n\nShader uid:\n";
for (unsigned int i = 0; i < new_uid.GetUidDataSize(); ++i)
{
- u32 value = ((u32*)new_uid.GetUidData())[i];
+ u8 value = new_uid.GetUidDataRaw()[i];
if ((i % 4) == 0)
{
auto last_value = (i+3 < new_uid.GetUidDataSize()-1) ? i+3 : new_uid.GetUidDataSize();
@@ -200,7 +201,7 @@ public:
file << "Values " << std::setw(2) << i << " - " << last_value << ": ";
}
- file << std::setw(8) << std::setfill('0') << std::hex << value << std::setw(1);
+ file << std::setw(2) << std::setfill('0') << std::hex << value << std::setw(1);
if ((i % 4) < 3)
file << ' ';
else