Henrik Rydgård
6e303e8f1d
Vulkan: Simplify GetShaders and DirtyLastShader, making them internally consistent.
2023-09-24 11:55:15 +02:00
Henrik Rydgård
602407fcf2
Warning and comment fixes, logic precedence fixes in PPGeDraw
2023-09-21 16:41:42 +02:00
Henrik Rydgård
966144fa64
Bounds check writing to the index buffer when expanding lines/rects/points
2023-09-20 19:26:36 +02:00
Henrik Rydgård
3f2ef508c9
Make it easier to reason about space in the inds buffer by moving an offset instead of the pointer.
2023-09-20 19:23:24 +02:00
Henrik Rydgård
b7d28cd10a
Remove redundant fail state. Bail from shader cache load if a fragment shader fails to generate, too.
2023-09-18 14:38:22 +02:00
Henrik Rydgård
052747aa30
Add reporting of GLSL shader gen errors
2023-09-11 15:37:35 +02:00
Henrik Rydgård
d335393d4e
GLSL shader cache: Improve robustness against null shaders. See #18116
2023-09-11 12:07:18 +02:00
Henrik Rydgård
10f93875c6
Fix the semantics of DenseHashMap to be consistent even when inserting nulls
2023-09-11 12:07:18 +02:00
Henrik Rydgård
162b363063
Bump shader cache version, just because.
2023-09-09 15:13:52 +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
fc797ec55f
Merge pull request #17656 from lvonasek/compat_openxr_fixes
...
OpenXR - Game compatibility fixes
2023-07-02 21:12:21 +02:00
Lubos
6e10f20f8b
OpenXR - Tony Hawk mirroring hack better
2023-07-02 20:29:59 +02:00
Lubos
843b169fa3
OpenXR - Digimon Adventure rendering fixed
2023-07-02 15:05:29 +02:00
Henrik Rydgård
eb21a2e6c9
Break out the OSD data holder from Common/System/System.h, into OSD.cpp/h
2023-06-30 17:15:49 +02:00
Lubos
880168ee3c
OpenXR - Fix render glitches caused by wrong mirroring
2023-06-27 18:54:38 +02:00
Henrik Rydgård
7cc8c6cea4
OSD: Add semantics, move the the OSD state to common (while keeping the renderer in the UI).
2023-06-20 14:40:46 +02:00
Henrik Rydgård
def09bf575
Update the uvscale uniform a bit more conservatively on framebuffer changes
...
Plus fixes a few minor oversights
Fixes #17581 and possibly #17522
2023-06-15 11:57:30 +02:00
Henrik Rydgård
22632b82bd
Merge pull request #17565 from hrydgard/breakout-vcache-vulkan
...
Vulkan: Breakout the vertex cache logic from DoFlush()
2023-06-13 09:56:52 +02:00
Henrik Rydgård
880379c15d
Extract some minor changes from #17497
2023-06-12 20:20:06 +02:00
Henrik Rydgård
186b0f105c
Simplify the vertex cache ID handling
2023-06-12 13:16:13 +02:00
Henrik Rydgård
53aa2cc596
Apply stencil writemask when clearing properly again, see #17478
...
Also renames vpAndScissor to vpAndScissor_ for consistency.
2023-06-12 11:49:44 +02:00
Henrik Rydgård
72cf531759
Bump shader cache version
2023-05-25 10:19:01 +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
bb6d696a84
Merge the tex "ubershader" uniforms into one for convenience
2023-05-25 10:19:01 +02:00
Henrik Rydgård
f16f879b41
Some renaming to follow the standard of appending _ to member vars
2023-05-23 18:00:50 +02:00
Henrik Rydgård
84da0327d6
GLQueueRunner: Make DrawIndexed parameters more consistent.
2023-05-23 17:49:11 +02:00
Henrik Rydgård
f56ef63ef5
Remove redundant function
2023-05-23 16:50:25 +02:00
Henrik Rydgård
d51d1413a3
DrawEngineCommon: Rename decoded to decoded_
2023-05-23 16:46:43 +02:00
Henrik Rydgård
d7ea2ebf8a
GL: Add tags to push buffers for debug purposes. Double the default vertex buffer size.
2023-05-23 15:53:41 +02:00
Henrik Rydgård
cb38c43d7e
GL render manager: Merge the two stencil commands, for more compact command lists
2023-05-23 09:14:23 +02:00
Henrik Rydgård
470ebbfe73
GL: When setting a stencil value for clear, override both func and op for consistency.
2023-05-23 09:14:23 +02:00
Henrik Rydgård
a4baed4c0c
Minor GLPushBuffer cleanup (now same API as the VK one)
2023-05-23 08:41:09 +02:00
Henrik Rydgård
05b6bbdc56
Add a trivial profiling tool to the OpenGL backend - meaasure the time it takes to run a frame of commands.
...
Accessed from the in-game dev menu just like the Vulkan frame profiler.
With this we can easily see that actually submitting the GL commands is often the bottleneck on old
devices like a Galaxy S3.
2023-05-17 14:38:11 +02:00
Henrik Rydgård
9512bc6174
Don't cache render target copies for shader blending, only cache copies for overlap
...
Fixes #17451 , while also keeping the Dante performance fix from #17032 .
Of course, it's possible that something else could slow down now... But
hopefully not. This could also fix other problems.
2023-05-11 12:04:29 +02:00
Henrik Rydgård
b27c427547
We always bind and draw together, so let's combine them to one command.
2023-05-10 10:56:25 +02:00
Henrik Rydgård
8f2069ef71
GLQueueRunner: Combine BindVertexBuffer with BindIndexBuffer
2023-05-10 09:23:10 +02:00
Henrik Rydgård
b42670cf59
Manually revert the rest of the lmode optimization
2023-05-09 18:44:24 +02:00
Henrik Rydgård
f42c682d34
Revert "Merge pull request #16628 from hrydgard/remove-fog-fshader-flag"
...
This reverts commit 10dee90c83
, reversing
changes made to 34c11c8acf
.
2023-05-08 22:01:38 +02:00
Henrik Rydgård
14887d6b04
Bump shader cache version (should have done it in the release)
2023-05-06 16:15:32 +02:00
Henrik Rydgård
d56e27aa2c
Let's have DispatchFlush check for drawcalls before calling DoFlush, too.
2023-05-03 23:49:41 +02:00
Henrik Rydgård
c80671d9ea
Debug-assert that there's a renderpass in Flush instead of asserting, and skip if not.
...
buildfix
2023-05-03 23:49:38 +02:00
Henrik Rydgård
7c420381d5
OpenGL: Some paranoia checks around failed shader generation
2023-05-01 12:11:34 +02:00
Henrik Rydgård
d4249c1d73
OpenGL: Add an assert to catch a class of crash bugs early. Also assorted paranoia.
2023-05-01 11:56:26 +02:00
Henrik Rydgård
16b243b007
Centralize allocation of vertex decode buffers
2023-04-24 12:11:58 +02:00
Henrik Rydgård
9a3ff69091
Workaround for some SOCOM game's misuse of CLUT8 textures.
...
Emulating this correctly would be possible too but would only work at 1x
rendering resolution.
2023-04-17 09:34:26 +02:00
Henrik Rydgård
ee6234ecb6
I18N: Switch to getting categories by index instead of by string lookup
...
Also gets rid of the shared_ptr usage, and generally makes things nicer.
Needed for later config refactorings, good to get in early.
2023-04-07 10:35:01 +02:00
Lubos
cc1dd22e0f
OpenXR - Option to disable HUD detection added
2023-04-05 22:49:46 +02:00
Lubos
ee3e53581d
OpenXR - Camera lags fixed
2023-04-01 18:36:14 +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
9e125eeba7
Remove NotifyUserMessage from Host
2023-03-25 10:32:09 +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
b687f1bba8
Implement basic block compression support for OpenGL (without feature checks so far)
2023-03-12 00:14:06 +01:00
Henrik Rydgård
07fc551e4e
State fixes, disable logspam
2023-03-10 14:16:14 +01:00
Henrik Rydgård
ecf1134494
GL crashfix
2023-03-09 19:12:47 +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
ebd8a63914
Merge pull request #17032 from hrydgard/cache-framebuffer-copy
...
Cache framebuffer copies (for self-texturing) until the next TexFlush GPU instruction
2023-03-06 09:03:39 +01:00
Unknown W. Brackets
9fcc1509e4
GPU: Correct depth clip/cull for zero scale.
2023-03-05 08:51:45 -08:00
Unknown W. Brackets
92a18eed01
GPU: Discard framebuffer copy when clearing.
...
This avoids retaining the framebuffer copy any longer than the current
framebuffer target.
2023-03-01 22:11:20 -08:00
Unknown W. Brackets
9e46a30c13
GPU: Correct some missing override specifiers.
2023-02-26 15:58:58 -08:00
Henrik Rydgård
72bed6f2b5
Some DeviceLost/DeviceRestore cleanup
2023-02-26 11:05:52 +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
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
92ee6e6a75
Remove more redundant functions
2023-02-25 16:33: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
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
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
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
a2c9491a06
Remove a division by 0 that I hadn't noticed before.
2023-02-11 13:27:44 +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
937975000b
Add a ReadbackMode parameter to more functions in the FramebufferManager
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
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
Henrik Rydgård
b62572a78f
Refactor the framedata/GPU thread management.
2023-01-30 11:49:31 +01: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
Henrik Rydgård
5b3ac098ae
Fix for old typo in OpenGL texture allocation
2023-01-12 19:45:40 +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
1c8e456c97
Also apply this to OpenGL and D3D9
2023-01-11 19:29:02 +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
5c79b930e9
Merge pull request #16783 from unknownbrackets/gl-cleanup
...
GLES: Remove some unused depth related code
2023-01-11 09:50:39 +01:00
Unknown W. Brackets
4e67194147
GLES: Remove some unused depth related code.
2023-01-11 00:20:11 -08:00