257 Commits

Author SHA1 Message Date
Henrik Rydgård
d4df0181db More duplicate code removal 2017-11-14 09:20:36 +01:00
Henrik Rydgård
35437e6b62 Kill off more unused duplicate code 2017-11-13 16:50:45 +01:00
Henrik Rydgård
4a09289056 D3D11: Similarly to the last vulkan commit, don't create lots of dupe vertex input layouts 2017-11-13 12:26:52 +01:00
Henrik Rydgård
3e749a94ce Vulkan: Fix bug where we ended up creating duplicate pipelines even if vertices decoded to the same format, if they were created from different formats.
This can cut down the number of pipelines to a third or less in some
games. However, benefit is likely smaller since Vulkan drivers will
deduplicate shaders inside each vkPipelineCache object.

Helps #10106 while not actually implementing any of the suggestions inside.
2017-11-13 11:22:33 +01:00
Henrik Rydgård
04e313ecba Unify Execute_Bezier and Execute_Spline 2017-11-13 10:45:27 +01:00
Unknown W. Brackets
e3b3828b15 TexCache: Check alpha before scaling.
This will be faster when scaling.  We no longer need to wait, since we
only care about full alpha now.
2017-11-12 16:19:28 -08:00
Unknown W. Brackets
9fbcc01afa TexCache: Remove simple 0/1 alpha check.
No practical optimizations have come of this, so it's a waste of time.
Slows down Vulkan too.
2017-11-12 16:17:46 -08:00
Unknown W. Brackets
9cf17d9288 D3D11: Clear input layouts on shader clear.
When we do clear shaders, make sure to also clear input layouts so we
don't have corrupt keys.
2017-11-11 08:11:10 -08:00
Unknown W. Brackets
f93ef92960 D3D11: Avoid clearing shaders on load state.
They don't need to be cleared (unlike FBOs), and clearing them requires
clearing even more things.  Fixes #9637.
2017-11-11 08:09:56 -08:00
Henrik Rydgård
d618b3673b Count readbacks in a frame and show in GPU debug stats. 2017-11-08 11:57:53 +01:00
Henrik Rydgård
ea2fc55217
Merge pull request #10056 from hrydgard/remove-multithreading-2
Remove the old style multithreading
2017-11-06 20:37:06 +01:00
Unknown W. Brackets
cd6249d080 D3D11: Show FBO-as-texture in GE debugger. 2017-11-05 18:41:24 -08:00
Henrik Rydgård
8c69be9bfa Get rid of GPUCommon's "Internal" functions. 2017-11-05 23:21:52 +01:00
Henrik Rydgård
26e52ca5e8 Get rid of a bunch of sync stuff that's no longer needed. 2017-11-05 23:21:49 +01:00
Unknown W. Brackets
78b5565035 GPU: Properly Release() FBOs.
In case we end up wanting to use those reference counts, let's use the
right API.
2017-11-05 12:45:02 -08:00
Henrik Rydgård
5d0bd85a70 Unify a little bit of depal code. 2017-11-05 10:40:21 +01:00
Henrik Rydgård
d670948ad2 Cleanups and fixes around Vulkan stencil upload. thx unknown 2017-11-05 10:14:44 +01:00
Henrik Rydgård
5018e400f2 Remove some code duplication 2017-11-01 14:51:15 +01:00
Henrik Rydgård
330bdb8be8 Add and update some comments. 2017-11-01 08:42:49 +01:00
Henrik Rydgård
65e23bb9f3 Some reorganization. Start implementing framebuffer depal for Vulkan. 2017-10-31 12:34:31 +01:00
Henrik Rydgård
7312576239 More buildfixes, warning fix, memory leak fix 2017-10-26 11:43:22 +02:00
Henrik Rydgård
b886efe8f5 Another minor cleanup (DescribeCodePtr) 2017-10-20 11:06:12 +02:00
Henrik Rydgård
4a30aedc53 Unify and move around code to cleanup some debug accessors 2017-10-18 13:10:05 +02:00
Henrik Rydgård
d53c88456a Unify GetFramebufferList() (trivial) 2017-10-18 12:49:15 +02:00
Henrik Rydgård
898716cc26 Unify DownloadFramebufferForClut 2017-10-18 12:34:01 +02:00
Henrik Rydgård
981c49615c Unify FlushBeforeCopy. Remove old dummy methods from Vulkan framebuffer manager. 2017-10-18 12:26:02 +02:00
Henrik Rydgård
4e3a9bc3e3 Unify some more framebuffer functions. Leave the GL stuff alone for now due to async. 2017-10-18 11:20:58 +02:00
Henrik Rydgård
f2ea0ce472 Unify (well, almost) GetOutputFramebuffer (D3D11/GL) 2017-10-18 10:54:26 +02:00
Henrik Rydgård
214270d192 Unify GetDepthBuffer/GetStencilBuffer in GL/D3D11 2017-10-18 10:54:26 +02:00
Henrik Rydgård
f220c74037 Remove comment, add check. 2017-10-16 16:28:27 +02:00
Henrik Rydgård
9b1ee6fce6 Unify GetFramebuffer in GLES and D3D11.
D3D9 is left behind for now, and Vulkan still needs implementation - got a branch with initial work towards that.
2017-10-11 13:39:34 +02:00
Henrik Rydgård
62972cb891 D3D11: Move to CopyFramebufferToSync where easily possible. 2017-10-11 13:34:31 +02:00
Henrik Rydgård
5bbe0eb69a Move GL readback to a Thin3D abstraction 2017-10-10 14:48:58 +02:00
Unknown W. Brackets
72e0a24724 GPU: Reset shader state on shader reset.
Was ending up with lastFSID being -1, but being used.

Seen in gpu/commands/blend test.
2017-09-20 08:37:54 -07:00
Henrik Rydgård
6a1fa728d8 Remove Globals.h 2017-08-31 17:15:22 +02:00
Henrik Rydgård
2f85e6516e Minor optimizations (use the new hashmap in a few more places) 2017-08-20 19:18:46 +02:00
Henrik Rydgård
10cebb4195 32-bit buildfix 2017-08-20 15:33:53 +02:00
Henrik Rydgård
e0e13e191f Replace the most critical unordered_maps and maps with two new maps: FastHashMap and PrehashMap. 2017-08-20 11:30:19 +02:00
Henrik Rydgård
d60bb27cd9 Merge pull request #9906 from hrydgard/fastrunloop-optimize
GPU FastRunLoop optimizations
2017-08-17 16:25:15 +02:00
Henrik Rydgård
5680332343 Minor cleanups 2017-08-17 15:20:21 +02:00
Henrik Rydgård
2c4e5e2303 Fastpath in fastrunloop when diff=0. Remove need for Execute for UV scale/offset. 2017-08-17 15:20:16 +02:00
Henrik Rydgård
71baecabd6 Make FLAG_FLUSHBEFORE a no-op, move flushes into the execution functions.
It would only be necessary if we needed the previous value, which we
don't do in any of these.
2017-08-17 15:20:10 +02:00
Henrik Rydgård
5e788ffadf Implement vertex caching for Vulkan. 2017-08-17 11:22:45 +02:00
Henrik Rydgård
50d771961b Vulkan: More minor optimization (avoid pipeline cache lookups when possible) 2017-08-15 16:01:50 +02:00
Henrik Rydgård
983bb3bd0f Can't dirty VERTEXSHADER_STATE before the flush in Execute_VertexTypeSkinning, causes obscure bugs when software skinning is enabled 2017-08-15 14:27:54 +02:00
Henrik Rydgård
4e7099bf47 Vulkan: Fix some more state dirtying issues. 2017-08-15 10:51:44 +02:00
Henrik Rydgård
5a65334646 Use dirty-flags more in Vulkan state setting 2017-08-14 15:14:46 +02:00
Unknown W. Brackets
ca40282a10 Dirty on various framebuf state helpers.
Ideally we should cut down on using DisableState(), or restore afterward.
2017-08-14 11:36:07 +02:00
Henrik Rydgard
078e1151f9 Dirty-flag the fragment shader ID. 2017-08-14 11:36:07 +02:00
Unknown W. Brackets
f1cf92988f Dirty things on stencil buffer upload. 2017-08-14 11:36:06 +02:00