Commit Graph
8356 Commits
Author SHA1 Message Date
Henrik Rydgård 30fbcf356a Merge pull request #16914 from hrydgard/readback-more-prep
Some more plumbing of parameters, preparing for readback stuff
2023-02-05 23:25:57 +01:00
Henrik Rydgård 23049533b9 Restore GetDepthBuffer precision - the stretchy-color-readback path is not suitable for this. 2023-02-05 22:58:26 +01:00
Henrik Rydgård ec5afb2d8d Merge pull request #16812 from unknownbrackets/task-priority
ThreadManager: Add simple priority queues
2023-02-05 21:00:47 +01:00
Henrik Rydgård 5ac9b88e81 Plumbing miss 2023-02-05 16:41:12 +01:00
Henrik Rydgård 63c43b90f8 Remove a level of indentation in LoadCLUT 2023-02-05 13:59:16 +01:00
Henrik Rydgård 937975000b Add a ReadbackMode parameter to more functions in the FramebufferManager 2023-02-05 13:57:45 +01:00
Henrik Rydgård 92f4de7b74 Small cleanup. Let's reduce the number of readback paths. 2023-02-05 13:57:45 +01:00
Henrik Rydgård dd64fe871e Merge pull request #16912 from lvonasek/compat_openxr_mh3hud
OpenXR - Fix HUD in Monster Hunter 3rd
2023-02-05 08:59:10 +01:00
Lubos bff0d735e2 OpenXR - Fix HUD in Monster Hunter 3rd 2023-02-05 08:38:43 +01:00
Henrik Rydgård 4427cb4fc3 Add parameter to thin3d::CopyFramebufferToMemory to specify blocking mode. Not yet implemented. 2023-02-04 23:40:36 +01:00
Henrik Rydgård 281b0d6aab Quick fix for the lens flare in Burnout
We have to assume that ForceLowerResolutionForEffects has been set for
good reason - in this case, the effect probably can't safely function
without it.

Fixes #11100 once again.
2023-02-04 18:01:53 +01:00
Henrik Rydgård 236611ac16 Initial implementation of depth readback for Syphon Filter. Fixes the lens flares. 2023-02-04 13:54:57 +01:00
Henrik Rydgård 62484f01ed Make ReadbackFramebufferSync able to use the stretch ability of ReadbackDepthbufferSync 2023-02-04 12:05:50 +01:00
Henrik Rydgård c7234aa3b5 Handle scaling internally in ReadFramebufferSync 2023-02-04 11:36:48 +01:00
Henrik Rydgård fb8aff5a8c Split out the depth stuff from the file, move to GPU/Common 2023-02-03 21:06:43 +01:00
Henrik Rydgård 23c8a79473 Make depth readback through the "color path" work on all backends except D3D9 2023-02-03 20:59:58 +01:00
Henrik Rydgård 4402530ca7 Use ShaderWriter to generate the depth readback shader 2023-02-03 20:33:11 +01:00
Henrik Rydgård f2a6c744bc Add built-in stretch functionality to depth readback shader path 2023-02-03 19:06:40 +01:00
Henrik Rydgård 7635c4447c Oops, apply the alpha fix for D3D9 and OpenGL too.
See #16875
2023-02-03 08:51:35 +01:00
Unknown W. Brackets 88ba003f46 ThreadManager: Add a simple priority field.
Currently, not actually respected.
2023-02-02 17:08:24 -08:00
Henrik Rydgård c11f7e3a5f Fix texture alpha when texturing from full-alpha textures.
Fixes #16875
2023-02-02 16:13:38 +01:00
Henrik Rydgård d7605c6877 Use dedicated threads for the shader object creation. Bypasses the deadlock possibility. 2023-02-01 11:15:33 +01:00
Unknown W. Brackets 08ac34bae0 GPU: Allow depth above 65535.
Hopefully it rounds down for any == or <= tests.
2023-01-31 18:41:06 -08:00
Henrik Rydgård 1f3969aff3 Merge pull request #16873 from hrydgard/dedicated-thread
Add facility to run tasks on dedicated threads using the ThreadManager interface
2023-01-31 11:50:59 +01:00
Henrik Rydgård 6b0903f566 Add facility to run tasks on dedicated threads using the ThreadManager interface.
Useful for things that should be run ASAP even if the threadpool is full,
at a small extra cost. (Not recommended for very small tasks).

Considering using this to resolve the deadlocks in #16802.
2023-01-31 11:07:40 +01:00
Henrik Rydgård b62572a78f Refactor the framedata/GPU thread management. 2023-01-30 11:49:31 +01:00
Serena 30f6296767 Remove some Windows + Qt stuff + meow 2023-01-27 19:12:41 +03:00
Unknown W. Brackets 1c8bedbed9 Vulkan: Align for all Apple devices, not just M1. 2023-01-18 07:28:12 -08:00
Unknown W. Brackets 8d4007ce3f Vulkan: Force align verts to 4 on Apple devices. 2023-01-18 07:24:18 -08:00
Henrik Rydgård e410bc355a Merge pull request #16808 from unknownbrackets/shader-errors
GLES: More uint const paranoia
2023-01-15 10:41:13 +01:00
Unknown W. Brackets 3a6fa9b4ba ThreadManager: Don't allow reordering of queue.
Allowing a priority item is faster, but can cause confusion when you
expect things to run in the same sequence they're enqueued.
2023-01-14 16:35:01 -08:00
Henrik Rydgård 784e8ab782 Fix a race condition during Vulkan shader cache load.
Could lead to unnecessary pipelines being created.
2023-01-13 10:35:04 +01:00
Unknown W. Brackets 0f3f2e361f GLES: More uint const paranoia.
We don't use indexing on GLES now, but better to stay consistent.
2023-01-12 17:41:55 -08:00
Henrik Rydgård 5b3ac098ae Fix for old typo in OpenGL texture allocation 2023-01-12 19:45:40 +01:00
Henrik Rydgård 0604e51272 Merge pull request #16734 from hrydgard/remove-nonindexed-optimization-vk
Vulkan: Don't use non-indexed draws for pure tristrips and fans (only PowerVR for now)
2023-01-12 08:09:21 +01:00
Henrik Rydgård 86f34c52a4 Revert bad shader optimization 2023-01-12 00:30:41 +01:00
Henrik Rydgård 1cfc7b11b8 Only force indexed draws on PowerVR / Vulkan. 2023-01-11 22:59:30 +01:00
Henrik Rydgård beed3c06d2 Vulkan: Don't use non-indexed draws for pure tristrips and fans, creates extra pipelines.
Bump shader cache version
2023-01-11 22:57:23 +01:00
Henrik Rydgård ca63bb1e5b Even more optimization/cleanup. Don't need to check ldot that we already know is >= 0.0. 2023-01-11 19:34:58 +01:00
Henrik Rydgård 965007d65b Tighten up the lighting shader code a bit, hopefully eliminating a branch or two. 2023-01-11 19:29:02 +01:00
Henrik Rydgård 1c8e456c97 Also apply this to OpenGL and D3D9 2023-01-11 19:29:02 +01:00
Henrik Rydgård 4c2a41cc83 Break out the attenuation term, too 2023-01-11 19:29:02 +01:00
Henrik Rydgård a508f7e345 Shave a few instructions from lighting shaders by prenormalizing the light dir used for spotlights 2023-01-11 19:29:02 +01:00
Henrik Rydgård 7b62b4626f Comment fixes 2023-01-11 15:29:52 +01:00
Henrik Rydgård 3b46409350 Vertex shaders: On platforms with uniform buffers, use indexing and loop for real over the lights.
Strangely, greatly speeds up pipeline creation on PowerVR.
2023-01-11 15:24:56 +01:00
Henrik Rydgård d894906a7e Fix formatting of lights uniform buffer (tabs->spaces) 2023-01-11 14:18:14 +01:00
Henrik Rydgård c4d8ebcad5 D3D11 fix 2023-01-11 14:16:46 +01:00
Henrik Rydgård 3d376b0ab7 Remove the rather redundant DoTexture flag from vshaders.
Slightly reduces the number of unique vertex shaders but doesn't do much
for the pipeline count, as the fragment shader has a tex flag. Still
worth doing for the simplification.
2023-01-11 14:16:46 +01:00
Henrik Rydgård 1b4018d19a Fix shader cache clearing in D3D11 - need to clear the input layout maps too 2023-01-11 14:16:12 +01:00
Henrik Rydgård 5c79b930e9 Merge pull request #16783 from unknownbrackets/gl-cleanup
GLES: Remove some unused depth related code
2023-01-11 09:50:39 +01:00