Commit Graph

34 Commits

Author SHA1 Message Date
bomabomabomaboma
73945c06d7 [GPU] Simplify ZPD cvars 2026-06-02 20:09:50 +02:00
bomabomabomaboma
fbd620c22b [GPU] Implement ZPD occlusion queries
Implements EVENT_WRITE_ZPD handling across shared CommandProcessor, D3D12, and Vulkan backends.

This adds a shared report lifecycle. Reports can span submissions/render passes, split into multiple segments, and asynchronously retire. Reports can also survive same-slot reuse, which is critical for titles that aggressively recycle against a small pool.

RTV/FBO use their respective host occlusion queries, whereas ROV/FSI use counter buffers instead, with shader helpers that are called from the translated PS, accumulating surviving MSAA sample coverage into active slots. Regardless of approach, results are copied to small, dedicated readbacks and fed through shared retirement.

Fast mode writes speculative values and patches in resolved results later. Strict mode waits for real results with a small retire backstop so it doesn't spin forever when a report gets weird. Fake mode's fundamentals are unchanged, it just now uses XenosZPDReport memory helpers like all the modes do.

Also adds optional sample count saturation for instances when attenuation isn't a one-for-one with real hardware, an optional alternate fast behavior that preserves cached zeroes (that can improve flare-heavy titles but might regress occlusion culling), and normalization for upscaling.

QueryBatch is still unsupported other than a fake path that's enabled when a range is set via cvar.
2026-05-30 19:26:25 +02:00
oreyg
02a2591295 [Vulkan] Port ac6_ground_fix vertex-fetch nudge to SPIR-V 2026-05-15 08:31:10 +02:00
bomabomabomaboma
08c0cf5ad0 [GPU] Improved fake ZPD for QueryBatch titles 2026-05-02 18:00:21 +02:00
goldislead
9c00ce9366 [GPU] EVENT_WRITE_ZPD batched sample accumulation cvar 2026-04-04 19:29:52 +02:00
Herman S.
5845f3437b [GPU] Async shader compilation for D3D12 and Vulkan
Adds async_shader_compilation cvar (default true) that forces new
pipelines to be created async from the main thread, skips draws entirely
on D3D12 and on vulkan replaces pixel shader with placeholder until the
real one is ready. Causes some visual artifacts on first load but
greatly reduces load times and stutter.
2026-03-10 00:24:26 +09:00
Herman S.
e7941b0c7d [GPU] 3d-to-2d textures default enable
Replaced the modal cvar with bool gpu_3d_to_2d_texture with "mode 2" now enabled by
default and "mode 1" removed as unnecessary
2026-02-26 14:22:46 +09:00
Herman S.
90c48e1d21 [GPU] 3d-to-d2 texture implementation
Adds vulkan version of mode 1 and 2 and fixes related crashes by keeping
the 2d texture views from the texture cache.
2026-02-26 14:22:46 +09:00
Herman S.
ef505fbe3d [Vulkan] add no_discard_stencil_in_transfer_pipelines support 2026-02-17 17:54:01 +09: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
Stayd
ac6fd65385 [GPU] Add anisotropic filtering override 2026-01-28 08:28:53 +01:00
Gliniak
78e753ef52 [GPU] Added config option to enable/disable invalid memory uploads 2025-12-02 22:34:39 +01:00
Gliniak
b447699a5b [GPU] Occlusion query faking extension 2025-05-17 16:00:41 +02: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
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
b115823735 Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2024-05-10 08:59:17 +02:00
Triang3l
a90f83d44c [Vulkan] Non-seamless cube map filtering 2024-05-05 15:20:23 +03:00
Mateusz Dukat
34ed823bfc [GPU] Change FPS limit strategy 2024-03-14 20:58:40 +01:00
disjtqz
d36b1b3830 [GPU] gpu_allow_invalid_fetch_constants true by default 2023-10-12 23:03:14 +02:00
disjtqz
294b968fdf remove vsync_interval; replace with vsync_fps. 2023-09-29 20:17:11 +02:00
Margen67
64b336805e Add vsync_interval option 2022-05-19 10:22:32 +02:00
Triang3l
e720e0a540 [Code] Remove game names from code comments (most of at least) 2021-09-05 21:27:40 +03:00
Triang3l
913e1e949c [GPU] Ownership-transfer-based RT cache, 3x3 resolution scaling
The ROV path is also disabled by default because of lower performance
2021-04-26 22:12:09 +03:00
Triang3l
c7fbe0e6d5 [GPU] Scale gradients by SSAA factor 2020-12-20 16:35:15 +03:00
Triang3l
9a4643d0f2 [GPU] Non-ROV f24 trunc/round, host shader modifications, cache dir 2020-12-07 22:31:46 +03:00
Triang3l
bd5f77bc3b [GPU] Common resolve code based on compute shaders, swap MSAA samples 1 and 2, change ROV write rounding, random refactoring 2020-08-09 21:33:10 +03:00
Joel Linn
68dd818029 [GPU] Add workaround for occlusion queries. 2020-06-01 22:40:55 -05:00
gibbed
5bf0b34445 C++17ification.
C++17ification!

- Filesystem interaction now uses std::filesystem::path.
- Usage of const char*, std::string have been changed to
  std::string_view where appropriate.
- Usage of printf-style functions changed to use fmt.
2020-04-07 16:09:41 -05:00
Triang3l
cde092ece1 [D3D12] Persistent shader and PSO storage 2020-03-21 19:22:19 +03:00
Triang3l
710d225d0a [GPU] --gpu_allow_invalid_fetch_constants to bypass invalid fetch constant type errors 2020-02-16 19:35:26 +03:00
Jonathan Goyvaerts
c1af632562 Replace all gflag implementations with cvar implementations 2019-08-03 02:34:07 +02:00
Ben Vanik
f26bea88d9 Replacing zlib with snappy in traces, adding trace header, docs. 2015-12-30 22:58:22 -08:00
Ben Vanik
5834a42ef3 Dependency injection for apu/gpu/hid. 2015-11-08 15:02:24 -08:00
Ben Vanik
8c69a4df09 Cleaning up apu/ and renaming -private files to _flags.
Part of #296.
2015-06-27 11:25:56 -07:00