Commit Graph

210 Commits

Author SHA1 Message Date
Henrik Rydgård ec6c7b08f5 Add a common TextureAlpha enum, replacing CheckAlphaResult and ReplacedTextureAlpha. 2026-06-09 11:25:50 +02:00
Henrik Rydgård 2534eb4480 Disable anisotropic filtering for all flat draws.
May improve performance slightly, and should fix the last instances of #19555
2026-06-08 15:28:58 +02:00
Henrik Rydgård 08f4c8fae8 Compute min/max Z and W from the culling loop, use to cull some more 2026-05-30 19:07:58 +02:00
Henrik Rydgård 7853881210 GPU header cleanup: Avoid including GPUCommon.h in some places 2025-11-23 20:37:37 +01: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 e0d9edc077 TextureCacheD3D11: Fix resource lifecycle 2025-08-01 17:57:52 +02:00
Henrik Rydgård 4fcf5a4fab Start reordering things in the GPU init, with the goal of doing most of it on the loader thread. 2025-05-15 10:24:30 +02:00
oltolm b09eb3dd23 use ComPtr for D3D11 2025-02-17 22:58:44 +01:00
Henrik Rydgård df6ed8cfc9 Do some cleanup of #includes in GPU 2024-12-18 13:57:26 +01:00
Henrik Rydgård e4adc112ff ImDebugger: Add a basic texture browser 2024-11-29 19:30:38 +01: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 0b76d443e2 D3D11 texture replacement: Support more mip levels. Fixes crash in texture pack.
Fixes #19312
2024-07-02 11:56:27 +02:00
Henrik Rydgård ace217008a In D3D11, force block compressed textures to have dimensions divisible by 4
Fixes #17745 (crash when loading certain texture packs in D3D11)

This is an old unfortunate limitation. Only applies to the top mip
level, which makes it obvious that it's kinda unnecessary for the
hardware and indeed, Vulkan and OpenGL don't have this limitation.
2023-07-20 19:44:00 +02:00
Henrik Rydgård d586ec0d5e Don't create Host objects except in headless/unittest 2023-03-25 10:47:01 +01:00
Henrik Rydgård 75bcb9b10c Some renaming, flag updates 2023-03-18 11:46:22 +01:00
Henrik Rydgård 5f76fbe1ad Implement padding-on-copy for compressed textures as well. 2023-03-17 14:00:14 +01:00
Henrik Rydgård d8c3269cc6 Fix zipped texture packs (it didn't load the ini from the zip, the rest worked).
Plus a few other things.
2023-03-14 17:53:01 +01:00
Henrik Rydgård c32e3f89f1 D3D11 mipmap stride fix 2023-03-12 23:31:51 +01:00
Henrik Rydgård b44e879d21 Support DXT1/3/5 (BC1,2,3) in D3D9 2023-03-12 11:37:17 +01:00
Henrik Rydgård f2673c8f7b Change BGRA to be a texture-specific flag. Fixes R/B swap in DDS textures in D3D11. 2023-03-12 10:19:12 +01:00
Henrik Rydgård 7e4dc23bcc Fix BC textures in D3D11 - except that they're red/blue swapped. Ugh. 2023-03-11 23:55:43 +01:00
Henrik Rydgård f936a6e9ce Structs and enums and build files 2023-03-11 11:19:33 +01:00
Henrik Rydgård 44c4e63753 Simplifies and speeds up D3D11 texture uploads. Also, fixes a bug with replacement off 2023-03-09 14:43:59 +01:00
Henrik Rydgård bda09be109 Texture color format doesn't belong as a per-level property, that's not supported.
All levels of a texture must have the same format.
2023-03-09 00:10:46 +01:00
Henrik Rydgård 3dc47c7fef Unify TextureCache ::StartFrame as much as possible.
Tiny optimization avoiding a Vulkan pool reset on most frames.
2023-02-25 23:20:41 +01:00
Henrik Rydgård 1b5148bb6c Remove kinda-duplicate function. 2023-02-24 23:54:04 +01:00
Unknown W. Brackets 0f92afb0c1 Replacement: Check replaceValid before load. 2023-01-08 10:20:52 -08:00
Unknown W. Brackets 49f6c461ad Reporting: Fix some header includes.
Particularly in Common, avoid including Core/Reporting.h.
2022-12-27 14:58:20 -08:00
Unknown W. Brackets 9cfcbc46e6 Global: Cleanup initialization/pointer checks.
Cleaning up a lot of cases of uninitialized data, unchecked return values
for failures, and similar.
2022-12-10 21:13:36 -08:00
Unknown W. Brackets 7533b64940 GE Debugger: Allow reading tex on D3D11. 2022-10-23 22:01:50 -07:00
Henrik Rydgård 9b8a5d1db3 Rename GPU_SUPPORTS_ to GPU_USE_ 2022-10-17 08:47:03 +02:00
Henrik Rydgård daca0b2109 Rename gstate_c.Supports to gstate_c.Use 2022-10-17 08:46:37 +02:00
Unknown W. Brackets 416265431b GE Debugger: Display if tex is framebuf.
Rather than guessing based on size, let's show explicitly.
2022-10-10 22:35:42 -07:00
Unknown W. Brackets fc9f200224 GE Debugger: Centralize current fb tex fetch code. 2022-10-10 21:50:53 -07:00
Unknown W. Brackets c76d31dfa8 GPU: Cleanup unused CheckAlpha() funcs. 2022-09-24 02:00:03 -07:00
Henrik Rydgård a208afb7b8 OpenGL and D3D11 fixes 2022-09-14 23:35:15 +02:00
Henrik Rydgård abd58199ce Add way to bind cached textures to a DrawContext 2022-09-14 22:18:35 +02:00
Henrik Rydgård 0ed1f3d461 Switch multiple bools as parameters to DecodeTextureLevel to a flags enum. 2022-09-14 18:40:08 +02:00
Henrik Rydgård 75efcd9dfd Merge pull request #16000 from unknownbrackets/gedebugger
Cleanup some crashes in GE debugger or with large textures
2022-09-11 19:41:11 +02:00
Henrik Rydgård 694dbe1271 Add ShaderDepalMode enum, use in shader ID. Replaces smoothed bit. 2022-09-11 14:40:01 +02:00
Henrik Rydgård 9bd8b11bf8 Implement shader depal for D3D11. 2022-09-11 13:41:17 +02:00
Unknown W. Brackets 1056301c95 D3D11: Prevent crash on larger textures. 2022-09-10 20:16:05 -07:00
Unknown W. Brackets 62ed43633c d3d9: Correct decode of 16-bit textures.
Was causing crashes since we assumed this func could handle non-replaced
formats.
2022-09-06 07:44:08 -07:00
Henrik Rydgård 2bf0c86ac7 Fix image format when dumping textures.
Fixes #15831
2022-09-01 15:04:59 +02:00
Henrik Rydgård 08eaf7665c Fix race condition in replacement texture loading
The texture could become valid during the load, causing an inconsistent
state within the texture loading. So can only check for valid-ness once.
2022-08-30 12:52:31 +02:00
Henrik Rydgård 6f2966f502 Clean up mip size calculations
Calculating the same thing in multiple places is a recipe for bugs, so
let's not.
2022-08-30 12:05:57 +02:00
Henrik Rydgård b529d26f3a Fix smoothed depal on GLES. Don't enable filtering if not using. 2022-08-24 13:43:41 +02:00
Henrik Rydgård 5084743bbb Use Draw2D for depal shaders (except the actual blit, for now) 2022-08-23 11:21:40 +02:00
Henrik Rydgård 82a6c42e17 DepalettizeCommon -> TextureShaderCommon. Simplifications. 2022-08-22 12:21:20 +02:00
Unknown W. Brackets 89a499b4d2 GLES: Correct preview of mip levels > 0.
Don't need to force level 0 anymore.  Software can show levels hardware
refuses to load.  This is consistent with other backends.
2022-08-21 16:47:46 -07:00