GregMiscellaneous: zzogl-pg:

* use a fence after non temporal move
* fix a crash in write clut


git-svn-id: http://pcsx2.googlecode.com/svn/branches/GregMiscellaneous@3839 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut@gmail.com 2010-09-26 09:25:43 +00:00
parent 8435ad3f01
commit 703927056e
2 changed files with 7 additions and 3 deletions

View File

@ -26,7 +26,9 @@
#include "zerogs.h"
#include "targets.h"
#include "ZZoglShaders.h"
#include <xmmintrin.h>
#ifdef ZEROGS_SSE2
#include <emmintrin.h>
#endif
#define RHA
//#define RW
@ -2301,6 +2303,9 @@ ZeroGS::CMemoryTarget* ZeroGS::CMemoryTargetMngr::GetMemoryTarget(const tex0Info
src += 32;
dst += 64;
}
// It is advise to use a fence instruction after non temporal move (mm_stream) instruction...
// store fence insures that previous store are finish before execute new one.
_mm_sfence();
#else
SSE2_UnswizzleZ16Target(dst, src, targ->height * GPU_TEXWIDTH / 16);
#endif

View File

@ -22,7 +22,6 @@
#include "x86.h"
#if defined(ZEROGS_SSE2)
#include <xmmintrin.h>
#include <emmintrin.h>
#endif
@ -679,7 +678,7 @@ extern "C" void __fastcall WriteCLUT_T16_I4_CSM1_sse2(u32* vm, u32* clut)
// Create a zero register.
__m128i zero_128 = _mm_setzero_si128();
if ((u32)vm & 0x0F) {
if ((u32)clut & 0x0F) {
// Unaligned write.
u16* clut_word_ptr = (u16*)clut;