Commit Graph

523 Commits

Author SHA1 Message Date
Henrik Rydgård fb521408c7 Avoid calling IsValidRange with zero length 2025-12-30 20:31:07 +01:00
Henrik Rydgård 33b87578c5 Revive old alignment utility functions, give them better names. 2025-09-03 20:48:51 +02:00
Henrik Rydgård 77e894c64d Fix more D3D11 lifecycle problems. Removed some ComPtr that got in the way 2025-08-01 18:20:44 +02:00
Henrik Rydgård 435f523997 Replacement textures: Don't spend frame time waiting for a texture to be finished
It's better to finish rendering the frame and have the texture ready for
the next one, without wasting CPU.

However, if the user set their texture load speed to "Instant", that
means they never want to see any original textures. So in that case, we
do still wait.

Fixes #20519
2025-06-13 23:31:02 +02:00
Henrik Rydgård 6cfea96e58 Remove D3D9 support, to make future changes easier 2025-06-10 15:07:16 +02:00
Henrik Rydgård bdf08c84fd Move the ImGui texture cache viewer out of core 2025-05-26 19:02:57 +02:00
Henrik Rydgård f3127346d4 Add a setting (in developer tools) to control texture replacement load speed 2025-04-22 20:57:32 +02:00
Henrik Rydgård 0f18f054ab Make the frame-time budget for uploading replacement textures take framerate into account 2025-04-22 20:19:43 +02:00
Henrik Rydgård 37e5aaa34a Vulkan: Auto Max Quality: Avoid conflict between aniso filtering and nearest filtering.
Fixes #19555
2025-04-15 11:10:36 +02:00
Henrik Rydgård 9ce9e43481 Make some uses of the erase-iter idiom safer and more consistent 2025-02-04 10:31:17 -06:00
Henrik Rydgård b097a54ee0 Don't assert when using the old Ge debugger in OpenGL 2025-01-05 09:28:34 +01:00
Henrik Rydgård 1c2f11a468 Buildfix 2024-12-19 16:57:57 +01:00
Henrik Rydgård e93c80db4e Cleaning up our SIMD header includes, using the new header 2024-12-19 16:08:48 +01:00
Henrik Rydgård df6ed8cfc9 Do some cleanup of #includes in GPU 2024-12-18 13:57:26 +01:00
Henrik Rydgård 111d0c872d Global rename of FBChannel to Aspect, also make it a class enum 2024-12-15 22:24:05 +01:00
Henrik Rydgård 638607d29a Refactor: Make GPUCommon own the framedump "recorder". 2024-12-15 12:07:44 +01:00
Henrik Rydgård 60e244291a Enable a dockspace, so you can dock windows to the sides of the screen 2024-12-12 23:01:40 +01:00
Henrik Rydgård fa3321ca0c ImDebugger: Switch "Dear Imgui" to the Docking branch, enable the feature 2024-12-12 22:50:51 +01:00
Henrik Rydgård 474e7acf54 Hook up the new (bare-bones) ImGui debug window to GPU stepping, fix stepping. 2024-12-05 00:51:59 +01:00
Henrik Rydgård 0df2a40487 Remove the "GPUInterface" base class. Not really useful, GPUCommon is pretty much the same thing. 2024-12-02 11:12:14 +01:00
Henrik Rydgård 3eef1f8738 Minor debugger update 2024-12-01 14:54:55 +01:00
Henrik Rydgård b195061a45 Add texture cache stats to ImDebugger 2024-12-01 13:57:07 +01:00
Henrik Rydgård 1f108a0e8c Remove the java-side directory listing filtering, didn't work. 2024-11-30 02:44:01 +01:00
Henrik Rydgård e4adc112ff ImDebugger: Add a basic texture browser 2024-11-29 19:30:38 +01:00
Henrik Rydgård f54d701a2e Decentralize the assert for AllocateAlignedMemory failures 2024-10-22 21:49:50 +02:00
Henrik Rydgård e01ca5b057 Logging API change (refactor) (#19324)
* Rename LogType to Log

* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.

* Mac/ARM64 buildfix

* Do the same with the hle result log macros

* Rename the log names to mixed case while at it.

* iOS buildfix

* Qt buildfix attempt, ARM32 buildfix
2024-07-14 14:42:59 +02:00
Henrik Rydgård 8ce7982d8b Increase the bad texture size threshold.
Fixes #19116
2024-05-10 13:58:03 +02:00
Henrik Rydgård 768520dd0e Separate out the checks for save vs replace textures more, fixing some issues 2024-01-23 01:07:31 +01:00
Henrik Rydgård 103d8b1019 Don't apply smart 2d texture filter to video. 2024-01-18 23:38:44 +01:00
Henrik Rydgård 09d8bc5c43 Don't override "Linear"-forced texture filtering 2024-01-11 12:56:03 +01:00
Henrik Rydgård 341fe04f4b Apply nearest filter for pixel-mapped draws 2024-01-11 12:56:03 +01:00
Herman Semenov ca94de8d4b [GPU/Common/DX9/GLES/Software] Object out of scope optimization for better codegeneration (lower level scope) 2023-12-20 12:34:34 +03:00
Henrik Rydgård a8b8e44de1 Increase texture size limit to 1024. It's actually used by FF3. 2023-12-13 22:18:54 +01:00
Henrik Rydgård 3902c85f7f Enable texture replacement filtering overrides even if file is missing 2023-12-11 20:20:35 +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 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 5373b8c5b3 Fix double-free problem in "low-memory" texture fallback (Vulkan) 2023-12-04 19:47:20 +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 69b43ab734 Extend the Test Drive color ramp smoother to detect up to 3 ramps in a texture.
Note that we also offset the lookup slightly to miss the wrap-around
points. The existing 31 scale factor instead of 32, together with that
half-texel, are enough to avoid that problem.

Fixes #18300
2023-10-03 23:30:18 +02:00
Unknown W. Brackets 3c7b05c3e8 PPGe: Use texture windows for atlas text.
This makes it software rendering, which correctly applies clamp/wrap
limits at 512x512, still has readable text.  Other textures may still be
wrong.
2023-09-10 23:54:55 -07:00
Henrik Rydgård 05d8752a64 Vulkan: Correct the calculation for max possible mip levels 2023-09-07 15:20:16 +02:00
Henrik Rydgård 0aa67e5276 Add some texture loading safety checks
I hit a spurious, non-reproducible debug assert in Archer McLean's Mercury.
Just want to rule out some bad code paths.
2023-09-06 15:38:47 +02:00
Henrik Rydgård 62c9041060 Merge pull request #18011 from hrydgard/collapse-degenerate-volume-textures
Detect the simplest Tactics Ogre case (US/EU) early
2023-08-31 08:45:11 +02:00
Henrik Rydgård 7e0e9a6d2b Shrink TexCacheEntry by 4 bytes and clean up a naming issue
Was a little confused by the "/2". It's not really useful to cache this
value anyway.
2023-08-30 16:37:38 +02:00
Henrik Rydgård 0d0c11a1ed Remove unnecessary check, add comment. 2023-08-30 10:29:14 +02:00
Henrik Rydgård 30a165b1dd Detect the simplest Tactics Ogre case (US/EU) early
Removes the need for the compat.ini flag for these versions, since we
can just treat the texture exactly as a regular 2D texture.
2023-08-30 10:27:19 +02:00
Henrik Rydgård de679e2761 Generalize the odd/even mip level check 2023-08-29 10:44:18 +02:00
Henrik Rydgård 0cdfaffb48 Enable the FakeMipmapChange flag for US/EU Tactics Ogre, fixing replacement problem.
For correct lookups, without our texture replacement actually supporting
volume textures, we need to use this mechanism here too.

The game actually uses two mipmaps, but they're identical and point to
the same memory, so we treat them as a regular 2D texture instead for
purposes of both texturing and replacement. This is presumably legacy
from the initial Japanese version that needs to use multiple texture
layers. Similarly it does in in pairs.

This does actually not fully fix texture replacement for the Japanese
version, unfortunately. For that we need more proper support for these
weird textures in the texture replacement code - when I refactored it
before for more natural handling of regular mipmapping, this kinda got
lost.
2023-08-28 20:58:57 +02:00