Commit Graph

41 Commits

Author SHA1 Message Date
Billy Laws 0776d764a4
build: Support building for ARM64EC
When targeting ARM64EC, both __x86_64__ and _M_X86_64 are defined but
not all x86 intrinsics are present, treat EC as regular ARM64 so the
native intrinsics are used instead.
2024-03-09 05:43:46 +00:00
r-a-sattarov ac78048c23 [util] Fix e2k build 2024-01-16 22:03:31 +01:00
František Zatloukal 1a5afc77b1 [util] Include cstdint to fix compilation with GCC 13 2023-03-23 23:37:10 +01:00
Robin Kertels 1a3b576d35 [util] Implement bit vector 2022-11-21 16:06:49 +00:00
Joshua Ashton e037d24017 [util] Default initialize BitMask to 0
Found via an MSVC warning, may not fix anything, but good to do anyway.
2022-11-17 17:38:46 +01:00
Joshua Ashton 287412f746 [util] Cast _tzcnt_u64 to uint32_t
MSVC has _tzcnt_u64 return a uint64_t, which obviously, it can never return a number that big.
2022-11-17 17:38:46 +01:00
Adam Jereczek 0462454d2b
Fix for saving vertex shader constants with a StateBlock
Co-authored-by: aroztkow <aneta.roztkowska@intel.com>
2022-10-31 18:16:15 +00:00
Joshua Ashton fa45e5838e [util] Fix tzcnt on ARM64 + Clang
This needed brackets around this conditional.
2022-10-05 19:01:05 +01:00
Joshua Ashton 68c528d345 [util] Implement bitmask iterator on non-x86 platforms 2022-09-13 20:11:17 +01:00
Joshua Ashton 2d8e14fcf4 [util] Implement bcmpeq for non-x86 platforms 2022-09-13 20:11:17 +01:00
Joshua Ashton c3093b546e [util] Implement tzcnt for non-x86 platforms 2022-09-13 20:11:17 +01:00
Joshua Ashton 466026632d [util] Only include x86 intrinsics headers on x86 2022-09-13 20:11:17 +01:00
Joshua Ashton 736f91fad1 [util] Add macro to determine CPU arch 2022-09-13 20:11:17 +01:00
Georg Lehmann 8e37949a71 [util] Use raw tzcnt for BitMask iterator
Dereferencing an end iterator is UB, so we don't have to care about the 0
case.
2022-08-03 22:34:21 +02:00
Philip Rebohle b67d5c8c1d
[util] Correctly mark flag register as clobbered 2022-07-24 17:30:54 +02:00
Philip Rebohle 41ec5d2c52
[dxvk] Avoid bsf instruction
It's very slow compared to tzcnt on some CPUs, and we have a working fallback.
2022-07-24 15:24:00 +02:00
Philip Rebohle 16eba45987
[dxvk] Implement 64-bit tzcnt 2022-06-28 14:32:31 +02:00
Georg Lehmann 2e4caa4c14 [util] Stop using deprecated std::iterator. 2022-06-09 22:07:52 +02:00
Georg Lehmann 3fc1f2cecb [util] Fix MSVC build 2021-08-23 15:41:31 +01:00
Philip Rebohle ffc351f2f5 [util] Introduce BitMask helper 2021-08-16 08:49:46 -07:00
Joshua Ashton 64f417d6e6 [util] Add bsf helper
For when we know we aren't going to put in a mask of 0, we can use this and get better codegen.
2021-08-16 08:49:46 -07:00
Robin Kertels c43618d19f [d3d9] Fix texture dirty box clearing
- Fix interleaved locks with evictManagedOnUnlock
We need to make sure there are no other subresources of a texture locked
before clearing the dirty box. Otherwise the data for those other subresources
won't get copied into VRAM.

- Clear dirty box regardless of texture pool
Otherwise we keep repacking and copying the whole texture
for every single lock. This causes performance problems
in Star Wars: The Old Republic.
2021-07-01 05:47:44 -07:00
Joshua Ashton 0ea510eb9b [util] Add clearAll helper to bitset 2020-02-14 00:51:58 +00:00
Joshua Ashton 960d2bd158 [util] Add exchange helper to bitset 2020-02-14 00:51:58 +00:00
Joshua Ashton 9919ffe5ca [util] Add simple [] operator to our bitset 2020-01-23 02:05:09 +00:00
Joshua Ashton fae99907da [util] Add get to bitset 2019-12-18 23:18:01 +00:00
Joshua Ashton b99b1d153a [util] Add bitset helper 2019-12-18 14:48:01 +01:00
Joshua Ashton 57b2c02528 [util] Implement lzcnt 2019-12-11 03:18:39 +01:00
Joshua Ashton a3f74b5eda [util] Implement bit cast. 2019-12-11 03:18:39 +01:00
Philip Rebohle a743ba6531
[dxvk] Use memcmp replacement for pipeline state lookup
Measured to be over twice as fast as memcmp on Ryzen for the
512-byte graphics pipeline state struct, achieving two cycles
per iteration.
2019-10-07 22:01:48 +02:00
orbea c57e63f7d2 Work around build failure with winegcc/clang. (#1184)
Fixes #1182.
2019-09-05 18:01:33 +02:00
Joshua Ashton d579f07238 [util] Fix compiling with clang/clang-cl 2019-08-07 06:08:54 +02:00
Philip Rebohle dcd75a4f09
[util] Optimize popcnt operation 2019-05-09 18:04:33 +02:00
Philip Rebohle d2395180af
[util] Add helpers to pack/unpack data to/from larger units 2019-04-04 13:00:31 +02:00
Philip Rebohle 2aa6b04fd9
[dxvk] Fix tzcnt return value when source value is 0 2018-07-09 13:32:43 +02:00
Joshua Ashton 5cc3afcf30 Fix tzcnt intrinsic on MSVC (#381) 2018-05-19 09:26:25 +02:00
Philip Rebohle ec3b7e39af
[util] Fix includes 2018-05-09 20:37:49 +02:00
Philip Rebohle c7d2957d8f
[util] Remove duplicate tzcnt function 2018-05-09 20:09:09 +02:00
Philip Rebohle 4052951542 [dxbc] Removed most of the DXBC compiler again 2017-11-07 15:10:38 +01:00
Philip Rebohle 6954cfd84c [dxbc] Added helper classes for DXBC decoding 2017-10-21 17:58:58 +02:00
Philip Rebohle bb5b588d23 [dxbc] Added DXBC to SPIR-V compiler stub 2017-10-16 17:50:09 +02:00