Commit Graph

8207 Commits

Author SHA1 Message Date
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
Triang3l
0f23f05683 [GPU] Simplify local X offsetting with resolution scaling
Switch between even and odd 16-byte element sequences along X by simply
flipping a bit rather than going to a different resolution-scaled group of
pixels, by increasing the size of the group within the constraints imposed
by tiling.
2026-01-13 23:14:15 +03:00
Triang3l
76c531bff2 [GPU] Rename AddressTiled in TiledAddress in shaders
There will possibly be more `XenosTextureTiled*` functions in the future
where the word "Address" would make the names excessively long.
2026-01-13 21:20:26 +03:00
Triang3l
80a9af4277 [GPU] Add macro tile size constants to texture addressing headers 2026-01-13 21:18:25 +03:00
Gliniak
81656a9729 [XAM] Fixed issue with error code being returned for local session 2026-01-10 18:26:45 +01:00
Herman S.
4b6ac45650 [VFS/Posix] Fix Rename to properly handle guest paths
And ensure string_views aren't pointing at freed memory by saving
a reference to the result of path_to_utf8
2026-01-10 17:53:39 +01:00
Gliniak
dce4d38c0a [XAM] Fixed crash related to incorrect buffer size in UserPlaylist enum
- Replaced unk_ptr in XMP_CREATE_USER_PLAYLIST_ENUMERATOR
- Simplified logic in achievements StringBuffer
2026-01-09 09:06:14 +01:00
Adrian
4b73839bf1 [XAM] Added std::optional to SPA getters 2026-01-06 18:22:35 +01:00
Triang3l
ea8ae81bfd [GPU] Remove now-unused texture_conversion.cc/h 2026-01-06 17:59:20 +03:00
Triang3l
28b69c21be [GPU] Document tiled texture address bits
Will be useful for calculating memory extents more precisely in the future.
2026-01-06 17:47:19 +03:00
Gliniak
beb52110e3 [Memory] Use randomized values for scribble_heap instead of hardcoded one
This fixes Watchman - The End is Nigh which relay on UB on boot (OOR)

They're checking in hardcoded "game:" for '/' character.
If it doesn't exist then adds 0x7FFFFFFE to start address and start searching from that location downward
2026-01-05 20:50:12 +01:00
The-Little-Wolf
2e61df76f0 [XAM/USER] - Implement XamUserIsParentalControlled
- Implement XamUserIsParentalControlled which is used in 584807F7
- Move some structs into xam.h
2026-01-05 20:30:37 +01:00
NicknineTheEagle
ccd5c50c74 [XAM] Count empty path as exit request in XamLoaderGetLaunchData 2026-01-05 20:04:59 +01:00
Adrian
b723d6e7c2 [UI] Free image data from stbi_load 2026-01-05 19:25:18 +01:00
Gliniak
b8b33ecabf [VFS] XContent: Added support for SVOD normal layout with multiple files 2026-01-05 19:04:37 +01:00
Triang3l
cbbaae8ead [Vulkan] Recompile internal shaders with Vulkan SDK 1.4.335.0
spirv-remap was replaced with spirv-opt --canonicalize-ids, and debug
information is preserved now.
2026-01-04 17:03:37 +03:00
Triang3l
ca34a022a5 [Build] Replace spirv-remap with spirv-opt --canonicalize-ids
`spirv-remap` is not present in modern Vulkan SDK versions, it was replaced
with the `--canonicalize-ids` pass in `spirv-opt`.

Overall, canonicalization provides a significant compression improvement,
which is important considering that currently Xenia is distributed in a ZIP
archive and contains many very similar shaders.

With normal DEFLATE compression, canonicalization reduced the size of a ZIP
with `xenia.exe` from 3.54 MB to 3.45 MB in a test done before committing.

Also disable stripping of debug information from shaders, which apparently
was among what `spirv-remap` was doing with `--do-everything`, as binding
and uniform buffer member names heavily aid in debugging in RenderDoc.

Partially integrated from #2329.

Co-authored-by: Herman S. <429230+has207@users.noreply.github.com>
Co-authored-by: Gliniak <Gliniak93@gmail.com>
2026-01-04 16:53:52 +03:00
Adrian
53c0178766 [NET] Implemented XNetRandom
Fixed checkpoints in Gears of War 3
2025-12-30 23:30:53 +01:00
Herman S.
fcebdfb255 [GPU] Fix scaled resolve tracking for blocks outside write range 2025-12-27 19:02:29 +01:00
Adrian
f8fb490ef8 [APP] Disable toggle fullscreen double click while rendering dialogs 2025-12-26 21:50:41 +01:00
Gliniak
c42aeacf25 [Vulkan] Ensure entire scaled range fits within the buffer.
Fixes devices lost errors when using resolution scaling

Co-authored-by: Herman S. <429230+has207@users.noreply.github.com>
2025-12-25 14:40:33 +01:00
Adrian
594e8b8cdd [XAM] Add null terminator in UserData for WSTRING 2025-12-24 22:33:49 +01:00
Gliniak
01aec51278 [XAM] Fixed invalid xuid being returned when only online XUID is requested
- Fixes stats loading of GoW3 savefile (and maybe checkpoints)

Co-authored-by: Adrian <78108584+AdrianCassar@users.noreply.github.com>
2025-12-24 22:12:01 +01:00
Gliniak
547226fc0b [XMA] Cleanup in XmaDecoder::WriteRegister
- Replaced manual for loop with C++20 countr_zero standard call
2025-12-23 23:28:13 +01:00
Adrian
ac66db337b [XAM] Fixed size used in read_u16string_and_swap 2025-12-22 19:33:47 +01:00
Gliniak
e786d5c8c3 [XAM] Fixed potantial crash while upserting setting related to missing SPA
- Fixed OOR asssertion caused by invalid amount of characters read by from_string
2025-12-22 18:47:34 +01:00
The-Little-Wolf
169fea978a [XAM/XLIVE] - Set proper returns when offline
- Have XLive functions return their offline values.
- Have XGIUserReadStats return X_ONLINE_E_LOGON_NOT_LOGGED_ON
2025-12-22 10:31:29 +01:00
oltolm
492fa7c632 use concepts instead of SFINAE 2025-12-22 10:00:52 +01:00
oltolm
d78bc3a789 [UI]: fix ASAN errors 2025-12-18 10:15:19 +01:00
Adrian
925c59790f [XAM] Cleanup parsing gamer tile key 2025-12-18 07:45:12 +01:00
The-Little-Wolf
a89513864c [XAM/CONTENT] - Implement XamContentRegisterChangeCallback
- Implement XamContentRegisterChangeCallback
- Callback used subfunction within XContentInstall
2025-12-15 08:12:13 +01:00
Triang3l
dfa1b3fae1 [Vulkan] Clamp device API version to one Xenia was tested on
Fixes the assertion failure in the Vulkan Memory Allocator library when a
driver for a new API version is released, but VMA hasn't been updated yet.
2025-12-14 22:59:35 +03:00
Triang3l
fe1fd36137 [D3D12/Vulkan] Simplify host GPU fence management
Replace the `SubmissionTracker`s with new `GPUCompletionTimeline`s with a
more unified interface (using a base class), and without the internal logic
for queue ownership transfers since that idea was scrapped during the
development of the `Presenter`.

Also use this fence management logic for GPU emulation, though without
architectural reworks for now, just on the bottom level.

Still very messy, but can be cleaned up in further GPU command processor
and presenter reworks.
2025-12-14 21:24:38 +03:00
Herman S.
4cbcae5b64 [Vulkan] Properly scale rectangle coordinates 2025-12-10 16:17:20 +01:00
yippeeeyay
2b77c4c08a [D3D12] Simplify Intel Arc GPU checking 2025-12-07 19:09:36 +01:00
Herman S
32889f51be Use fetch_contant_word3 for exponent bias
Previously was using word4 which is LOD bias, fixes many graphic issues
with Vulkan backend
2025-12-06 22:26:40 +01:00
Gliniak
0af253e230 [XMA] Separate error status into status and set fields
It's separate bit that defines if error is present
2025-12-05 22:29:09 +01:00
Gliniak
038b11a537 [GPU] Removed nvapi
- According to reports d3d12_nvapi_use_driver_heap_priorities give no benefit
2025-12-05 21:54:06 +01:00
Adrian
f85f4c3ca1 [Kernel] Fixed Xbox Live disconnected error code 2025-12-04 21:41:37 +01:00
Adrian
1d410f0e76 [APP] Don't delete Zar extraction folder on failure if empty 2025-12-04 21:20:19 +01:00
Gliniak
90a7cc4fee [GPU] Changed default readback_resolve to none 2025-12-04 20:12:34 +01:00
Gliniak
4494e40c71 [XMA] Added multiple versions of XMA decoders
- Fake: No decoding
- Master: 1:1 from base version of Xenia
- Old: Master with improvements
- New: Completely new decoder with better stability (but not compability)

Co-authored-by: Herman S. <429230+has207@users.noreply.github.com>
2025-12-03 20:05:41 +01:00
Anton Dorozhkin
e588a772d4 [XBDM] Implement DmQueryTitleMemoryStatistics 2025-12-03 10:05:56 +01:00
Gliniak
78e753ef52 [GPU] Added config option to enable/disable invalid memory uploads 2025-12-02 22:34:39 +01:00
Gliniak
dd29365970 [APU] Switched to New XMA decoder as default
- Added codepath for "consume only" pass. This should resolve constant clicking in Source engine games.
- Added smaller performance improvements to decoder
2025-12-01 23:58:33 +01:00