src/cpuinfo


Log

Author Commit Date CI Message
Sam Lantinga 7df0f4fd 2018-09-27T14:56:29 Fixed bug 4277 - warnings patch Sylvain Patch a few warnings when using: -Wmissing-prototypes -Wdocumentation -Wdocumentation-unknown-command They are automatically enabled with -Wall
Ryan C. Gordon 4df859c5 2018-05-21T11:35:42 cpuinfo: Added SDL_HasAVX512F(). This checks for the "foundation" AVX-512 instructions (that all AVX-512 compatible CPUs support).
Ryan C. Gordon 8543ad7d 2018-05-21T11:34:57 cpuinfo: Added some internal SIMD-aligned allocation functions. Fixes Bugzilla #4150 (sort of).
Ryan C. Gordon 4718791f 2018-05-14T00:03:39 cpuinfo: Make CPU flags easier to read and add to.
Sam Lantinga e3cc5b2c 2018-01-03T10:03:25 Updated copyright for 2018
Sam Lantinga 20364769 2017-11-11T17:21:47 Fixed typo in comment
Sam Lantinga b821ded9 2017-08-21T13:00:40 SDL_cpuinfo.c: add os/2 support to SDL_GetCPUCount() and SDL_GetSystemRAM().
Ryan C. Gordon adecda50 2017-08-16T21:31:03 cpuinfo: Add SDL_HasNEON() support for ARM-based QNX.
Sam Lantinga c1802ef6 2017-03-06T21:25:06 Fixed compile error with gcc -std=c99
Ryan C. Gordon ca0bf151 2017-03-03T16:38:17 Fix some more compiler warnings on armcc.
Sam Lantinga 45b774e3 2017-01-01T18:33:28 Updated copyright for 2017
Ryan C. Gordon a949882a 2016-11-21T20:35:59 cpuinfo: fix SDL_HasNEON() on older iOS devices, fixed C++ comment.
Ryan C. Gordon 32cb3494 2016-11-17T17:03:43 cpuinfo: patched to compile for getauxval() path.
Ryan C. Gordon 0b33a118 2016-11-17T16:10:32 cpuinfo: more patching for Android. Legacy platform targets are a pain.
Ryan C. Gordon a298e563 2016-11-17T16:04:00 cpuinfo: Patched to compile on Android, Linux.
Ryan C. Gordon e8f4b7c4 2016-11-17T16:01:59 cpuinfo: patched to compile. Nothing quite like experimentation via Buildbot! :/
Ryan C. Gordon 74eb78dc 2016-11-17T15:57:58 cpuinfo: more work on SDL_HasNEON().
Ryan C. Gordon db97c3d3 2016-11-17T01:41:56 cpuinfo: silence compiler warnings on non-Intel CPU architectures.
Ryan C. Gordon 66a36d56 2016-11-17T01:34:18 cpuinfo: disable NEON detection on Android for now. Will fix this properly soon.
Ryan C. Gordon 5c6b2ebf 2016-11-17T01:26:56 cpuinfo: more robust ARM preprocessor checks.
Ryan C. Gordon 35430a73 2016-11-17T01:15:16 cpuinfo: first attempt at SDL_HasNEON() implementation.
Ryan C. Gordon 7592b40b 2016-11-16T22:49:04 cpuinfo: Removed code duplication, cached CPUID details.
Sam Lantinga 42065e78 2016-01-02T10:10:34 Updated copyright to 2016
Ryan C. Gordon 696cd797 2015-12-29T02:32:47 NetBSD: fixed issues with cpuinfo and pthread_setname_np (thanks, Thomas!). Fixes Bugzilla #3176.
Philipp Wiesemann 0e45984f 2015-06-21T17:33:46 Fixed crash if initialization of EGL failed but was tried again later. The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly uninitialized data structure if loading the library first failed. A later try to use EGL then skipped initialization and assumed it was previously successful because the data structure now already existed. This led to at least one crash in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was dereferenced to make a call to eglBindAPI().
Sam Lantinga 2c4a6ea0 2015-05-26T06:27:46 Updated the copyright year to 2015
Ryan C. Gordon b72938c8 2015-04-20T12:22:44 Windows: Always set the system timer resolution to 1ms by default. An existing hint lets apps that don't need the timer resolution changed avoid this, to save battery, etc, but this fixes several problems in timing, audio callbacks not firing fast enough, etc. Fixes Bugzilla #2944.
Alex Szpakowski fe6c797c 2015-04-10T23:30:31 Fixed an iOS view orientation issue when SDL_GL_CreateContext or SDL_CreateRenderer is called.
Edward Rudd b88ca1b4 2015-02-10T16:28:56 the last parameter of XChangeProperty is the number of elements.. and when the element format is 32.. the element is "long" so we have 5 long elements here. Yes this seems confusing as on mac+linux Long is either 32 or 64bits depending on the architecture, but this is how the X11 protocol is defined. Thus 5 is the correct value for the nelts here. Not 5 or 10 depending on the architecture. More info on the confusion https://bugs.freedesktop.org/show_bug.cgi?id=16802
Philipp Wiesemann b48e54aa 2015-01-26T22:00:29 Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation Jonas Kulla The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c. I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
Ryan C. Gordon 16f3cbfc 2014-12-26T23:16:54 Cleaned up some compiler warnings.
Ryan C. Gordon fe40a172 2014-12-18T00:19:52 Initial merge of Emscripten port! With this commit, you can compile SDL2 with Emscripten ( http://emscripten.org/ ), and make your SDL-based C/C++ program into a web app. This port was due to the efforts of several people, including: Charlie Birks, Sathyanarayanan Gunasekaran, Jukka Jyl?nki, Alon Zakai, Edward Rudd, Bruce Mitchener, and Martin Gerhardy. (Thanks, everyone!)
David Ludwig 70438be2 2014-12-03T10:55:23 WinRT: fixed bug whereby SDL would override an app's default orientation WinRT apps can set a default, preferred orientation via a .appxmanifest file. SDL was overriding this on app startup, and making the app use all possible orientations (landscape and portrait). Thanks to Eric Wing for the heads up on this!
Philipp Wiesemann 9c398852 2014-11-22T22:20:40 Corrected header file documentation comment.
Pierre-Loup A. Griffais 24c86b55 2014-09-11T19:24:42 [X11] Reconcile logical keyboard state with physical state on FocusIn since the window system doesn't do it for us like other platforms. This prevents sticky keys and missed keys when going in and out of focus, for example Alt would appear to stick if switching away from an SDL app with Alt-Tab and had to be pressed again. CR: Sam
David Ludwig ff5caa17 2014-08-10T22:21:21 WinRT build fix for ARM platforms The _xgetbv intrinsic was being used in ARM builds of SDL/WinRT, which was leading to linker errors. This commit limits _xgetbv use to the platforms on which it is available, x86 and x64.
Sam Lantinga 454c4a01 2014-07-11T22:15:34 Fixed Visual Studio 2010 build
Sam Lantinga 6a1011ae 2014-07-11T22:14:14 Fixed build for arm platforms
Sam Lantinga eb1c6044 2014-07-11T22:02:50 Fixed bug in AVX detection and added AVX2 detection
David Ludwig 3dcb451f 2014-04-09T21:29:19 Added a README file regarding WinRT support To note, this file is currently formatted with CRLF line endings, rather than LF, to allow the file to be viewed with Notepad.
Ryan C. Gordon 546cb890 2014-03-19T16:55:38 Static analysis fix: Value stored to '[bcd]' is never read.
Sam Lantinga 9cd5f5ce 2014-02-22T19:10:45 Fixed bug 2404 - CPU detection not working with MSVC on x64 Tiemo Jung All CPU detection functions SDL_Has* will return false, even if it is supported by the CPU, if SDL is compiled with MSVC and the target is x64. The reason for this is that 'CPU_haveCPUID' will return 0 and macro 'cpuid' in SDL_cpuinfo.c is the fallback implementation, which sets all params to zero. It is safe to assume that cpuid is supported on a CPU that runs windows x64, so CPU_haveCPUID can just return 1, and the empty macro can be replaced with a small wrap around the __cpuid intrinsic.
Sam Lantinga fea87cc9 2014-02-22T18:01:18 Fixed bug 2335 - Fails to build on Debian GNU/kFreeBSD Felix Geyer Starting from version 2.0.1 libsdl fails to build on Debian GNU/kFreeBSD in SDL_cpuinfo.c. GNU/kFreeBSD defines __FreeBSD_kernel__ but not __FreeBSD__. The #ifdef __FreeBSD__ check should be extended for __FreeBSD_kernel__, see the attached patch. Build log: libtool: compile: gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -DUSING_GENERATED_CONFIG_H -Iinclude -I/?BUILDDIR?/libsdl2-2.0.1+dfsg1/include -mmmx -m3dnow -msse -msse2 -fvisibility=hidden -D_REENTRANT -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-kfreebsd-gnu/dbus-1.0/include -DHAVE_USBHID_H -DUSBHID_NEW -D_REENTRANT -Wall -c /?BUILDDIR?/libsdl2-2.0.1+dfsg1/src/cpuinfo/SDL_cpuinfo.c -fPIC -DPIC -o build/.libs/SDL_cpuinfo.o /?BUILDDIR?/libsdl2-2.0.1+dfsg1/src/cpuinfo/SDL_cpuinfo.c: In function 'SDL_GetSystemRAM': /?BUILDDIR?/libsdl2-2.0.1+dfsg1/src/cpuinfo/SDL_cpuinfo.c:632:35: error: 'HW_MEMSIZE' undeclared (first use in this function) int mib[2] = {CTL_HW, HW_MEMSIZE}; ^ /?BUILDDIR?/libsdl2-2.0.1+dfsg1/src/cpuinfo/SDL_cpuinfo.c:632:35: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [build/SDL_cpuinfo.lo] Error 1
Sam Lantinga 58edac3e 2014-02-02T00:53:27 Fixed bug 2374 - Update copyright for 2014... Is it that time already??
Sam Lantinga 3bd0e900 2014-02-02T00:33:31 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
Gabriel Jacobo f848adff 2013-11-29T10:06:08 Improve Android pause/resume behavior.
Ryan C. Gordon 7e1289af 2013-11-24T23:56:17 Make internal SDL sources include SDL_internal.h instead of SDL_config.h The new header will include SDL_config.h, but allows for other global stuff.
Ryan C. Gordon 72de99ae 2013-10-23T19:52:14 Initialize MEMORYSTATUSEX size before GlobalMemoryStatusEx() (thanks, Justin!). Fixes Bugzilla #2177.
Sam Lantinga 08fa8da7 2013-10-20T21:56:15 Fixed bug 2129 - fix for bug 2121 breaks linking for mingw and throws multiple warnings Andreas Ertelt The problem in question is caused by changeset 7771 (http://hg.libsdl.org/SDL/rev/5486e579872e / https://bugzilla.libsdl.org/show_bug.cgi?id=2121) The redefinition of __inline__ (introduced by the addition of begin_code.h:128's "|| __STRICT_ANSI__") results in mingw's gcc throwing multiple warning: always_inline function might not be inlinable [-Wattributes] as well as a whole bunch of redefinitions of mingw internals which break linking of projects including the SDL2 headers.
Sam Lantinga 12ca3ce3 2013-10-17T23:02:29 Fixed building using MinGW Our SDL_windows.h needed to be included before anything else so UNICODE is defined.
Sam Lantinga 95dc9940 2013-10-17T20:49:30 Fix to unbreak SDL_GetSystemRAM() on FreeBSD Marcus von Appen Revision eecbcfed77c9 of the SDL hg repo introduces the new SDL_GetSystemRAM() function, which breaks the build on FreeBSD. Find attached a patch, which unbreaks the build and also should (for most cases) properly implement the sysctl support it.
Sam Lantinga 2e6b4b96 2013-10-17T11:56:33 Fixed compiling on Mac OS X, added a system RAM test
Sam Lantinga 8b79cbad 2013-10-17T11:32:56 Added an API to get the amount of system RAM
Sam Lantinga 852004a2 2013-10-17T11:32:14 The _SC_PHYS_PAGES method of calculating RAM works on Linux.
Gabriel Jacobo dad42067 2013-08-12T11:13:50 Fixes #2022, do not resume on Android when surfaceChanged If the app is in landscape mode and the user presses the power button, a pause is followed immediately by a surfaceChanged event because the lock screen is shown in portrait mode. This triggers a "false" resume. So, we just pause and resume following the onWindowFocusChanged events. Also, wait for SDL_APP_WILLENTERBACKGROUND and SDL_APP_DIDENTERBACKGROUND before blocking the event pump.
Sam Lantinga 1ad936eb 2013-08-11T19:56:43 Fixed bug 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow() Rainer Deyke I'm running Linux Mint 15 with the Cinnamon window manager. SDL_DestroyWindow consistently locks up for me when the window if fullscreen.