Commit Graph

885 Commits

Author SHA1 Message Date
Henrik Rydgård
d4df0181db More duplicate code removal 2017-11-14 09:20:36 +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
7041341d1a SaveState: Avoid clearing shaders in all backends. 2017-11-11 08:17:04 -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
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
5018e400f2 Remove some code duplication 2017-11-01 14:51:15 +01:00
Henrik Rydgård
533f80a056 Fix bug in Vulkan's vertex shader generator, causing stretched characters in Jeanne D'arc. 2017-11-01 11:47:05 +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
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
9bce767b73 Merge pull request #9916 from hrydgard/faster-hashmaps
Replace the most critical unordered_maps and maps with faster maps.
2017-08-20 17:56:31 +02:00
Henrik Rydgård
10cebb4195 32-bit buildfix 2017-08-20 15:33:53 +02:00
Henrik Rydgård
c2bd739b49 Optimize uniform uploads for D3D9 and GL as well. 2017-08-20 13:53:39 +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
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
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
Henrik Rydgard
56cd991833 All: Only recompute the vertex shader ID when dirty 2017-08-14 11:36:06 +02:00
Henrik Rydgard
1098bf7342 All: Only convert viewportscissor state if dirty 2017-08-14 11:14:26 +02:00
Henrik Rydgard
e439055a32 All: Only convert raster state if dirty 2017-08-14 11:14:26 +02:00
Henrik Rydgard
e2b179d6e2 All: Only convert depth stencil state if dirty 2017-08-14 11:14:26 +02:00
Henrik Rydgard
e4567c694c All: Only convert blend state if "dirty" 2017-08-14 11:14:26 +02:00
Henrik Rydgård
dfdf54813a Port a small simplification to D3D9 2017-06-09 14:53:06 +02:00
Unknown W. Brackets
4a56e6ff83 GE Debugger: Fix recording in softgpu. 2017-06-04 10:38:58 -07:00
Unknown W. Brackets
dca75437c3 GPU: Refactor common frame dumping code. 2017-06-03 15:29:07 -07:00
Henrik Rydgård
e55b6ac4af Unify SetupVertexDecoder 2017-06-03 18:05:46 +02:00
Henrik Rydgård
14a80968cf Unify transformed arrays 2017-06-03 18:05:21 +02:00
Henrik Rydgård
1abb8792ab Unify ComputeMiniHash 2017-06-03 18:05:18 +02:00
Henrik Rydgård
3032240916 Unify DecodeVertsStep 2017-06-03 18:04:46 +02:00
Henrik Rydgård
240e058b3b Some unification in DrawEngine 2017-06-03 18:03:56 +02:00