From 02fdc8f9fc7583860fc6e4f7d73f8063997af266 Mon Sep 17 00:00:00 2001 From: arcum42 Date: Fri, 26 Mar 2010 09:19:41 +0000 Subject: [PATCH] zzogl-pg: Use the memcpy_fast routines from Utilities in Linux. (Right now, Windows is using an old copy of it, and Linux wasn't using it at all.) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2774 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/zzogl-pg/opengl/GLWinX11.cpp | 6 +- plugins/zzogl-pg/opengl/GS.h | 5 + .../opengl/Linux/zzogl-pg/zzogl-pg.cbp | 6 +- plugins/zzogl-pg/opengl/Makefile.am | 10 +- plugins/zzogl-pg/opengl/memcpy_amd.cpp | 21 +- plugins/zzogl-pg/opengl/x86-32.S | 336 +++++++++--------- 6 files changed, 197 insertions(+), 187 deletions(-) diff --git a/plugins/zzogl-pg/opengl/GLWinX11.cpp b/plugins/zzogl-pg/opengl/GLWinX11.cpp index 746be68482..df433c52fc 100644 --- a/plugins/zzogl-pg/opengl/GLWinX11.cpp +++ b/plugins/zzogl-pg/opengl/GLWinX11.cpp @@ -62,9 +62,9 @@ void GLWindow::CloseWindow() { if ( glDisplay != NULL ) { - XCloseDisplay(glDisplay); - glDisplay = NULL; - } + XCloseDisplay(glDisplay); + glDisplay = NULL; + } } bool GLWindow::DisplayWindow(int _width, int _height) diff --git a/plugins/zzogl-pg/opengl/GS.h b/plugins/zzogl-pg/opengl/GS.h index 0de5d18f96..a2a181a0f4 100644 --- a/plugins/zzogl-pg/opengl/GS.h +++ b/plugins/zzogl-pg/opengl/GS.h @@ -872,8 +872,13 @@ char *SysLibError(); // Gets previous error loading sysbols void SysCloseLibrary(void *lib); // Closes Library void SysMessage(const char *fmt, ...); +#ifdef __LINUX__ +#include "Utilities/MemcpyFast.h" +#define memcpy_amd memcpy_fast +#else extern "C" void * memcpy_amd(void *dest, const void *src, size_t n); extern "C" u8 memcmp_mmx(const void *dest, const void *src, int n); +#endif template class CInterfacePtr diff --git a/plugins/zzogl-pg/opengl/Linux/zzogl-pg/zzogl-pg.cbp b/plugins/zzogl-pg/opengl/Linux/zzogl-pg/zzogl-pg.cbp index 97cfe70351..93529022a9 100644 --- a/plugins/zzogl-pg/opengl/Linux/zzogl-pg/zzogl-pg.cbp +++ b/plugins/zzogl-pg/opengl/Linux/zzogl-pg/zzogl-pg.cbp @@ -16,6 +16,9 @@ + + + @@ -44,6 +48,7 @@ + @@ -119,7 +124,6 @@