summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorxsacha <xsacha@gmail.com>2011-01-11 05:38:12 +0000
committerxsacha <xsacha@gmail.com>2011-01-11 05:38:12 +0000
commitbb725858eaead1ffab722e431a9a8c1be7276858 (patch)
tree21dd5cc9199557e6625ad20cdae8ea8996847e08 /Source/Core
parent3f5d1afc6a3da567c9e8c56fed84a850e1d9bfd0 (diff)
Forgot to commit the alignment for opcode last time.
Also, alignment fix for dlist (thx cotton). Hopefully no crashes now :) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6813 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoCommon/Src/DLCache.cpp2
-rw-r--r--Source/Core/VideoCommon/Src/OpcodeDecoding.cpp3
2 files changed, 2 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/Src/DLCache.cpp b/Source/Core/VideoCommon/Src/DLCache.cpp
index 4c3490ed01..47c8041105 100644
--- a/Source/Core/VideoCommon/Src/DLCache.cpp
+++ b/Source/Core/VideoCommon/Src/DLCache.cpp
@@ -455,7 +455,7 @@ bool CompileAndRunDisplayList(u32 address, int size, CachedDisplayList *dl)
ReferencedDataRegion* NewRegion = new ReferencedDataRegion;
NewRegion->MustClean = true;
NewRegion->size = transfer_size * 4;
- NewRegion->start_address = (u8*) new u8[NewRegion->size+0xf]; // alignment
+ NewRegion->start_address = (u8*) new u8[NewRegion->size+15+12]; // alignment and guaranteed space
NewRegion->hash = 0;
dl->InsertRegion(NewRegion);
u32 *data_buffer = (u32*)(u8*)(((size_t)NewRegion->start_address+0xf)&~0xf);
diff --git a/Source/Core/VideoCommon/Src/OpcodeDecoding.cpp b/Source/Core/VideoCommon/Src/OpcodeDecoding.cpp
index 8b7564158a..180fb93639 100644
--- a/Source/Core/VideoCommon/Src/OpcodeDecoding.cpp
+++ b/Source/Core/VideoCommon/Src/OpcodeDecoding.cpp
@@ -272,9 +272,8 @@ static void Decode()
u32 Cmd2 = DataReadU32();
int transfer_size = ((Cmd2 >> 16) & 15) + 1;
u32 xf_address = Cmd2 & 0xFFFF;
- u32 data_buffer[16];
+ GC_ALIGNED128(u32 data_buffer[16]);
DataReadU32xFuncs[transfer_size-1](data_buffer);
-
LoadXFReg(transfer_size, xf_address, data_buffer);
INCSTAT(stats.thisFrame.numXFLoads);