Commit Graph

8351 Commits

Author SHA1 Message Date
Herman S.
f95ebb9c55 [x64] Fix mismatched operand sizes in CNTLZ fallback 2026-02-13 19:29:21 +09:00
Herman S.
88b0aea272 [x64] Zero extend on mov to 8bit register 2026-02-13 17:20:31 +09:00
Herman S.
15f61a1a10 [x64] Fix vector mask issue and add missing tests 2026-02-13 17:07:03 +09:00
Herman S.
435ea98a5a [Testing] Make sure tests clean up shm resources on exit 2026-02-13 15:22:43 +09:00
Herman S.
532418eed4 [Tests] Fix broken xenia-cpu tests 2026-02-13 15:20:19 +09:00
Herman S.
63d06a6083 [Testing] Ensure memory is fully initialized for stwcx test 2026-02-13 15:19:41 +09:00
Herman S.
d6a4493d5b [Testing] Add more instruction tests 2026-02-13 15:19:23 +09:00
Herman S.
2bb7c8dbf5 [Testing] Fix tests to use opcode mnemonics 2026-02-13 15:08:07 +09:00
Herman S.
ab182d4044 [Testing] Fix vsel128 and vnor128 tests 2026-02-13 15:07:55 +09:00
Herman S.
24c671bf63 [Testing/binutils] Fix VMX128 instruction definitions
Add dcbz128 instruction with opcode X(31,1014) | (1<<21)
dcbz and dcbz128 share extended opcode 1014, distinguished by
bit 21 (RT field): dcbz has RT=0, dcbz128 has RT=1.

Fix vspltisw128 operand list to {VD128, SIMM}
Removed incorrect VB128 operand; instruction only takes
destination and immediate value.

Fix VPERM128 field definition from 8-bit to 0xff
The vperm128 permute control is an 8-bit value (0-255),
not a 3-bit value (0-7).

Fix VC128 field flags from PPC_OPERAND_VR to 0
VC128 is a 3-bit immediate field, not a vector register operand.
2026-02-13 15:05:23 +09:00
Herman S.
1b25574986 [Testing] Add a lot more missing instruction tests 2026-02-13 14:49:49 +09:00
Herman S.
9e9b733dfb [Testing] binutils to support older instructions used in 360 2026-02-13 14:49:09 +09:00
Herman S.
4832bb485f [Testing] Add some lvx* tests 2026-02-13 13:59:49 +09:00
Herman S.
32b0e2c323 [Testing] Add missing control instruction tests 2026-02-13 13:59:40 +09:00
Herman S.
72f81b56c7 [Testing] Add missing ALU instruction tests 2026-02-13 13:59:32 +09:00
Herman S.
4a954506c6 [Testing] Add vpkpx tests 2026-02-13 13:59:23 +09:00
Herman S.
c0d1723469 [Testing] Add vlogefp tests 2026-02-13 13:59:14 +09:00
Herman S.
b6af8ed545 [Testing] Add more tests for logic, conversion and fp instructions 2026-02-13 13:59:05 +09:00
Herman S.
910157f6e0 [Testing] add more arithmetic instruction tests 2026-02-13 13:58:56 +09:00
Herman S.
4c7d152fee [Testing] Add missing avg and min/max tests 2026-02-13 13:58:45 +09:00
Herman S.
3461f2578b [Testing] add missing saturate arithmetic tests 2026-02-13 13:58:36 +09:00
Herman S.
f455b0b3c8 [Testing] add missing integer and rotation tests 2026-02-13 13:58:22 +09:00
Herman S.
09a15fbedc [Testing] Get tests running (dirty hack for linux) 2026-02-13 13:32:39 +09:00
Gliniak
14c2814654 [CPU] Fixed bug in VECTOR_SHL_V128 implementation
- For EmitInt8 there was missing check for & 7 which was causing graphical glitches in movies

- There is probably similar bug in 16/32 version, but that's for another commit
2026-02-11 22:41:36 +01:00
Gliniak
8f5da619f9 [Kernel] Replaced Yield in XAudioGetVoiceCategoryVolumeChangeMask with NanoSleep
- Removed Yield in XamUserGetSigninState
2026-02-08 23:01:44 +01:00
Adrian
56cff3a09a [APP] Include title information in Win32 exception dialog 2026-02-08 17:52:21 +01:00
Adrian
ef65c6761b [XAM] Cleanup user settings header to reduce including issues 2026-02-07 22:29:29 +01:00
goldislead
1a9613705d Rework max anisotropy override to sampler creation (D3D12/Vulkan)
Revert ac6fd65 fetch additions and implement context-sensitive AF override.
2026-02-07 17:47:12 +01:00
Margen67
60ffc2e83f [CI] Remove unneeded python-setup
The default Python version was updated so this is no longer necessary: https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md#language-and-runtime
2026-02-02 00:23:18 -08:00
Gliniak
4dd0842087 [Kernel] Fixed incorrect amount of propagated notifications on boot
- Created dedicated method: IsUIActive
2026-01-31 19:24:10 +01:00
Gliniak
7e1506ff23 [Kernel] XThread: Added mutex to set_name.
There is a small chance that game will spam requests for thread name change which will cause invalid free
2026-01-31 18:32:52 +01:00
The-Little-Wolf
78d700af41 [XAM/USER] - Add missing broadcast to XamUserWriteProfileSettings
-  Add missing broadcast to XamUserWriteProfileSettings
2026-01-30 19:06:47 +01:00
The-Little-Wolf
a8fe4666ad [XEX] - log outputs
- Finish XEX_HEADER_XBOX360_LOGO, XEX_HEADER_FILE_FORMAT_INFO, XEX_HEADER_DELTA_PATCH_DESCRIPTOR, XEX_HEADER_SYSTEM_FLAGS_32, XEX_HEADER_ENABLED_FOR_CALLCAP, and XEX_HEADER_GAME_RATINGS
- Add missing xex2_header_keys
- Add flag name outputs
- Removed magic number
- Added X_FILE_CHARACTERISTICS to X_FILE_FS_DEVICE_INFORMATION
2026-01-30 18:45:04 +01:00
The-Little-Wolf
38ccc71afa [XboxKrnl/Threading] - implement KeInitializeTimerEx
- Taken from Crispy's Nukernel build
2026-01-29 23:05:23 +01:00
Roy Stewart
e3c4b5aef5 refactor xenia-build printing functionality and add color to the outputs 2026-01-29 22:38:43 +01:00
Gliniak
603355ae5b [XAM] Fixed enumeration of achievements once again 2026-01-29 21:55:30 +01:00
Gliniak
2ba82072fc [Kernel] Added stub for: NtCancelIoFile 2026-01-29 20:41:01 +01:00
Stayd
ac6fd65385 [GPU] Add anisotropic filtering override 2026-01-28 08:28:53 +01:00
Gliniak
a74fe21f76 [CPU] Disable context promotion only for vertex type 2026-01-28 07:49:39 +01:00
Gliniak
67d80958c9 [XThread] Remove 10ms delay in thread start 2026-01-25 19:41:57 +01:00
Triang3l
c7f61342d7 [GPU/D3D12] Convert gamma-as-linear red to gamma in transfers to stencil
Co-authored-by: Herman S. <429230+has207@users.noreply.github.com>
2026-01-20 12:53:20 +03:00
Adrian
263e91b014 [XAM] Fixed XamUserCreateAchievementEnumerator starting index usage
Fixed Vancouver 2010 spamming XamUserCreateAchievementEnumerator
2026-01-20 08:30:25 +01:00
Triang3l
0a19234b4e [GPU/D3D12] Add forgotten gamma conversion format check 2026-01-19 21:08:15 +03:00
Triang3l
cec9ca0ef2 [GPU] 8-bit PWL gamma RT as linear 16-bit UNorm on the host
With render target HLE, directly store linear values as R16G16B16A16_UNORM
without gamma conversion, as this format provides more than enough bits
(need at least 11 per component due to the maximum scale being 2^3 in the
piecewise linear gamma curve) to represent linear values without precision
loss.

This makes blending work correctly in linear space, improving quality of
transparency, lighting passes, and fixing issues such as transparent parts
of impact and footstep decals in 4D5307E6 being bright instead.

The new behavior is enabled by default, as it hugely improves the accuracy
of emulation of this format, that is pretty commonplace in Xbox 360 games,
with likely just a small GPU memory and bandwidth usage increase, compared
to the alternatives that were previously available on the HLE RB path.

It's currently implemented only on Direct3D 12, as most of the current GPU
emulation code is planned to be phased out and redone, and no methods other
than 8-bit with pre-conversion were implemented on Vulkan previously.

To implement on Vulkan later, same conversion as in the Direct3D 12
implementation will need to be done in ownership transfer and resolve
shaders. Currently it's somewhat inconvenient to decouple the conversion
functions in `SpirvShaderTranslator` from an instance of the translator due
to vector constant usage. Later, simpler SPIR-V generation functions may be
added (`spv::Builder` usage in general is overly verbose).

The previously default method (8-bit storage with pre-conversion in shaders
and incorrect blending) can be re-enabled by setting the
"gamma_render_target_as_unorm16" configuration option to `false`. This may
be useful if the game, for instance, switches between 8_8_8_8_GAMMA and
8_8_8_8 formats for the same data frequently, as switching will result in
EDRAM range ownership transfer data copying now. Also, the old path is
preserved for Vulkan devices not supporting R16G16B16A16_UNORM with
blending.

The other workaround that was available previously, replacing the PWL
encoding with host hardware sRGB with linear-space blending in render
target management and in texture fetching, was also inherently inaccurate
in many ways (especially when games have their own PWL encoding math, like
4541080F that displayed incorrect colors on the loading screen), and
required tracking of the encoding needed for ranges in the memory.

The sRGB workaround therefore was deleted in this commit, greatly
simplifying the code in the parts of render target, texture and memory
management and shader generation that were involved in it.
2026-01-18 16:22:22 +03:00
Triang3l
f2fabfdf04 [GPU] Change "bpe" to "bpb" (bytes per block) in comments
Forgotten in the other "element" to "block" change.
2026-01-15 20:48:26 +03:00
Triang3l
88f95a8bd6 [GPU] Change "element" name back to "block" in texture addressing
The 32_32_32_FLOAT format seems to be vertex-only, so it looks like there
can't be storage elements smaller than a single texel.

So, use a more precise name that can't be confused with "picture element"
(pixel) or "texture element" (texel) that represents a single logical pixel
rather than a storage block of pixels.
2026-01-15 11:56:45 +03:00
Triang3l
c4e1242fa2 [D3D12] Include recent D3D12 headers from the Microsoft GitHub 2026-01-14 23:05:08 +03:00
Triang3l
9535e610b0 [GPU] Change texture address local X offsetting back to addition
More likely to be emitted as an immediate load/store offset in host
hardware shaders.
2026-01-14 00:15:08 +03:00
Triang3l
6db6192170 [GPU] Use XOR to flip X texel group in all load/resolve shaders
For visual consistency (missed in the commit that added LocalXAddressXor).
2026-01-13 23:37:01 +03:00
Triang3l
7db772bfeb [GPU] XeResolveLocalXAddressXor comment typo correction 2026-01-13 23:22:30 +03:00