• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Site › Dolphin Patches (Archive) v
« Previous 1 2 3 4 5 ... 7 Next »

Bugfix: Enable SSE4.2 on GCC
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Bugfix: Enable SSE4.2 on GCC
10-09-2011, 01:59 PM
#1
fbarriga Offline
Junior Member
**
Posts: 8
Threads: 4
Joined: Sep 2011
You need to compile it with the flag -msse4.2

Code:
diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h
index 888a206..fd0f730 100644
--- a/Source/Core/Common/Src/Common.h
+++ b/Source/Core/Common/Src/Common.h
@@ -141,6 +141,8 @@ private:
#define _M_SSE 0x300
#elif defined __APPLE__ && defined __x86_64__
#define _M_SSE 0x301
+#elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && defined __SSE4_2__
+#define _M_SSE 0x402
#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
#define _M_SSE 0x301
#elif (_MSC_VER >= 1500) || __INTEL_COMPILER // Visual Studio 2008
diff --git a/Source/Core/VideoCommon/Src/VertexLoader_TextCoord.cpp b/Source/Core/VideoCommon/Src/VertexLoader_TextCoord.cpp
index de85308..6d1e4e4 100644
--- a/Source/Core/VideoCommon/Src/VertexLoader_TextCoord.cpp
+++ b/Source/Core/VideoCommon/Src/VertexLoader_TextCoord.cpp
@@ -438,7 +438,7 @@ void VertexLoader_TextCoord::Init(void) {

#if _M_SSE >= 0x401

-    if (cpu_info.bSSE4_1) {
+    if (cpu_info.bSSE4_1 && cpu_info.bSSSE3) {
        tableReadTexCoord[3][3][1] = TexCoord_ReadIndex16_Short2_SSE4;
    }
Find
10-10-2011, 01:09 AM
#2
lamedude Offline
Senior Member
****
Posts: 360
Threads: 7
Joined: Jan 2011
Question 
Don't Linux users compile thier stuff with -march=native which would include -msse4.2 if their CPU has it?
Website Find
10-10-2011, 01:44 AM
#3
fbarriga Offline
Junior Member
**
Posts: 8
Threads: 4
Joined: Sep 2011
(10-10-2011, 01:09 AM)lamedude Wrote: Don't Linux users compile thier stuff with -march=native which would include -msse4.2 if their CPU has it?

No, it enable other flags even if your system support SSE4.2.
Find
10-10-2011, 03:02 AM
#4
fbarriga Offline
Junior Member
**
Posts: 8
Threads: 4
Joined: Sep 2011
(10-10-2011, 01:44 AM)fbarriga Wrote:
(10-10-2011, 01:09 AM)lamedude Wrote: Don't Linux users compile thier stuff with -march=native which would include -msse4.2 if their CPU has it?

No, it enable other flags even if your system support SSE4.2.

My fault, damn SSE* nomenclature, my CPU doesn't support SSE4.2 (so I suppose thst you can ignore my '-msse4.2' comment).
Find
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode