Henrik Rydgård
c4f4439b8c
Merge pull request #17000 from hrydgard/more-rendering-cleanup
...
More rendering cleanup
2023-02-25 13:11:05 +01:00
Henrik Rydgård
8b431b39ba
Wrap the display globals in a struct ( #16998 )
...
* Wrap the display globals in a struct
Makes it easier to search/replace these, for future refactorings.
* Some renaming
* Qt buildfix, also fix the Qt build on Mac (got broken with battery changes)
* Attempt at buildfixing ios
* UWP buildfix
2023-02-25 13:09:44 +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
6b91647209
Remove unused ExeuteOp in GPUCommon.cpp
2023-02-25 12:21:03 +01:00
Henrik Rydgård
3823c08771
Remove PreExecuteOp from GPUInterface
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
16eded4e1c
Comment on why FinishDeferred is not unified.
2023-02-25 12:21:03 +01:00
Henrik Rydgård
30120560ab
Include file cleanup in framebuffer managers
2023-02-25 12:21:00 +01:00
Henrik Rydgård
49e5460c9c
Remove count parameter from SetViewports. No use foreseen.
2023-02-25 07:12:53 +01:00
Henrik Rydgård
1b5148bb6c
Remove kinda-duplicate function.
2023-02-24 23:54:04 +01:00
Henrik Rydgård
9d5b95616d
Merge pull request #16988 from unknownbrackets/debugger
...
Debugger: Lock memory during stack walk
2023-02-23 14:42:37 +01:00
Unknown W. Brackets
cd3fc26190
samplerjit: Prevent thread local stale cache read.
...
If the generation count happens to match, would still get a stale pointer
and crash. Let's just make the generation count static so it always
increases.
2023-02-22 21:15:03 -08:00
Unknown W. Brackets
df1bd64662
riscv: Add morph+skin to vertexjit.
2023-02-16 18:45:10 -08:00
Unknown W. Brackets
71f4b116fe
riscv: Implement skinning in vertexjit.
2023-02-16 18:32:58 -08:00
Unknown W. Brackets
27e60a9f2e
riscv: Sum weighted matrices in vertexjit.
...
Not yet doing pos/norm, so not used yet.
2023-02-16 18:32:58 -08:00
Henrik Rydgård
adda49d05d
Add a heuristic avoiding joining framebuffers horizontally
...
...when texturing from the other one.
Greatly improves GPU performance in Rainbow Six: Vegas.
Fixes #9324 .
2023-02-15 15:35:28 +01:00
Henrik Rydgård
ae9291f3b5
More work on depth copies. Seems to be enough for Iron Man.
2023-02-15 07:35:07 +01:00
Henrik Rydgård
62a6f351d5
Initial work on depth copies
2023-02-15 07:35:07 +01:00
Henrik Rydgård
27a03de826
CreateRAMFramebuffer: Don't create a depth buffer by default
2023-02-15 07:35:07 +01:00
Henrik Rydgård
6b902a7d6b
Minor code cleanup, one very minor stride bugfix
2023-02-15 07:35:07 +01:00
Henrik Rydgård
18b08637f6
Merge pull request #16968 from unknownbrackets/riscv-vertexjit
...
riscv: Include morph in vertexjit
2023-02-15 07:31:01 +01:00
Unknown W. Brackets
9f43010004
riscv: Reuse some color morphing code.
...
Small optimization loss in 5551, but fairly minimal and I think it's worth
it.
2023-02-14 20:46:05 -08:00
Unknown W. Brackets
684aa75388
riscv: Include morph in vertexjit.
2023-02-14 20:20:55 -08:00
Henrik Rydgård
3dc9fd86e1
Merge pull request #16962 from unknownbrackets/riscv-vertexjit
...
riscv: Correct offset prescale in vertexjit
2023-02-14 09:41:45 +01:00
Unknown W. Brackets
ada6aa77e0
riscv: Correct offset prescale in vertexjit.
...
Also implement doubling while here.
2023-02-13 17:16:48 -08:00
Unknown W. Brackets
e1c391b1c8
riscv: Use vertexjit for hardware skinned verts.
2023-02-13 17:15:49 -08:00
Unknown W. Brackets
991c596490
riscv: Set constants once in vertexjit.
2023-02-13 16:57:13 -08:00
Henrik Rydgård
86a19cebfd
Merge pull request #16957 from unknownbrackets/riscv-vertexjit
...
riscv: Initial vertexjit
2023-02-13 08:33:05 +01:00
Unknown W. Brackets
dc4136d547
riscv: Add prescale to vertexjit.
2023-02-12 23:05:35 -08:00
Unknown W. Brackets
77b2e63876
riscv: Add colors to vertexjit.
...
This don't feel very efficient, but they overall beat non-jit.
2023-02-12 23:05:35 -08:00
Unknown W. Brackets
ee10fae04e
riscv: Add basic steps to vertex decode.
2023-02-12 23:05:34 -08:00
Unknown W. Brackets
219e0db4e5
riscv: Initial vertexjit.
2023-02-12 14:28:51 -08:00
Unknown W. Brackets
89c18d8077
riscv: Cleanup missing Poison, Crash.
2023-02-12 12:10:29 -08:00
Henrik Rydgård
1938fa44d4
Split the depth copy shader into depth copy and depth encode, dynamic depth scale in Draw2D
2023-02-11 18:24:07 +01:00
Henrik Rydgård
a083a65f77
Depal: Get depth scale factors dynamically
2023-02-11 16:12:58 +01:00
Henrik Rydgård
547ecec074
Replace the rest of the uses of DepthSliceFactor
2023-02-11 14:45:14 +01:00
Henrik Rydgård
99e6fd62f7
Remove a baffling depth offset I don't quite get
2023-02-11 14:41:25 +01:00
Henrik Rydgård
241f8e75bc
Replace some uses of DepthSliceFactor
2023-02-11 14:37:48 +01:00
Henrik Rydgård
5bdbe6984c
Simplify GetDepthScaleFactors
2023-02-11 13:34:08 +01:00
Henrik Rydgård
a2c9491a06
Remove a division by 0 that I hadn't noticed before.
2023-02-11 13:27:44 +01:00
Henrik Rydgård
d40aa17198
Remove ToScaledDepthFromIntegerScale
2023-02-11 13:27:44 +01:00
Henrik Rydgård
805591e493
Replace all uses of ToScaledDepthFromIntegerScale.
2023-02-11 13:27:44 +01:00
Henrik Rydgård
9053d8ccc7
Flip a sign for consistency
2023-02-11 13:27:44 +01:00
Henrik Rydgård
116b3ba8cc
Increase precision of GetDepthScaleFactors to match ToScaledDepthFromIntegerScale
2023-02-11 13:27:44 +01:00
Henrik Rydgård
639ca31814
Address feedback
2023-02-11 11:23:00 +01:00
Henrik Rydgård
28a7912ae6
Add comments, re-enable remaining tests (they do work, just forgot to add expected values)
2023-02-11 01:11:02 +01:00
Henrik Rydgård
8d40684833
Make the test pass, add some commented-out failing ones
2023-02-10 14:57:48 +01:00
Henrik Rydgård
d65dae7185
Depth scale functions: Clean up the naming, add a failing test
2023-02-10 14:57:45 +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
Unknown W. Brackets
aff0b46523
GPU: Skip depth resize when forcing 1x.
2023-02-08 18:45:01 -08:00
Henrik Rydgård
2d0252feb8
Merge pull request #16916 from hrydgard/implement-delayed-readback
...
Implement delayed depth readbacks, Vulkan only
2023-02-08 21:34:29 +01:00
Henrik Rydgård
ab63689cca
Remove bad comment
2023-02-08 15:37:06 +01:00
Henrik Rydgård
735cd26db6
Document Syphon Filter hack, but don't enable it
2023-02-08 00:56:45 +01:00
Henrik Rydgård
9827dd536c
Count listsyncs and drawsyncs in gpu stats. Eat some cycles in listSync
...
Chose a conservative number (same as sceGeContinue)
2023-02-08 00:41:26 +01:00
Henrik Rydgård
94f51d5d26
Make the Dangan Ronpa readback async
2023-02-07 23:13:36 +01:00
Henrik Rydgård
5f13bc061a
Color readback: Read the previous framebuffer instead of the one being switched to
2023-02-07 23:13:36 +01:00
Henrik Rydgård
b3e6b81e43
Implement delayed depth readbacks for Vulkan only
2023-02-07 23:13:36 +01:00
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