Herman S.
16d2cc05c5
[GPU] Use UNorm not signed EDRAM encoding in k_16_16 resolve packing.
...
The original commit (2eea146b ) correctly added kXenosFormat_16_16_EDRAM
case labels and fixed the unpack clamp from -1.0 to -32.0, but
incorrectly changed the resolve pack functions from UNorm to signed EDRAM
encoding. The resolve destination is a regular texture sampled as UNorm
[0,1], not EDRAM. Using EDRAM packing double-encodes the [-32,32]
scaling, crushing all values by ~64x and caused visual issues
particularly in UE3 titles.
The bytecode submitted with the change was actually correct, but the
source had additional incorrect pieces that only manifested when shaders
were rebuilt.
2026-03-05 15:11:22 +09:00
Herman S.
4bd93883ac
[Build] Convert buildshaders to custom build rules
2026-03-04 20:57:42 +09:00
Herman S.
71c5702ee8
[Build] Convert build system to raw cmake and remove premake layer
2026-03-04 17:37:36 +09:00
Herman S.
dbfe216754
[Vulkan] Implement extended range for f32 to f16 conversion in memexport
2026-03-03 17:16:37 +09:00
Ylederman153
02c6bc6e61
[D3D12] Implement extended range for f32 to f16 conversion in memexport ( #899 )
...
Resolves TODO(Triang3l) by implementing a mathematical workaround to allow exponent 31 for extended float16 range up to +/-131008.0f as expected by the native Xbox 360 hardware, bypassing standard D3D12 f32tof16 boundaries which incorrectly clamp/inf values.
2026-03-03 17:16:05 +09:00
Herman S.
f2ac39cfd9
[Build] Generate shaders on build instead of having them checked in
2026-03-03 16:21:30 +09:00
Ylederman153
2eea146b1b
[GPU] Fix k_16_16 and k_16_16_16_16 EDRAM packing clamping ( #898 )
...
Replaces the UNorm packing functions with custom Edram functions to preserve the native [-32.0, 32.0] float range and scale mathematically instead of using saturate(). Fixes displaced water meshes in games like Mercenaries 2.
2026-03-03 14:27:04 +09:00
Herman S.
48111e8fba
[D3D12] Fix device lost with resolution scaling in 3D-as-2D textures
2026-03-01 16:41:50 +09:00
Herman S.
125b4c8c05
[GPU] Ensure force_special_view checks swizzle signs before using signed
...
This was causing unnecessary logspam in Blue Dragon due to
incorrectly trying to request signed when the fetch constants are
unsigned
2026-02-26 14:36:08 +09:00
Herman S.
0c8d1b763f
[D3D12] Pre-create 3D-as-2D textures before draw setup
2026-02-26 14:22:46 +09:00
Herman S.
0e2967cdb0
[D3D12] Fix 3D-to-2D texture crash under Wine/VKD3D
2026-02-26 14:22:46 +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.
7c9b5af236
[D3D12] add cvar to control 3d-to-2d texture mode
2026-02-26 14:22:46 +09:00
Raffaele
fc5ab60a88
[D3D12] Fix 4D5307DF fur textures
...
- Fixes issue https://github.com/xenia-canary/game-compatibility/issues/6
- Implements a load texture logic
2026-02-26 14:22:46 +09:00
Raffaele
26824edcfa
[D3D12] Fix 4D5307DF fur textures
...
- Fixes issue https://github.com/xenia-canary/game-compatibility/issues/6
- Implements a copy texture logic
2026-02-26 14:22:46 +09:00
Herman S.
9c37af4621
[Vulkan] Add proper tracking to swap gamma correction render pass
2026-02-25 12:31:18 +09:00
Herman S.
6de637b794
[Vulkan] Smear scalar bools.
...
Addresses some shader validation warnings
2026-02-25 12:31:18 +09:00
Herman S.
74ce1c812f
[Vulkan] Fix VUID-FragDepth-FragDepth-04216 validation issue
2026-02-25 12:31:18 +09:00
Herman S.
77852914ff
[GPU] TextureCache lockless pre-check
...
lockless accessors for base_outdated/mips_outdated and skip lock
acquisition when textures appear up to date
2026-02-25 12:31:18 +09:00
Herman S.
067641668f
[GPU] Fix min/max blend operations to properly apply factors
...
Applies factors before the MIN/MAX operation - in FSI/ROV via runtime
blending, in FBO/RTV by pre-multiplying shader output when dstFactor is
ONE only, as we don't have access to dest to provide full support as we
do in the FSI/ROV paths.
2026-02-25 09:39:03 +09:00
Herman S.
966d8f0925
[Vulkan] fix FBO path reading from output variables for alpha test
...
Makes FBO follow the same pattern as FSI by using function scoped
intermediate variables
2026-02-25 09:38:58 +09:00
Herman S.
2d7ca4fb39
[GPU] Remove log spam for empty region resolve issues.
...
Affects Forza Horizon 1 and 2, does not seem to be related to any
actual rendering issues but makes it very difficult to debug real
problems.
2026-02-25 09:11:03 +09:00
Herman S.
1e23aaf4fc
Improve error handling in graphics memory init
2026-02-25 09:10:48 +09:00
Herman S.
83d776fa39
[Vulkan] Add tesselation support
...
Pretty much just following the D3D12 implementation
2026-02-18 00:02:21 +09:00
Herman S.
3e3aee1ef2
[App] Update title to show apu and remove vulkan incomplete warning
2026-02-17 23:50:40 +09:00
Herman S.
48c13be2d5
[Vulkan] Add gamma_render_target_as_srgb support
2026-02-17 23:35:59 +09:00
Herman S.
5d74d69aa8
[Vulkan] Alpha to coverage FSI implementation
2026-02-17 22:46:18 +09:00
Herman S.
792e61f6e2
[Vulkan] Alpha to coverage improvements
...
Refactor redundant code, fix 2x MSAA sample mapping and
only declare gl_FragCoord when alpha to coverage can run
2026-02-17 22:46:14 +09:00
Herman S.
cba315cf38
[Vulkan] Implement alpha to coverage (FBO)
...
Fixes the foliage rendering in places like Red Dead Redemption menu
2026-02-17 22:43:27 +09:00
Herman S.
75589de0a4
[Vulkan] Ensure descriptor sets always initialized for user_clip_planes
2026-02-17 22:18:21 +09:00
Herman S.
f13ee6ec38
[Vulkan] Add support for user clip planes
2026-02-17 22:18:02 +09:00
Herman S.
0b7abf0241
[Vulkan] Add resolution scaling mips support
2026-02-17 21:46:50 +09:00
Herman S.
cd7b47235d
[GPU] Properly handle scaled textures and weights
...
Fix d3d12 logic wrt scaling weights, add vulkan impelementation for using
scaled texture offsets and fix resolution-scaled texture detection
2026-02-17 21:44:18 +09:00
Herman S.
55f0333182
[Vulkan] Fix incorrect scaling EDRAM tile span parameters
...
These parameters are EDRAM tile coordinates in guest space and shouldn't
be scaled. Fixes visual issues in certain games when upscaling.
2026-02-17 21:43:05 +09:00
Herman S.
5897de3eaf
[Vulkan] Implement tiled_shared_memory for resolution scaling
...
Adds support for >3x resolution scaling to vulkan by implementing
sparse scaled resolve similar to the d3d12 implementation.
2026-02-17 21:31:25 +09:00
Herman S.
a092551735
[Vulkan/D3D12] Validate upload range bounds before vastcpy
...
The D3D12 backend's existing check only validated the last page of the
range. The Vulkan backend had no check at all and did not respect the
gpu_allow_invalid_upload_range cvar. Both now verify start and
end pages are mapped before copying, preventing access violations when
games reference unmapped guest physical memory during transitions.
2026-02-17 21:22:48 +09:00
Herman S.
3e1b0c715a
[Vulkan] Vertex buffer residency caching
...
Cache vertex buffer address/size per fetch constant, invalidate on fetch
constant write, reset at frame boundaries
2026-02-17 21:22:00 +09:00
Herman S.
2ad412a141
[Vulkan] Add support for vkPipelineCache
2026-02-17 21:21:56 +09:00
Herman S.
6057b0a7c7
[Vulkan] Implement ClearCache to clear upload_buffer_pool
2026-02-17 21:10:38 +09:00
Herman S.
4d15f0afea
[Vulkan] Implement same vastcpy upload_buffer optimization as d3d12
2026-02-17 21:10:13 +09:00
Herman S.
ef505fbe3d
[Vulkan] add no_discard_stencil_in_transfer_pipelines support
2026-02-17 17:54:01 +09:00
Herman S.
24f90c0efc
[Vulkan] Fix stencil bit transfer shaders not discarding pixels
...
"packed" was never set because source_depth_texture isn't created for
stencil bit output. This caused the discard logic to be skipped
resulting in stencil being incorrectly incremented on every transfer
draw until it saturated at 0xFF.
Fixes many remaining Vulkan rendering issues, e.g. Brothers, Orange Box,
Arkham Origins, many others.
2026-02-17 17:44:23 +09:00
Herman S.
878de4c352
[Vulkan] Fix sampler params
2026-02-17 17:44:08 +09:00
Herman S.
dc66d67a31
[Vulkan] Use VK_FORMAT_A2B10G10R10 for xenos::ColorRenderTargetFormat::k_2_10_10_10
...
Aligns with D3D12's DXGI_FORMAT_R10G10B10A2_UNORM
2026-02-17 17:43:55 +09:00
Herman S.
1a4b78e377
[Vulkan] Invalidate descriptor set bindings for incompatible sets
...
The code to do this was set up but it seems it was never implemented.
2026-02-17 17:43:45 +09:00
Herman S.
a716dc6fac
[Vulkan] Fix kComputeWrite access mask
...
Access mask was incorrectly set to VK_ACCESS_SHADER_READ_BIT
2026-02-17 17:41:21 +09:00
Herman S.
5be503da77
[Vulkan] Don't try to create geometry shader for rectangle list
2026-02-17 17:40:59 +09:00
Herman S.
ec5816a278
[Vulkan] Use vertex_fetch_bitmap instead of vertex_bindings()
...
Avoids using cached/stale vertex binding indices
2026-02-17 17:40:26 +09:00
Herman S.
434644c301
Merge commit 'f2fabfdf0' into canary_experimental
...
Sync changes from master up to before the recent GPU changes, those will be
merged later
2026-02-17 16:59:38 +09:00