Commit Graph

2335 Commits

Author SHA1 Message Date
Adrian a9fb32a2fd [GPU] More post merge fixes 2025-08-15 22:38:56 +02:00
Gliniak 419c0149c9 [Base] Post merge fixes 2025-08-15 18:06:57 +02:00
Gliniak c4bd676c5e Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2025-08-15 15:37:50 +02:00
Triang3l b5432ab83f [Vulkan] Refactoring and fixes for VulkanProvider and related areas
Enable portability subset physical device enumeration.

Don't use Vulkan 1.1+ logical devices on Vulkan 1.0 instances due to the
VkApplicationInfo::apiVersion specification.

Make sure all extension dependencies are enabled when creating a device.

Prefer exposing feature support over extension support via the device
interface to avoid causing confusion with regard to promoted extensions
(especially those that required some features as extensions, but had those
features made optional when they were promoted).

Allow creating presentation-only devices, not demanding any optional
features beyond the basic Vulkan 1.0, for use cases such as internal tools
or CPU rendering.

Require the independentBlend feature for GPU emulation as working around is
complicated, while support is almost ubiquitous.

Move the graphics system initialization fatal error message to xenia_main
after attempting to initialize all implementations, for automatic fallback
to other implementations in the future.

Log Vulkan driver info.

Improve Vulkan debug message logging, enabled by default.

Refactor code, with simplified logic for enabling extensions and layers.
2025-08-14 23:44:21 +03:00
Triang3l a06be03f1b [GPU] Cleanup definitions of some registers
VS/PS_NUM_REG is 6-bit on Adreno 200, and games aren't seen using the
bit 7 to indicate that no GPRs are used. It's not clear why Freedreno
configures it this way.

Some texture fetch fields were deprecated or moved during the development
of the Xenos, reflect that in the comments.

Add definitions of the registers configuring the conversion of vertex
positions to fixed-point. Although there isn't much that can be done with
it when emulating using PC GPU APIs, there are some places in Xenia that
wrongly (though sometimes deliberately, for results closer to the behavior
of the host GPU) assume that the conversion works like in Direct3D 10+,
however the Xenos supports only up to 4 subpixel bits rather than 8. The
effects of this difference are largely negligible, though.

Also add more detailed info about register references and differences from
other ATI/AMD GPUs for potential future contributors.
2025-08-06 13:21:19 +03:00
Margen67 10f2b5ebfc Imgui stuff 2025-08-03 19:51:32 -07:00
Gliniak 37e3fe9eb6 [D3D12] Default to RTV on Intel ARC GPUs 2025-08-03 22:26:39 +02:00
Margen67 3eef564ff8 [format] Require EOF newline 2025-07-19 14:42:21 -07:00
Margen67 4cb783bf22 Header cleanup 2025-07-19 14:42:21 -07:00
Gliniak b864149575 [Misc] Cleanup in Kernel 2025-05-31 12:00:47 +02:00
Gliniak b447699a5b [GPU] Occlusion query faking extension 2025-05-17 16:00:41 +02:00
Gliniak 3ba31d9f9a Revert "[D3D12] Changed default resource state based on GPU Validation"
This causes unexpected artifacts on 10 series Nvidia GPUs

This reverts commit 7566871220.
2025-05-04 08:57:42 +02:00
Gliniak 674870d881 [D3D12] Fixed stability issues (Graphics lost) on AMD GPUs
- This includes infamous 6000 series crashes and crashes on newer drivers for 7000 and 9000 series

Issue was caused by returning invalid (negative) address from MaxAs opcode.

Currently it is unknown if this behaviour is correct and should be checked on console, so slight graphical issues might be present
2025-04-28 23:34:17 +02:00
Gliniak 7797adf5f2 [UI] Fixed issue with freezing/crashing (BSOD) UI caused by incorrect fence 2025-04-26 11:17:27 +02:00
Gliniak 8f647c548d [D3D12] Removed GBV warning related to incorrect blend setup in specific conditions 2025-04-24 19:30:57 +02:00
Gliniak 7566871220 [D3D12] Changed default resource state based on GPU Validation
- This prevents GBV from spamming warnings
2025-04-22 19:31:31 +02:00
Xphalnos 5d5eb03127 [GPU] Adding Registers from Xenon 2025-04-17 13:18:52 +02:00
Gliniak 31d715d100 [Premake] Removed unused/unnecessary subprojects.
- Testing currently doesn't work
- VFS Dump is unused. You can use internal function for it
- Demos are only for fun
- Trace Dump & Trace Viewer (unsure, but ok)

You can re-enable them by changing values: enableTests and enableMiscSubprojects in main premake file.

In the future there should be xb command support to overwrite them
2025-04-15 09:04:16 +02:00
Gliniak 7298536d46 [HID] Added support for Xbox 360 Skylanders Portal
- This requires Zadig for installation of WinUSB driver for portal
2025-04-14 21:44:49 +02:00
Xphalnos 47f327e848 [Misc] Replaced const with constexpr where possible 2025-04-08 19:32:17 +02:00
Xphalnos 7479ccc292 [Misc] Fix Some Warnings on Clang Build with Windows + Adding constexpr 2025-03-27 17:52:18 +01:00
Xphalnos 5f918ef28d [Misc] Replaced const with constexpr where possible 2025-03-25 19:50:37 +01:00
Gliniak a45a9d8704 [UI] Resolved issues caused by ImGui uplift.
- Fixed size of default font size
- Added logic to not load nullptr texture to prevent unexpected issues
- Commited out some trace viewer UI logic for now. It should be redesigned with tables in mind
2025-03-19 22:51:04 +01:00
Gliniak 0474053931 [GPU] Improvements to GPU settings modification
- Renamed CommonGPUSetting to GPUSetting
- Removed readback_resolve and memexport from d3d12 exclusive option. In the future it will be available for Vulkan too.
- Removed unused enum class: gpu_cvar
- Removed OS specific code from emulator_window
2025-01-17 20:40:53 +01:00
Gliniak 09be7e874a [All] Fixed multiple issues during build on Linux
- Added some fixes introduced by RodoMa92 in PR198

- Lack of AVX2 extension (should be done differently in the future)
- Disable deprecated-volatile warning
- Added missing override in posix EventInfo, ImGui notification class and XContent class
- Removed not used XAudio2.h include in XMP
- Fixed missing switch-case in XObject
- Added fugly template in native_list.h
- Fixed multiple smaller issues
2025-01-10 21:41:45 +01:00
The-Little-Wolf b5d319834e [XboxKrnl/xconfig.cc] - Fixes and logging changes
- Adding more information in logs for easier debugging
- XamSetDashContext correction
- XCONFIG_USER_VIDEO_FLAGS reports widescreen when set in config by user
- XCONFIG_SECURED_AV_REGION reports proper values when set in config by user
- Added missing \n
2025-01-06 19:49:48 +01:00
Gliniak c3586bc165 [C++] Uplift version to C++20 2024-12-26 23:42:31 +01:00
Gliniak a295ec1bbd [Base] Removed useless path_to_utf8 conversion while using fmt
Default filesystem::path formatter was added to fmt around 2022
2024-12-13 19:04:31 +01:00
Gliniak 3318ab5d4c [3PP] Uplifted FMT version and adjusted messages 2024-12-12 20:28:11 +01:00
Gliniak 3ac98ebfba [Static Analysis] Resolved some issues mentioned in Alexandr-u report 2024-11-02 19:08:34 +01:00
Xphalnos c42a54ddec [3PP] Updated: Half, Xbyak, SDL2 2024-10-22 22:16:26 +02:00
Margen67 8af296a200 [GPU] Custom resolution
Does not work without patches.
2024-10-19 03:38:21 -07:00
Margen67 6c0f026824 [GPU] Fix internal_display_resolution condition 2024-10-18 13:05:16 -07:00
Antonio de Sousa 1fd501db01 [Emulator] Change default config value for query_occlusion_fake_sample_count 2024-09-23 12:28:10 +02:00
Gliniak 5f5be06680 [Memory] Preallocate whole physical range for GPU.
Seems like GPU has direct access to whole RAM and can request anything.

Removed check for page access as all pages are now available for gpu
2024-09-01 22:21:28 +02:00
Gliniak ed843f35f8 [GPU] Added janky(?) support for register: D1MODE_V_COUNTER
Put internal_display_resolution into graphics_system

Thanks Beeanyew for initial implementation
2024-08-31 23:37:21 +02:00
Gliniak 4452e300ac [Emulator] Changed default config values for:
- mount_cache: false -> true
 - framerate_limit: 60 -> 0
 - font_size: 12 -> 14
 - apu_max_queued_frames: 64 -> 8
2024-08-31 21:48:34 +02:00
Gliniak feb88ee6b1 [GPU] Check page access only once for specific range 2024-08-10 21:33:56 +02:00
Gliniak 1864f3d9f2 [D3D12] Redesigned page access for gpu buffer allocation 2024-08-10 20:58:53 +02:00
Gliniak 320102db34 Revert "[GPU] Reset mip levels for non-mipmapped type"
This reverts commit eeb96f91a5.
2024-08-10 18:15:16 +02:00
Radosław Gliński eeb96f91a5
[GPU] Reset mip levels for non-mipmapped type
This prevent issue where fetch is partially invalid and contains invalid mip_page and mip_level for BaseMap type
2024-07-15 22:56:53 +02:00
NicknineTheEagle c4e930ed4c Proper 4:3 support 2024-07-01 08:55:15 +02:00
Gliniak b3f2ab0e96 Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2024-05-31 22:43:59 +02:00
Triang3l 3d30b2eec3 [Vulkan] Shader memory export (#145) 2024-05-25 16:31:50 +03:00
Triang3l 210ac4b2d2 [GPU] Fix gamma ramp writing after RegisterFile API change (#2262) 2024-05-18 23:53:09 +03:00
Triang3l 8e7301f4d8 [SPIR-V] Use a helper class for most if/else branching
Simplifies emission of the blocks themselves (including inserting blocks
into the function's block list in the correct order), as well as phi after
the branching.

Also fixes 64bpp storing with blending in the fragment shader interlock
render backend implementation (had a typo that caused the high 32 bits to
overwrite the low ones).
2024-05-16 23:05:49 +03:00
Triang3l 3189a0e259 [GPU] Check memexport stream constant upper bits in range gathering 2024-05-12 20:26:14 +03:00
Triang3l a3304d252f [Base/GPU] Cleanup float comparisons and NaN and -0 in clamping
C++ relational operators are supposed to raise FE_INVALID if an argument is
NaN, use std::isless/greater[equal] instead where they were easy to locate
(though there are other places possibly, mostly min/max and clamp usage was
checked).

Also fixes a copy-paste error making the CPU shader interpreter execute
MINs as MAXs instead.
2024-05-12 19:21:37 +03:00
Triang3l 376bad5056 [GPU] Remove register reinterpret_casts + WAIT_REG_MEM volatility
Hopefully prevents some potential #1971-like situations.

WAIT_REG_MEM's implementation also allowed the compiler to load the value
only once, which caused an infinite loop with the other changes in the
commit (even in debug builds), so it's now accessed as volatile. Possibly
it would be even better to replace it with some (acquire/release?) atomic
load/store some day at least for the registers actually seen as
participating in those waits.

Also fixes the endianness being handled only on the first wait iteration in
WAIT_REG_MEM.
2024-05-12 17:28:17 +03:00
Gliniak b115823735 Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2024-05-10 08:59:17 +02:00