janwas
383cf7b220
cleanup:
...
use intrinsics for cpu_AtomicAdd and cpu_CAS, get rid of the
corresponding assembly implementations. (wrapper functions are necessary
at work because mere declarations aren't enough to export the functions
from DLL)
also remove no longer needed fminf
This was SVN commit r8521.
2010-11-02 13:38:56 +00:00
janwas
52851faeb6
cleanup - remove old cpu_memcpy and cpu_i64FromDouble that are no longer needed
...
This was SVN commit r8517.
2010-11-01 11:09:03 +00:00
janwas
657ec9aa45
WIP timer thread safety:
...
CAS functions now implemented directly in external asm files (avoids
wrapper functions)
reinstated cpu_CAS64 (checking ARCH_IA32 at every call site is onerous)
(temporarily disable timer monotonicity check)
This was SVN commit r8515.
2010-11-01 09:54:03 +00:00
janwas
2b9774aa05
fix: alt+enter -> resize window -> maximize window failed to generate a resize event
...
This was SVN commit r8514.
2010-11-01 09:04:55 +00:00
Ykkrosh
aefc87f226
Windows fixes
...
This was SVN commit r8513.
2010-10-31 22:26:41 +00:00
Ykkrosh
034504f536
Remove misleading wposix declaration of unimplemented gettimeofday.
...
This was SVN commit r8510.
2010-10-31 21:58:30 +00:00
Ykkrosh
dd5ff36363
Fix Linux build error ( fixes #651 ).
...
This was SVN commit r8487.
2010-10-29 15:48:46 +00:00
janwas
0c3d69ae29
fixes from work: clarify that cpu_MemoryBarrier has no runtime cost by renaming to COMPILER_FENCE and moving to code_annotation.h; fix 32-bit Parallel Studio 2011 warning.
...
This was SVN commit r8486.
2010-10-29 12:54:51 +00:00
janwas
825bbf8f51
parallel studio 2011 warning fixes
...
This was SVN commit r8484.
2010-10-28 12:22:11 +00:00
Ykkrosh
e188683bab
Preserve cursor-grabbing across alt-tabs on Windows (probably fixes #508 ).
...
This was SVN commit r8430.
2010-10-21 21:09:41 +00:00
janwas
d11bc41d9a
move support for GL swap control into wsdl (based on patch from wacko)
...
fixes #523
This was SVN commit r8399.
2010-10-17 08:55:47 +00:00
janwas
2270961d14
VC2010 fix
...
This was SVN commit r8353.
2010-10-14 09:39:41 +00:00
janwas
48360edf21
noticed during testing that the file cache is much smaller than our dataset; added logic to choose a decent size. rebuild-workspaces required.
...
wversion: move into separate component from wutil to allow inclusion
from GameSetup without pulling in windows.h (causes conflicts)
This was SVN commit r8319.
2010-10-09 21:14:08 +00:00
Ykkrosh
6b5b35c245
Remove BFD-based debugging code, to avoid the runtime dependency on binutils.
...
Fixes #581 .
This was SVN commit r8271.
2010-10-04 17:21:55 +00:00
janwas
f5f65c23c0
OSX compat: remove cpu_CAS64 wrapper, since intptr_t and i64 apparently aren't compatible types. IA-32 code should call ia32_asm_CAS64 if it wants to CAS 64-bit values.
...
This was SVN commit r8080.
2010-09-05 15:38:34 +00:00
janwas
2e7436434d
warning fixes: mostly size_t vs. specialized API type and other type conversion.
...
added player_id_t typedef and INVALID_PLAYER, use that instead of -1.
also added sanity checks to cpu.cpp to ensure ARCH_* is correct (see
http://www.wildfiregames.com/forum/index.php?showtopic=13327&hl= )
and further predefined macros to arch.h just to be sure.
This was SVN commit r8079.
2010-09-05 09:38:30 +00:00
Ykkrosh
1c535b6a8a
Fix #544 (Fall back to windowed mode if fullscreen fails), based on patch from oln
...
This was SVN commit r8072.
2010-09-04 14:49:12 +00:00
Ykkrosh
3abe355b7c
Disable implementation of os_cpu_SetThreadAffinityMask on Linux, since it's not necessary and it causes errors.
...
Should fix #547 .
This was SVN commit r8024.
2010-08-22 11:23:50 +00:00
Ykkrosh
8367b73087
Fix warning
...
This was SVN commit r7937.
2010-08-13 18:13:14 +00:00
janwas
7eebe05485
fixes+improvements from work:
...
timer: cleanup, remove duplication
topology: fix incorrect param order
tsc: ensure MSRs are available before accessing
msr: add prefix to make clear that registers are nehalem-specific
This was SVN commit r7892.
2010-08-10 17:03:17 +00:00
janwas
b89e86772b
belatedly add files missing from 3d45069b3f (my bad)
...
This was SVN commit r7884.
2010-08-09 07:37:43 +00:00
janwas
3d45069b3f
improvements/additions from work
...
bits: fix bit_mask for signed types, add SetBitsTo, LeastSignificantBit,
ClearLeastSignificantBit.
add MSR support (read/write via mahaf in kernel mode)
x86_x64: expose family/model
topology: add support for determining core/package from APIC ID.
TSC: report actual frequency for nehalem invariant TSC.
improved UNREACHABLE/ASSUME_UNREACHABLE (avoid ICC warning, add GCC4.5
support)
This was SVN commit r7860.
2010-08-06 13:03:44 +00:00
Ykkrosh
b4e409e80d
Fix #525 more, so it doesn't use an uninitialised variable
...
This was SVN commit r7853.
2010-08-05 17:13:10 +00:00
janwas
c944148337
fix deadlock in pre-XP SP2 windows codepath
...
fixes #525
This was SVN commit r7852.
2010-08-05 16:20:11 +00:00
Ykkrosh
51d0abbf2a
Use SDL_GL_SWAP_CONTROL to control vsync on non-Windows. Fixes #520 .
...
This was SVN commit r7845.
2010-08-04 21:30:43 +00:00
janwas
95047013d0
improvement to os_cpu_SetThreadAffinityMask: avoid Sleep(), fall back to APIC ID if GetCurrentProcessorNumber is unavailable
...
This was SVN commit r7841.
2010-08-02 07:56:37 +00:00
Ykkrosh
1706363bab
Fix #423 (Switch from CppDoc to Doxygen), based on patch from anr.
...
Also delete some unused declarations, and rename is_playing to
snd_is_playing.
This was SVN commit r7813.
2010-07-29 15:55:41 +00:00
Ykkrosh
759e452e0b
Fix warning
...
This was SVN commit r7810.
2010-07-25 18:19:30 +00:00
Ykkrosh
f6a1501410
Set svn:eol-style native
...
This was SVN commit r7809.
2010-07-25 18:08:35 +00:00
janwas
f79056efbd
fix CPU topology problem under VMs reported by Philip (update workspaces required)
...
also moved lib.h's code generation macros into a separate file to break
a circular dependency with lib.h's use of debug_assert, and added a stub
implementation of sysdep/numa.h
This was SVN commit r7808.
2010-07-25 17:10:57 +00:00
Ykkrosh
4cd88d8aa9
Remove an assertion which I hope wasn't important
...
This was SVN commit r7801.
2010-07-24 21:54:54 +00:00
janwas
fea6745ec9
fix incorrect screening of APIC IDs (now handle OS X's lack of thread affinity and/or running under a VM without complaint)
...
This was SVN commit r7797.
2010-07-24 18:48:25 +00:00
Ykkrosh
523a6a5819
Fix tests to be more tolerant of odd environments
...
This was SVN commit r7796.
2010-07-24 15:49:40 +00:00
Ykkrosh
9f6eb626b4
Fix reported build errors
...
This was SVN commit r7792.
2010-07-23 19:11:02 +00:00
Ykkrosh
a3f37209a5
Warning fix
...
This was SVN commit r7787.
2010-07-22 19:01:25 +00:00
janwas
8ab70776a5
fix: cpu_CAS64 should use i64 for compatibility with 64-bit CAS
...
This was SVN commit r7786.
2010-07-22 18:57:36 +00:00
janwas
aa44bac652
from work: add thread-safe timer; add CAS64 (required for thread-safe timer); remove topology init requirements, no longer cache results (simplifies GroupPolicy_PerCache); add scoped affinitizer; whrt: fix race condition reported by parallel inspector. also refactor cache and TLB detection.
...
This was SVN commit r7785.
2010-07-22 16:17:33 +00:00
janwas
12568b0229
further fixes from work (where i've finally managed to (temporarily) sign the Aken driver)
...
in particular, remove two hindrances to displaying the error dialog
during early init.
This was SVN commit r7754.
2010-07-14 12:23:53 +00:00
janwas
c634a62f4c
from work: cpu_AtomicAdd - return previous value (required for atomic test&set)
...
numa: move allocator into higher-level VirtualMemory module, since
VirtualAllocExNuma requires Server 2008 and the workaround doesn't
require numa support
This was SVN commit r7753.
2010-07-14 08:52:20 +00:00
janwas
17469a93a1
fix: don't complain if redirecting stdout fails (when running as non-admin from "program files")
...
see http://www.wildfiregames.com/forum/index.php?showtopic=12949&hl=
also remove extern "C" to allow C++ implementation functions
This was SVN commit r7750.
2010-07-14 07:29:35 +00:00
janwas
45016e3980
numa: fix: nodeNumber isn't guaranteed to be contiguous; fix race conditions during init; add support for ACPI SRAT; pin NUMA alloc thread to NUMA node; major refactor
...
also removed two critical sections (no longer needed due to thread-safe
init)
This was SVN commit r7745.
2010-07-13 12:45:27 +00:00
Ykkrosh
ee72115b7a
Fix Linux compile error
...
This was SVN commit r7743.
2010-07-12 22:14:28 +00:00
janwas
9f66c86d64
fix ACPI table validation after encountering signatures containing ! and _ (invalid)
...
This was SVN commit r7742.
2010-07-12 13:01:12 +00:00
janwas
98770fa4cc
# fix race conditions in ModuleInit and related cleanup.
...
CAS: uintptr_t->intptr_t to allow use of both cpu_CAS and cpu_AtomicAdd
topology: remove non-thread safe caching, expose ApicIds, use ModuleInit
x86_x64: use ModuleInit instead of unsafe static flags; zero-init regs
instead of just setting ecx
ModuleInitState now holds the LibError returned by the init callback (so
that the second init doesn't appear to succeed despite the first
failing)
wnuma: cleanup, add ACPI SLIT relative distance detection
This was SVN commit r7741.
2010-07-12 12:57:58 +00:00
janwas
e6dec4b4b4
(vc2010) warning fixes
...
This was SVN commit r7733.
2010-07-10 18:24:02 +00:00
janwas
5030706314
more ACPI fixes (acpi_Init removed => callers must be prepared for acpi_GetTable to return 0)
...
This was SVN commit r7731.
2010-07-10 17:42:54 +00:00
janwas
c538d483bc
fix overzealous assert (if windows doesn't provide the ACPI routines, the returned list of tables will of course be empty)
...
see
http://www.wildfiregames.com/forum/index.php?showtopic=12669&st=250&p=207927&#
This was SVN commit r7728.
2010-07-10 16:44:34 +00:00
janwas
fad4383a23
fix: wasn't checking function pointers => crash on older windows versions
...
This was SVN commit r7724.
2010-07-08 21:07:46 +00:00
Ykkrosh
a761cbdb6e
Fix URL opener on OS X
...
This was SVN commit r7720.
2010-07-08 18:35:02 +00:00
janwas
fdf92bee98
warning fixes
...
This was SVN commit r7719.
2010-07-08 10:58:24 +00:00