Commit Graph

6637 Commits

Author SHA1 Message Date
gibbed 3162a6435c [xboxkrnl] Implement ExTryToAcquireRWLExclusive.
[xboxkrnl] Implement ExTryToAcquireReadWriteLockExclusive.
2022-01-07 10:22:48 -06:00
gibbed e795337071 [xboxkrnl] ExReleaseReadWriteLock fixes.
[xboxkrnl] ExReleaseReadWriteLock fixes:
- Don't unncessarily double-load lock members.
- Reset readers entry count when lock count becomes negative.
- Properly decrease writers waiting count when writer event fired.
2022-01-07 10:22:48 -06:00
gibbed b4f35635c5 [xboxkrnl] ExAcquireReadWriteLockExclusive fixes.
[xboxkrnl] ExAcquireReadWriteLockExclusive fixes:
- Don't unnecessarily double-load lock count.
- Don't release spin lock before we're done with the lock.
2022-01-07 10:22:48 -06:00
gibbed fa774f1d86 [xboxkrnl] Fix up XexGetProcedureAddress logging.
[xboxkrnl] Fix up XexGetProcedureAddress failure logging.
2022-01-07 09:35:43 -06:00
Wunkolo 4303f6b200 [x64] Fix OPCODE_AND_NOT src1-constant case
Fix the the case where src1 is constant and src2 is non-constant causing
an assert due to trying to call `.constant()` on the src2 operand.
Interfaces with an issue Gliniak was encountering where title `4D53082D`
encounters an assert. Also includes a BMI1-acceleration in the 64-bit
case where a temporary register is needed(the `and` x86 instruction only
supports immediate constants up to 32-bits).
2022-01-06 13:00:58 -06:00
Gliniak 20fe7bc4b7 [Kernel/XMP] Send correct notification when playback controller is changed
- Changed locked into playback_client enumerator
- Changed vague notification name to something more descriptive
2022-01-04 16:22:57 -06:00
Gliniak 1ba4fbec17 [Kernel/XMP] Remove responsibility of stopping audio when controller is changed 2022-01-04 16:22:57 -06:00
Margen67 6ea8e043f3 [AppVeyor] Cleanup
Remove unneeded init:
 As far as I can tell this is a leftover from the appveyor.yml Reference: https://www.appveyor.com/docs/appveyor-yml/
Cleanup command blocks:
 cmd is the default shell, so it doesn't have to be specified.
 Use proper multi-line syntax for install.
Make configuration into one line:
 This reduces line count, but is mainly personal preference.
2022-01-04 16:18:28 -06:00
Wunkolo 24d4e1e0e5 [x64] Add `BMI1`-based acceleration for `AndNot`
In the case of having two register operands for `AndNot`, the `andn` instruction can be used when the host supports `BMI1`. `andn` only supports 32-bit and 64-bit operands, so some register up-casting is needed.
2022-01-04 16:16:49 -06:00
Wunkolo 3ab43d480d [x64] Add `kX64EmitBMI1` feature-flag and detection
The `BMI1 feature` fits into the current pattern of `use_haswell_instructions` as BMI1 was only introduced in haswell.

Also moved the aliases to the end of the enum rather than interleave it with the bit definitions.
2022-01-04 16:16:49 -06:00
Wunkolo 0fdb855a11 [JIT, x64] Add and implement `OPCODE_AND_NOT`
Verified the x64 implementation using `xenia-cpu-ppc-tests`.
2022-01-04 16:16:49 -06:00
Joel Linn 4f258b2ee9 [GPU, Vulkan] Fix typo in non AMD64 code
* `copy_and_swap_16_unaligned` -> `copy_cmp_swap_16_unaligned`.
2022-01-02 16:47:05 -06:00
Joel Linn 59cce10ae1 [CI, Drone] Add Android NDK builds 2022-01-02 16:47:05 -06:00
Joel Linn 657645fb2c [CI, Drone] Add GCC builds
* Switch to starlark language to simplify configuration
* Use image `xeniaproject/buildenv:2022-01-01`
2022-01-02 16:47:05 -06:00
Joel Linn b2e51fd24f [xenia-build] Update clang-format version to 13 2022-01-02 16:47:05 -06:00
Rick Gibbed 7fc93185f2 Replace premake5 binary with CI artifact. 2022-01-02 15:49:18 -06:00
Rick Gibbed 094c20bd4e Update premake-core. 2022-01-02 15:43:59 -06:00
Wunkolo 13a48e13bd [Base] Add `operator<<` string conversion for `vec128_t`
This allows `catch` to print out the contents of a particular vector when diagnosing how a `REQUIRE` expression has failed.
2022-01-02 15:14:58 -06:00
Wunkolo f645c3ba31 [Base] Fix `to_hex_string` out-of-indexing for `vec128_t` type
Trying to print five `{:08X}` when vec128_t only has four values. 🥴
2022-01-02 15:14:58 -06:00
Wunkolo 5317907523 [x64] Add `kX64EmitAVX512*` feature-flags
Implements the detection of some baseline `AVX512` subsets and some common aliases into `X64EmitterFeatureFlags`.

So far, `AVX512{F,VL,BW,DQ}` are the only subsets of `AVX512` that are detected with this PR since I anticipate these are the ones that will actually be used a lot in the x64 backend. Some aliases are also implemented such as `kX64EmitAVX512Ortho` which is `AVX512F` and `AVX512VL` combined which are the two subsets of AVX512 required to allow for `AVX512` operations upon `ymm` and `xmm` registers.

These aliases can possibly be collapsed since we could just always require `AVX512VL` to be supported to allow for _any_ kind of `AVX512` to be used since we will practically always want to use `AVX512` on `xmm` registers at the very least as there is no use-case where we want to use the 512-bit `zmm` registers exclusively.
2022-01-02 11:52:31 -06:00
Wunkolo 1a8068b151 [Base] Add user-literals for several memory sizes
Rather than using `n * 1024 * 1024`, this adds a convenient `_MiB`/`_KiB` user-literal to the new `literals.h` header to concisely describe units of memory in a much more readable way. Any other useful literals can be added to this header. These literals exist in the `xe::literals` namespace so they are opt-in, similar to `std::chrono` literals, and require a `using namespace xe::literals` statement to utilize it within the current scope.

I've done a pass through the codebase to replace trivial instances of `1024 * 1024 * ...` expressions being used but avoided anything that added additional casting complexity from `size_t` to `uint32_t` and such to keep this commit concise.
2022-01-02 11:51:31 -06:00
Wunkolo b64b4c6761 [x64] IsFeatureEnabled: Allow parallel feature checks
Just checking if the resulting mask is non-zero means we cannot allow this function to check for multiple features in parallel. A hypothetical computer that supports FMA but not AVX2 will return `true` if you try to call `IsFeatureEnabled(kX64EmitFMA | kX64EmitAVX2)`. We should make sure all the masked flags return `true` rather than check for non-zero.

This is ramping up to allow for particular subsets of AVX512 to be checked for in parallel with a single function call.
2021-12-28 20:57:32 -06:00
Gliniak 371441ec3a [XModule] Remove module and its functions while unloading 2021-12-27 09:18:44 +01:00
Gliniak f2c0ae46c1 [Kernel] Added missing month to RtlTimeFieldsToTime
Additionally added check for highest possible month day
2021-12-22 15:02:25 +03:00
Triang3l 701300e8e9 [Linux] Use sched_yield instead of the deprecated pthread_yield 2021-12-18 19:43:17 +03:00
Triang3l a950dff87d [Vulkan] Update SPIRV-Tools fork to fix Linux building issue 2021-12-17 13:49:36 +03:00
Dr. Chat 509a1fa386 [GPU] Fix a crash when GetWindowTitleText is called before the texture cache is initialized 2021-12-12 22:51:24 -06:00
Triang3l e25167d2bc [GPU] Fix quads>triangles cvar, primitive type test cases 2021-12-12 18:28:02 +03:00
Triang3l 0846cc026d [APU] Manage XAudio 2.8 lifecycle in MTA thread + error handling cleanup 2021-12-12 17:05:01 +03:00
Triang3l 9606ff2a31 [D3D12] Fix 8192 texture size storage 2021-12-12 16:27:49 +03:00
Triang3l d813f7435b [GPU] Revert 64bpp resolve addressing regression caused by a misunderstanding 2021-12-12 14:32:03 +03:00
Triang3l 793cebd6a7 [GPU] Explain 1.5x scaling issues in a comment 2021-12-12 14:31:05 +03:00
Triang3l 38b4741c8f [GPU] Mostly generic, not square-only resolution scaling 2021-12-11 21:55:33 +03:00
Triang3l e2da8597e1
[UI] Delete the now-unused loop_gtk.h 2021-12-04 16:36:45 +03:00
Jack Harper 211cc99f42 Rename control_flow_analysis_pass.cpp to control_flow_analysis_pass.cc
All of the (non-third party) cpp impl files use the .cc extension, this one doesn't. I was digging through the code and found this one so thought I might as well rename it whilst I'm here!
2021-11-13 02:18:22 +03:00
Triang3l fdec0ab332 [Code] Make union usage more consistent 2021-11-03 20:45:09 +03:00
Triang3l dbd518f137 [Android] Clone Premake from sdcard to a hidden directory 2021-11-02 03:03:45 +03:00
Triang3l bf1f189e78 [Android] Make gradlew executable 2021-11-01 23:24:22 +03:00
Triang3l ee937b98d9 [Android] Update Gradle to 7.2 + Android plugin 7.0.3 2021-11-01 23:21:21 +03:00
Triang3l ddc3885795 [UI] Remove dtor lock as thread join will be done anyway 2021-10-31 16:04:46 +03:00
Triang3l 7e6cf349e2 [Build] Use first-party premake-androidndk (#1878) 2021-10-30 00:01:27 +03:00
Conrad Kramer 2962a266b5 Fix xenia-core build on macOS 2021-10-25 00:48:53 +03:00
Conrad Kramer 548758857f Fix Xcode support in xenia-build 2021-10-25 00:48:53 +03:00
Triang3l 28fec845d5 [GPU] Document memexport/resolve formats with more details 2021-10-22 20:00:41 +03:00
Gliniak f40607041b [APU] Skip audio header when there is no valid input
Thanks Cancerous1/Randprint for initial reseach in this topic
2021-10-18 08:50:51 +02:00
Gliniak d6660ac391 [Kernel] Added %L to formatter 2021-10-14 15:05:12 -05:00
soopercool101 5161bd7ab2 Fix "404 not found" on "Build commit on Github..." 2021-09-28 16:29:22 -05:00
Joel Linn cfd18b89f8 [GPU] GCC build fix for render target cache 2021-09-27 13:43:57 +03:00
Joel Linn 247cb91ac5 [Base] Replace GCC workaround (loop opt bug)
Previous workaround was dangerous, this one is more sane.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100801#c3
2021-09-27 13:43:57 +03:00
Triang3l 36d8b20287 [Docs] Android code style guide 2021-09-18 20:33:00 +03:00