Henrik Rydgård
4a420c95c2
Remove some redundant device caps, show clip/cull/depth-clamp in system info
2026-05-21 11:59:26 +02:00
Henrik Rydgård
736d054b8f
Remove the u_proj_though matrix from the uniform buffer
2026-05-19 16:33:45 +02:00
Henrik Rydgård
65c99beea7
Remove some old debris
2026-05-19 15:43:25 +02:00
Henrik Rydgård
e108828bcc
Unify Z handling between the backends
2026-05-19 15:17:44 +02:00
Henrik Rydgård
d243737c11
Revert "Convert the pre-rotation to just the matrix multiplication."
...
After the previous commit, the optimization is no longer needed, and
unnecessarily bloats the uniform buffer.
This reverts commit 62bcb1785e809649ba88b49e24c5217f457fa040.
2026-05-17 11:02:35 +02:00
Henrik Rydgård
4b93a870db
Optimize out pre-rotation entirely from vertex shaders when not needed
2026-05-17 11:01:50 +02:00
Henrik Rydgård
947217d1be
Convert the pre-rotation to just the matrix multiplication.
2026-05-17 10:59:40 +02:00
Henrik Rydgård
065a68ef4f
Split out screen rotation from the projection matrix
2026-05-17 10:58:54 +02:00
Henrik Rydgård
afb764e6ae
Rendering: Unify the Y-flipping state across backends (now only applied in-shader, not through matrices).
2026-05-14 23:30:06 +02:00
Henrik Rydgård
85de7fdc50
Add new flag that will simplify the GL path
2026-05-14 22:20:35 +02:00
Henrik Rydgård
27650fe3e4
Fix race condition during Vulkan startup
2026-05-13 23:09:04 +02:00
Henrik Rydgård
28166cb35d
Add "allocation slack" to our pushbuffers. Fixes a memory overwrite bug
...
Reported by Joseph on Discord.
Sometimes, things could align perfectly so allocations happend exactly
at the end of a pushbuffer. At the same time, we allow our vertex decoder to write an extra few
bytes if it needs to for speed. Unfortunately I missed this interaction,
resulting in some uncommon crashes that were especially common with
heavy-geometry things like modified GTA LCS with PS2 assets, for
example.
The problem was reported with Vulkan, but our OpenGL backend had the
same issue too.
2026-05-13 15:55:34 +02:00
Henrik Rydgård and GitHub
ebc647bd06
Merge pull request #21648 from sum2012/softgpu-patch
...
Remove 2 cases for fast path for soft gpu by Deepseek
2026-05-12 10:45:38 +02:00
Henrik Rydgård
e0d6664e85
Fix issue with raw screenshots not always being cropped correctly
...
Fixes #21664
2026-05-12 10:12:41 +02:00
sum2012
5954db188e
Remove 2 cases for fast path for soft gpu by Deekseek
...
Fix #21363
https://chat.deepseek.com/share/980xe4c2ue35te8cy2
Performance impact is minimal because sprites that require depth/fog are relatively rare, and the fallback still uses the per-pixel rectangle loop (not the full triangle rasterizer)
2026-05-07 00:26:06 +08:00
Henrik Rydgård
84c1755abe
Cleanup in TextureCacheCommon
2026-04-28 16:27:56 +02:00
Herman Semenoff and Henrik Rydgård
8f4fb77f79
gameinfocache: fbmanager: use const ref and modernize to for range C++17
...
From #21606
2026-04-28 10:54:55 +02:00
Herman Semenoff and Henrik Rydgård
5e2f51af8e
gpu: elf: using reserve() for optimize inserts in for loop
...
From #21611
2026-04-28 10:53:32 +02:00
Herman Semenoff and Henrik Rydgård
1e2e04b9d2
shadermanagervk: fix possible typo in Clear() function
...
After set_invalid(), shader pointers are not nulled as in DirtyLastShader()
2026-04-28 10:45:45 +02:00
Lin Runze
d1bf797e1b
loongarch: Fix Jit_WeightsU16Skin in VertexDecoderLoongArch64.cpp
2026-04-25 16:33:06 +08:00
Henrik Rydgård
d108fe25d1
Rework constant buffer loading, barrier fix
2026-04-23 13:32:06 +02:00
Henrik Rydgård
4c2be7f8af
More work. Some initialization order problem.
2026-04-23 13:31:51 +02:00
Henrik Rydgård
4335a327cd
Hackery to prepare for constant buffers in compute
2026-04-23 13:31:51 +02:00
Henrik Rydgård
799827e9fb
Revert "Remove unnecessary bindings from compute shader descriptor layout"
...
This reverts commit 090efb9513 .
2026-04-23 11:19:57 +02:00
Henrik Rydgård
090efb9513
Remove unnecessary bindings from compute shader descriptor layout
2026-04-13 10:04:02 -06:00
Henrik Rydgård and GitHub
8d99c71c12
Merge pull request #21527 from ZironZ/pr/gpu-texture-scaling-nnedi3-spline36-clean
...
NNEDI3 and Spline36 GPU texture scaling
2026-04-09 13:24:19 -06:00
Henrik Rydgård
6919d8a764
ImGeDebugger: In the textures window, properly write out the status flags.
2026-04-07 11:39:16 -06:00
Henrik Rydgård
7f53eeff08
Fix deferred texture scaling when GPU texture scaling is used. This partially broke GPU texture scaling partially on many mobile devices.
2026-04-07 11:36:59 -06:00
ZironZ
62bea77bd0
Add Vulkan multipass texture scaler infrastructure
2026-04-07 13:29:15 -04:00
Henrik Rydgård
0b154ca6ef
Depth raster: Handle triangles with culling disabled properly.
2026-03-31 18:17:01 -06:00
Henrik Rydgård
10b6c14a9e
Avoid memory access functions that can cause memory exceptions in ImDebugger. Minor opt.
2026-03-31 17:53:00 -06:00
Henrik Rydgård and GitHub
df5ad56546
Merge pull request #21324 from hrydgard/silent-hill-shadows
...
WIP: Apply changes by fcrwr, fixing (mostly) shadows in Silent Hill: Shattered memories
2026-03-18 09:06:55 +01:00
Henrik Rydgård and GitHub
30c717cb4a
Merge pull request #21386 from chealy/gpu-shader-optimizations
...
GPU: Shader optimizations using inversesqrt and dead code removal
2026-03-17 22:31:06 +01:00
Henrik Rydgård and GitHub
c1f8421dc2
Merge pull request #21342 from fcrwr/block-transfer-clipping
...
Fix block transfer clipping
2026-03-17 22:28:04 +01:00
Henrik Rydgård
75453632f9
Handle inset adjustements on the C++ side, handle them better in the UI.
2026-03-14 18:13:37 +01:00
Henrik Rydgård
b4646a49d5
Blacklist the "MMPX Advanced" texture upscaler on mobile GPUs.
2026-03-13 09:04:27 +01:00
Chris Healy and cphealy
6dae3327a6
GPU: Remove dead helper functions from fragment shader
...
Remove two unused helper functions that were left behind after refactoring:
1. unpackUVec3: Left over from commit 4329aaa31c ("GPU: Apply color
test mask as a uint") which refactored color test to use
roundAndScaleTo8x4 with direct uint comparison instead of unpacking
to uvec3 components.
2. packFloatsTo8x4: Left over from commit aec22491fe ("Don't expand
alphaColorRef to 128 bytes") which changed u_alphacolorref from vec4
to uint, making the float-to-uint packing function unnecessary.
Both functions were defined but never called, wasting shader compilation
time and binary size for shaders that enable color testing.
Signed-off-by: Chris Healy <cphealy@gmail.com >
2026-03-08 19:13:41 -07:00
Chris Healy and cphealy
9ed5dcdc27
GPU: Use inversesqrt for light distance and half-vector calculations
...
Replace length()/normalize() with inversesqrt() pattern for better
performance on mobile GPUs. The inversesqrt instruction is a single
hardware operation, while length() requires sqrt(dot()) and normalize()
requires inversesqrt internally plus a multiply.
Changes:
1. Light distance calculation:
Before: distance = length(toLight); toLight /= distance;
After: distSq = dot(toLight, toLight);
invDist = inversesqrt(distSq);
distance = distSq * invDist;
toLight *= invDist;
2. Specular half-vector normalization:
Before: ldot = dot(normalize(toLight + vec3(0,0,1)), worldnormal);
After: halfVec = toLight + vec3(0,0,1);
halfInvLen = inversesqrt(dot(halfVec, halfVec));
ldot = dot(halfVec, worldnormal) * halfInvLen;
Also reuses distSq in attenuation calculation to avoid recomputing
distance*distance.
Offline shader compiler results (vertex shader with 4-light ubershader):
Mali (malioc):
G31 (Bifrost): 44.90 -> 40.50 cycles (-9.8%)
G52 (Bifrost): 14.97 -> 13.50 cycles (-9.8%)
G310 (Valhall): 13.88 -> 12.88 cycles (-7.2%)
G57 (Valhall): 7.60 -> 6.97 cycles (-8.3%)
PowerVR (Profiling Compilers):
Series 8 GE8300: 322 -> 302 ALU cycles (-6.2%)
Series 9 GM9445: 296 -> 280 ALU cycles (-5.4%)
Series B BXM: 560 -> 540 instructions (-3.6%)
Signed-off-by: Chris Healy <cphealy@gmail.com >
2026-03-08 19:13:41 -07:00
Henrik Rydgård and GitHub
5a27f20387
Merge pull request #21380 from hrydgard/last-fixes
...
iOS: Try to avoid leaking file sandbox bookmarks, avoid trying to install zips where it's not possible
2026-03-08 13:46:25 +01:00
Henrik Rydgård
0a1be41fa7
Additional fixes to ZipFileLoader
2026-03-08 12:33:46 +01:00
Henrik Rydgård
ffd21dba00
Quick workaround for Gripshift.
...
Fixes #21367
2026-03-07 18:59:03 +01:00
ChrisF and GitHub
ca8736fc6a
Adds one more image size (128x128) option for DXT1 block skipping in texture replacement
2026-03-06 14:07:03 -05:00
fcrwr
cc4bf75717
Fix block transfer clipping
...
Fix block transfer clipping that happened due to code not taking block
transfer offsets into account when finding framebuffers for block
transfer and when creating ram framebuffer.
2026-03-04 19:46:28 +05:00
fcrwr and Henrik Rydgård
f3c98442d5
Apply changes by fcrwr, fixing (mostly) shadows in Silent Hill: Shattered Memories
...
The game actually implements proper shadow mapping using some wicked
trickery, including framebuffer color reinterpretation. This finally
gets it working, by filling in some gaps in the existing mechanisms.
Unfortunately there's some precision issue that needs to be looked at,
as it can currently look quite stripy, very typical of shadow mapping.
2026-03-02 19:23:43 +01:00
Henrik Rydgård
5e6ec70280
Minor stuff
2026-03-01 12:09:43 +01:00
Henrik Rydgård
845f9f3d55
Add missing check to Vulkan init. Disable validation on android-x86-64
...
The latter is broken in the Android SDK emulator.
2026-02-27 23:57:50 +01:00
Henrik Rydgård
bae1a7c7f9
Add "FastEmulatedGPU" compat flag. For games like Outrun that have intermittent slowdowns on hardware, it's unnecessary under emulation.
2026-02-26 10:44:16 +01:00
Henrik Rydgård
5dc169ecbe
Fix more race conditions if you exit during game bootup
2026-02-24 00:56:45 +01:00
Henrik Rydgård
202259eb09
Add a quick workaround for Mahjongg Artifacts framebuffer expiration.
...
Fixes #15828 , well at least except for savestate support.
2026-02-22 23:42:13 +01:00
Henrik Rydgård
5aeb38412d
Fix another valgrind warning
2026-02-19 11:46:14 +01:00