Henrik Rydgård
71aaad23fb
Fix issue with zero-vertex draw calls. Though, should maybe just filter them out earlier.
2023-12-10 12:21:07 +01:00
Henrik Rydgård
aca3bbc9a0
DrawEngine: Remove the confusing MaxIndex accessor, replace with directly reading numDecodedVerts_
2023-12-10 11:58:47 +01:00
Henrik Rydgård
904ce4f7e1
Quickfix regression in Outrun
2023-12-09 18:32:26 +01:00
Henrik Rydgård
7e85d3d10a
Disable the new culling on RISC-V for now.
2023-12-09 16:49:02 +01:00
Henrik Rydgård
4e2a1bf81c
NEON: vcvtq can scale directly, no need for a mul by const.
2023-12-09 16:48:59 +01:00
Henrik Rydgård
99548be8a3
NEON culling: Use mla operations to shave off some more cycles. ARM32 compat.
2023-12-09 16:36:01 +01:00
Henrik Rydgård
6a7ef83f4b
NEON-optimize the culling
2023-12-09 15:55:51 +01:00
Henrik Rydgård
5b44e25150
SSE-optimize the frustum culling
2023-12-09 15:55:51 +01:00
Henrik Rydgård
62c936babf
Flip the cull plane data around to avoid transforming each vertex multiple times.
2023-12-09 15:55:51 +01:00
Henrik Rydgård
a043962447
World space planes
2023-12-09 15:55:51 +01:00
Henrik Rydgård
dbf796bb66
Fastcull: SSE/NEON-optimize 16-bit position conversion
2023-12-09 15:55:51 +01:00
Henrik Rydgård
89d8ef87ec
Use a less accurate but faster frustum cull for the general draws.
2023-12-09 15:55:51 +01:00
Henrik Rydgård
0905b6a5ad
Frustum-cull small draws
...
Some games do a poor job of culling stuff, and some transparent
sprites can be very expensive if they cause a copy.
Skipping them if outside the viewport makes sense in that case.
One example are the flame sprites in #17797 .
Additionally, we should be able to cull through-mode draws easily, this
one doesn't even try.
2023-12-09 15:55:51 +01:00
Henrik Rydgård
8dab823936
Merge pull request #18484 from hrydgard/mlb-fix
...
Fix frozen pitch meters in MLB series games - we were not hashing enough texture data
2023-12-07 12:12:35 +01:00
Henrik Rydgård
877324c978
Add comment about swizzling to the texture replacer hash
2023-12-07 11:01:51 +01:00
Henrik Rydgård
443a882041
Fix the size calculation when hashing small swizzled textures
2023-12-07 10:45:31 +01:00
Henrik Rydgård
36a2174ac0
Vulkan: Add indicator of swizzle mode to texture debug names
2023-12-07 10:35:04 +01:00
Henrik Rydgård
7bf8023dce
Don't do the texture size check for the built-in font texture.
...
Fixes #18483
Fixes #18479
2023-12-07 09:01:24 +01:00
Henrik Rydgård
b90b6268ec
Merge pull request #18478 from hrydgard/block-transfer-to-depth
...
Handle block transfers from RAM to depth buffers.
2023-12-06 10:12:31 +01:00
Henrik Rydgård
26a51191b3
Cleaner solution to previous commit
2023-12-06 09:54:03 +01:00
Henrik Rydgård
8588b11a6a
Rename MayIntersectFramebuffer to MayInteresectFramebufferColor
2023-12-06 09:42:44 +01:00
Henrik Rydgård
88f2657bb1
Allow block transfers from RAM to depth buffers.
...
Reuses the existing compat flag BlockTransferDepth.
I do aim to remove that compat flag in the future, it's probably not
even necessary here, it's just that general depth block transfers were
already gated on it.
Fixes #17878
2023-12-06 00:29:09 +01:00
Henrik Rydgård
e2480b9fa0
D3D9: Apply a half-pixel offset in 2D shader draws. Makes Tantalus games less broken (but still broken)
2023-12-05 14:09:14 +01:00
Henrik Rydgård
64a810f9bf
VertexDecoder: Minor optimization for CPUs not supporting SSE4.
2023-12-05 01:23:09 +01:00
Henrik Rydgård
6b8ec972fb
A couple of warning fixes (real issues though small)
2023-12-05 01:12:42 +01:00
Henrik Rydgård
5373b8c5b3
Fix double-free problem in "low-memory" texture fallback (Vulkan)
2023-12-04 19:47:20 +01:00
Henrik Rydgård
7f67a10543
Texture replacement: Prioritize ini file lines over files in the "root".
...
This reverts back to the old behavior, as mentioned in #18465
2023-12-03 00:18:39 +01:00
Henrik Rydgård
d584162e06
Merge pull request #18462 from hrydgard/framebuffer-listing-overlay
...
Framebuffer listing overlay
2023-12-02 18:51:33 +01:00
Henrik Rydgård
6d977b4a12
Remove unnecessary struct FramebufferInfo
2023-12-02 13:56:18 +01:00
Henrik Rydgård
4ef54169af
Add a compat.ini setting to allow delayed GPU readbacks, for experimentation.
2023-12-02 11:34:59 +01:00
Henrik Rydgård
b636356f36
copy: Reverse the order of the y and seq heuristics
2023-12-01 20:40:12 +01:00
Henrik Rydgård
cef17589d2
Move the oversize copy detection to a better location (less false positive)
2023-12-01 00:30:06 +01:00
Henrik Rydgård
d9365a6df1
FramebufferCopy: New framebuffer candidate sorting, similar to block transfer detection.
...
The previous attempt was simply flawed.
2023-12-01 00:10:16 +01:00
Henrik Rydgård
7920e86098
Add heuristic, fixing video flicker in Naruto UNH 2 caused by copy to wrong target.
2023-11-30 22:19:52 +01:00
Henrik Rydgård
dae758e5f4
Fix some bugs and mistakes found by Nemoumbra through static analysis
2023-11-26 13:43:11 +01:00
Henrik Rydgård
aec0606ba4
Optimize the bounding box code for more vertex formats
2023-11-26 13:40:37 +01:00
Henrik Rydgård
cb9c6dc661
Merge pull request #18418 from hrydgard/simplify-input-layout
...
thin3d/backends: Remove code that pretended that we supported multiple vertex streams
2023-11-13 12:51:09 +01:00
Henrik Rydgård
d891aaf9cd
Remove code that pretended that we supported multiple vertex streams
...
Don't really see that we'll have much use for this feature, so simplify
it away. Only single vertex stream data is now supported by the thin3d
API.
2023-11-13 01:15:28 +01:00
Henrik Rydgård
77825484a0
If available, use 16-bit texture formats for MakePixelTexture when appropriate.
...
Optimization for God of War on low-end platforms. Avoids calling a color
conversion function that's currently only SIMD-optimized on x86, so will
also benefit ARM a little bit.
2023-11-12 15:58:03 +01:00
Henrik Rydgård
49f5da370a
Simplify the logic in MakePixelTexture a bit
2023-11-12 11:19:45 +01:00
Henrik Rydgård
cc6f9a73ca
Oops, fix for previous commit. And minor optimization.
2023-11-12 01:32:02 +01:00
Henrik Rydgård
632fa1c9d6
Cache and hash data for DrawPixels.
...
We already had a cache to reuse texture objects so just
opportunistically reuse them when easy to do so.
2023-11-11 19:58:12 +01:00
Henrik Rydgård
4f2f1c4392
Tilt: Fix some edge cases leading to division by zero and similar.
2023-11-09 19:14:31 +01:00
Henrik Rydgård
48a1348352
Move a var for clarity
2023-11-01 21:30:04 -06:00
Henrik Rydgård
ee6ffac28e
Ignore triangle strips with less than 3 vertices.
...
Should fix the new issue reported in #18273
2023-11-01 21:28:37 -06:00
Henrik Rydgård
e4ea4831e9
Delete the vertex cache option from the code.
2023-10-10 15:43:43 +02:00
Henrik Rydgård
078018a943
Move the clockwise calculation out of DrawEngineCommon
2023-10-10 13:16:34 +02:00
Henrik Rydgård
82606b6eb2
Move the clockwise calculation out of the AddPrim loop
2023-10-10 13:00:57 +02:00
Henrik Rydgård
af47ad035d
Also use the new descriptor mechanism for in-game
2023-10-10 09:00:29 +02:00
Henrik Rydgård
24409f6f94
Additional check fix
2023-10-09 21:15:17 +02:00