Fixed bug 2376 - no SDL_HasAVX
Haneef Mubarak AVX is the successor to SSE* and is fairly widely available. As such, it really ought to be detectable. This functionality ought to be trivial to implement, and not having it means being forced to write an ugly workaround to check for AVX (so that normal SSE can be used if AVX is not available). Here is an example on detecting AVX from SO (it actually shows ways to cehck for all of teh fancy instructions): http://stackoverflow.com/questions/6121792/how-to-check-if-a-cpu-supports-the-sse3-instruction-set
This commit is contained in:
parent
8ba565fffb
commit
3bd0e9002e
6 changed files with 45 additions and 0 deletions
|
@ -163,6 +163,7 @@ int platform_testGetFunctions (void *arg)
|
|||
* http://wiki.libsdl.org/moin.cgi/SDL_HasSSE3
|
||||
* http://wiki.libsdl.org/moin.cgi/SDL_HasSSE41
|
||||
* http://wiki.libsdl.org/moin.cgi/SDL_HasSSE42
|
||||
* http://wiki.libsdl.org/moin.cgi/SDL_HasAVX
|
||||
*/
|
||||
int platform_testHasFunctions (void *arg)
|
||||
{
|
||||
|
@ -197,6 +198,9 @@ int platform_testHasFunctions (void *arg)
|
|||
ret = SDL_HasSSE42();
|
||||
SDLTest_AssertPass("SDL_HasSSE42()");
|
||||
|
||||
ret = SDL_HasAVX();
|
||||
SDLTest_AssertPass("SDL_HasAVX()");
|
||||
|
||||
return TEST_COMPLETED;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue