Commit Graph
3990 Commits
Author SHA1 Message Date
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årdandGitHub c4f4439b8c Merge pull request #17000 from hrydgard/more-rendering-cleanup
More rendering cleanup
2023-02-25 13:11:05 +01:00
Henrik RydgårdandGitHub 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årdandGitHub 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årdandGitHub 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
Henrik RydgårdandGitHub 289206fee0 Merge pull request #16782 from unknownbrackets/gl-shader-del
GLES: Delete LinkedShaders after the program
2023-01-11 09:07:30 +01:00
Unknown W. Brackets 5102ef8a31 GLES: Delete LinkedShaders after the program.
The program references the shader, so we have to delete in this order.
Caused problems on useFlag change as well as probably DeviceLost.
2023-01-10 22:13:40 -08:00
Henrik Rydgård 088d0c39dc Remove the FS_TEXTURE_AT_OFFSET fragment shader flag 2023-01-10 12:37:21 +01:00
Henrik Rydgård c7c48abb37 Switch the 2x flag to a uniform 2023-01-10 12:36:28 +01:00
Henrik Rydgård 0a6d226ddc Remove the unused bool utilities 2023-01-10 10:25:41 +01:00
Henrik Rydgård 00c44ea799 Get rid of the bool, not worth it. 2023-01-10 10:23:29 +01:00
Henrik Rydgård d4ce134292 Shader generator: Move FS_TEX_ALPHA to a uniform bool.
Part of #16567
2023-01-10 09:42:54 +01:00
Henrik RydgårdandGitHub 10625a6e00 Merge pull request #16757 from unknownbrackets/truncate-verts
GLES: Apply vertex limit only to GLES2
2023-01-08 22:37:44 +01:00
Henrik RydgårdandGitHub 10d7b2d410 Merge pull request #16756 from unknownbrackets/replace-stride
Replacement: Always return w/h from GetMipSize()
2023-01-08 22:34:50 +01:00
Unknown W. Brackets 1f91993e7d GLES: Apply vertex limit only to GLES2. 2023-01-08 11:06:35 -08:00
Unknown W. Brackets 0f92afb0c1 Replacement: Check replaceValid before load. 2023-01-08 10:20:52 -08:00
Luboš VonásekandGitHub cd3ed86152 Merge branch 'hrydgard:master' into compat-openxr-3rdbirthday 2023-01-06 16:54:00 +01:00
Lubos 864c26be50 Revert "OpenXR - Disable HUD when it is on max scale"
This reverts commit c77a5d37a7.
2023-01-06 08:26:14 +01:00
Unknown W. Brackets 06045b9459 GLES: Cache equal flag, load from cache. 2023-01-05 18:24:29 -08:00