Henrik Rydgård
0bf7a98aff
Replace DrainAndBlockCompileThreads with StopThreads, and same for resuming.
2024-01-22 11:06:50 +01:00
Henrik Rydgård
f2da5dafd1
Use the universally supported Vulkan "565" 16-bit texture format
...
Previously mistakenly used the BGR format instead of the RGB.
Probably won't make much of a difference for anything, but may affect #17881
if my theory about it is correct.
Also minor cleanups.
2023-12-12 18:19:29 +01:00
Henrik Rydgård
0ad2827e14
Vulkan: Fix synchronization when shutting the GPU down in-game.
2023-10-11 12:27:39 +02:00
Henrik Rydgård
fb4a1fb7dd
Simplify disk-cache-load on GLES as well, for the same reasons as #18216
2023-09-30 13:45:13 +02:00
Henrik Rydgård
f2cfbe1bcf
Vulkan: Add the same shutdown logic to stop async shader compiles to DeviceLost
2023-09-26 01:28:59 +02:00
Henrik Rydgård
6e303e8f1d
Vulkan: Simplify GetShaders and DirtyLastShader, making them internally consistent.
2023-09-24 11:55:15 +02:00
Henrik Rydgård
d31ba393af
Don't load the shader cache on a separate thread - all it does is already async
2023-09-24 10:53:23 +02:00
Henrik Rydgård
dbd3045f87
Join the shader cache load thread on exit
2023-09-24 01:07:08 +02:00
Henrik Rydgård
3783afd855
Fix a really bad race condition during game shutdown.
2023-09-20 18:47:32 +02:00
Henrik Rydgård
0bfd166200
Try to prevent a weird shutdown race condition that I'm not sure can happen - but crash logs show it
2023-09-18 16:45:07 +02:00
Henrik Rydgård
f4b0cddda3
ShaderId: Safer way to check for backend.
2023-09-18 16:25:00 +02:00
Henrik Rydgård
8a6e288fcc
Add checkboxes in developer tools to allow disabling ubershaders.
...
Might be helpful to diagnose performance problems on user devices.
Additionally, moves the texture replacement controls to the top. They
should probably be moved somewhere else entirely...
See #17918
2023-08-17 20:16:04 +02:00
Henrik Rydgård
ff6e118fff
Get rid of a lot of ifdefs around presentation mode. Instead, set things dynamically.
2023-08-14 11:02:29 +02:00
Henrik Rydgård
be63ce3a4a
Minor refactor allowing getting the GPU profile string outside games
2023-08-03 16:31:20 +02:00
Henrik Rydgård
6d8069dfd1
Vulkan: Remove the remains of the input attachment experiment
...
Haven't been using these for a while.
I've come to the conclusion here that I think it's better to try to
deal with the issues using safe workarounds like copies, instead of
relying on features with somewhat iffy driver support that are not
universal across APIs anyway.
2023-06-13 20:46:27 +02:00
Henrik Rydgård
7178c0cd42
Restore fragmentshader ID flags double and texalpha. Add a ubershader mode that uses dynamic state.
2023-05-25 10:19:01 +02:00
Henrik Rydgård
c9b7c815a1
~GPU_Vulkan: Check that we still have a draw_ pointer before trying to drain the compile queue.
2023-05-03 22:33:34 +02:00
Henrik Rydgård
2cca0b265e
Vulkan: Turn off the ubershader on T880, T860 and T830 on old driver versions.
2023-05-03 11:53:32 +02:00
Henrik Rydgård
97488c0a79
Vulkan: Before cleaning the shader managers, drain the shader compile queue.
...
Mainly paranoia, but might help with the mutex crash from #17364
2023-05-02 22:05:28 +02:00
Henrik Rydgård
3616e0fb3c
Revert "Turn off light ubershader generation on Broadcom GPUs."
...
See #16824
This reverts commit 1374fb040c
.
2023-04-07 16:43:50 +02:00
Henrik Rydgård
3a69569580
Don't use inaccurate depth with Vulkan on any GPU except some special-cased Mali drivers.
...
Fixes #17044
2023-04-03 22:36:13 +02:00
Henrik Rydgård
1374fb040c
Turn off light ubershader generation on Broadcom GPUs.
...
Attempt at working around #16824
2023-04-02 17:39:28 +02:00
Henrik Rydgård
5e6d181eb6
Vulkan: Disable framebuffer fetch (through input attachments) for now.
...
This is a conceptually cool trick that just doesn't seem to be worth
it, compared to the old approach of copy + blend-in-shader. I haven't
found any game that benefits more than absolutely minimally, and having
two paths to test isn't great, when the win is so small.
So I'm disabling it. I'm keeping the code for now, but might clear it
out later.
Fixes #17069
2023-04-01 23:07:32 +02:00
Henrik Rydgård
87a16b0386
Fix the stats
2023-03-15 10:19:00 +01:00
Henrik Rydgård
effbe6376a
Remove an unused VulkanPushBuffer.
...
Saves about 0.75MB of VRAM, but mainly just to clean things up.
I think I meant to use this one instead of grabbing the one from
DrawEngine in the TextureCache.
2023-03-14 23:39:47 +01:00
Henrik Rydgård
b3ce31c61e
Address feedback
2023-02-26 19:54:30 +01:00
Henrik Rydgård
72bed6f2b5
Some DeviceLost/DeviceRestore cleanup
2023-02-26 11:05:52 +01:00
Henrik Rydgård
4c45f8a4b0
Pass in draw directly in GPUCommon::DeviceRestore, instead of awkwardly fetching it
2023-02-25 23:04:27 +01:00
Henrik Rydgård
8fb75e0c12
Unify most of the DebugGetShader* functions
2023-02-25 16:42:09 +01:00
Henrik Rydgård
c2c479b217
Remove function InitClear. Was only implemented for DX9, and only barely meaningful in non-buffered.
2023-02-25 16:32:50 +01:00
Henrik Rydgård
8ba665e258
More unification work
2023-02-25 16:12:24 +01:00
Henrik Rydgård
c74f5b2189
Prepare for unifying more stuff
2023-02-25 16:01:32 +01:00
Henrik Rydgård
285ffbaa52
Unify CopyDisplayToOutput
2023-02-25 14:42:15 +01:00
Henrik Rydgård
18999c3687
Create the GPUCommonHW class.
2023-02-25 14:42:10 +01:00
Henrik Rydgård
0d57f3beee
Unify GPUCommon::DoState.
2023-02-25 12:21:03 +01:00
Henrik Rydgård
609a8f6d36
Unify ExecuteOp between the accelerated backends
2023-02-25 12:21:03 +01:00
Henrik Rydgård
ed03348c65
Unify PreExecuteOp, keep the soft GPU as a special case
2023-02-25 12:21:03 +01:00
Henrik Rydgård
da561aa9de
Unify CheckFlushOp
2023-02-25 12:21:03 +01:00
Henrik Rydgård
d426ce5118
Clear depth buffers after changing depth rounding mode.
...
And thus change of depth buffer scale/offset.
Previously, old depth buffers with values that now are out of range
could stick around, causing #16941 . This clears them to the expected 0
value, which helps Outrun. Ideally we should convert depth buffers to
the new format, but if we can get away without that, that's also nice.
This is enough for #16941 .
2023-02-10 10:03:14 +01:00
Henrik Rydgård
7672556e5c
Better pipeline descriptions in shader viewer (shorter in overview, longer after click)
2023-01-09 11:22:35 +01:00
Henrik Rydgård
cf52324e9e
Vulkan: Fix pipeline cache clearing.
...
Extracted from #16759 and bugfixed. Fixes a leak of Vulkan pipelines.
I guess another way would be to queue the variants for destruction at
the same time as we queue the callback, but I like this better.
2023-01-09 09:49:55 +01:00
Unknown W. Brackets
de3c2783f4
Vulkan: Reload shaders if use flags change.
2023-01-05 18:24:29 -08:00
Unknown W. Brackets
3f20562b9f
Vulkan: Store saw equal depth flag in cache.
2023-01-05 18:24:29 -08:00
Unknown W. Brackets
0496ca32ff
Global: Cleanup some minor includes and typos.
2022-12-27 08:33:07 -08:00
Henrik Rydgård
11366a2ded
Don't refer directly to g_Config.iMultiSampleLevel, it can contain unsupported modes.
2022-12-14 16:43:37 +01:00
Henrik Rydgård
41e5b1e95a
Plumb through multiSampleLevel so PipelineManager doesn't read config.
2022-12-14 16:43:37 +01:00
Unknown W. Brackets
8c1a247b7b
Vulkan: Cleanup some logspam.
2022-12-13 18:29:23 -08:00
Henrik Rydgård
65c721dce6
Rename Save/LoadCache to Save/LoadPipelineCache
2022-12-13 19:18:20 +01:00
Henrik Rydgård
ee19db091f
Add accessor for UseFlags
2022-12-13 18:27:45 +01:00
Henrik Rydgård
313a2b1327
Improve shader cache logging
2022-12-13 16:35:02 +01:00