Commit graph

88 commits

Author SHA1 Message Date
Henrik Rydgård
c964bc4ba2 Fix another of these pesky GL task switching bugs. 2018-05-30 19:29:26 +02:00
Henrik Rydgård
0d6be3a476 GLES: Refresh the draw context in DrawEngineGLES on DeviceRestore. How did we miss this? 2018-05-27 22:25:15 +02:00
Henrik Rydgård
b730d187e8 Add some paranoid checks guided by stack traces from Google Play 2018-05-27 22:12:59 +02:00
Henrik Rydgård
117dad8a48 Just add some constants for the GL texture slots. 2018-04-13 09:11:08 +02:00
Henrik Rydgård
36fd2711d6 Revert "Remove further remains of hardware skinning."
This reverts commit 40db61a680.
2018-04-10 12:22:41 +02:00
Henrik Rydgård
8953d7ff73 Revert "Comment fixes, reindentation."
This reverts commit 6fa9fcefb2.
2018-04-10 12:14:23 +02:00
Henrik Rydgård
69309aa400 Revert "Remove some remains of software skinning"
This reverts commit 2d33d526b8.
2018-04-10 11:21:56 +02:00
Henrik Rydgård
ca0fb77080 Assorted cleanups. Don't assert on no clear mask. 2018-04-06 23:29:44 +02:00
Henrik Rydgård
b06df3536e Auto unregister push buffer on deletion. 2018-04-05 17:53:03 +02:00
Henrik Rydgård
feb3870f7d Also take control over Begin/End 2018-04-05 17:34:32 +02:00
Henrik Rydgård
8d6bbc54a9 Minor refactoring moving creation/deletion of GLPushBuffer to GLRenderManager 2018-04-05 17:31:12 +02:00
Henrik Rydgård
6858c77612 Don't allow wrapping on framebuffer textures. Fixes GTA on old NV Shield 2018-03-17 01:54:11 +01:00
Henrik Rydgård
614cabb115 Implement pipeline/shader cache for Vulkan, to avoid shader compile stutters on second and subsequent runs.
The raw pipeline cache got pretty large. Instead, store IDs like GL.

There's still a disabled option to store the pipeline cache objects.
2018-03-16 21:03:03 +01:00
Henrik Rydgård
2d33d526b8 Remove some remains of software skinning 2018-03-16 20:38:05 +01:00
Henrik Rydgård
6fa9fcefb2 Comment fixes, reindentation. 2018-03-05 00:03:47 +01:00
Henrik Rydgård
40db61a680 Remove further remains of hardware skinning. Fixes #10661 2018-03-05 00:03:47 +01:00
Henrik Rydgård
23980065ba Unify all the DrawEngine::SubmitPrim 2018-02-26 11:07:30 +01:00
Unknown W. Brackets
0474ff5c23 GLES: Use aligned memory for textures.
We use SSE on them, and they used to be aligned, and must be aligned in
PSP RAM, so keep them aligned.

This only really affects 32-bit, since allocs will typically be aligned on
64-bit anyway.

Fixes #10601.
2018-02-11 08:13:57 -08:00
Henrik Rydgård
b3f4a923ca GLES: Fix minor memory leak 2018-02-07 16:55:03 +01:00
Henrik Rydgård
c21b02a22d gl-render-manager: Use properly scaled scissor rectangle, oops. Fixes higher resolutions. 2018-01-31 19:36:32 +01:00
Henrik Rydgård
5351c9ddb3 gl-render-manager: Support scissored clears, as used by the GL backend. Fixes GT. 2018-01-31 17:07:20 +01:00
Henrik Rydgård
ccdb4d186d gl-render-manager: Fix HW tesselation. Remove 1D texture support, likely no benefit. 2018-01-27 15:10:17 +01:00
Unknown W. Brackets
9945e011c6 GLES: Avoid a shutdown race condition.
Also handle DeviceLost before shutdown better.
2018-01-27 15:10:17 +01:00
Unknown W. Brackets
acb692677b GLES: Accept a color mask for clears.
Otherwise, we end up clearing RGB when we try to only clear alpha, which
is fairly common.

Makes Valkyria Chronicles 3 action mode visible again.
2018-01-27 15:10:17 +01:00
Henrik Rydgård
d0038775e5 TODOs and indentations 2018-01-27 15:10:17 +01:00
Henrik Rydgård
af8e825578 Fix terrible drawing glitches when we do sync readbacks. 2018-01-27 15:10:17 +01:00
Henrik Rydgård
542f9f9ef1 Assorted cleanup 2018-01-27 15:10:17 +01:00
Henrik Rydgård
958078f603 GL render manager: Merge BindInputLayout into BindVertexBuffer. 2018-01-27 15:10:17 +01:00
Henrik Rydgård
f99fa02ba7 Run the depal stuff, seems a bit broken. Add some state filtering. 2018-01-27 15:10:17 +01:00
Henrik Rydgård
d5c6786ead Fix some texture memory bugs (yeah need to make copies..) 2018-01-27 15:10:17 +01:00
Henrik Rydgård
8a1e7347b9 GL render manager: Various fixes and cleanup including a buffered rendering fix, rect primitive fix 2018-01-27 15:10:17 +01:00
Henrik Rydgård
51f467a7b3 Kill off the GL state cache 2018-01-27 15:10:17 +01:00
Henrik Rydgård
f3282dcfda Delete the gl name cache (might resurrect it on the GLQueueRunner side if needed later). Other cleanup and fixes. 2018-01-27 15:10:17 +01:00
Henrik Rydgård
46e1fbb788 Initial texture work. Bugfix indexed drawing 2018-01-27 15:10:17 +01:00
Henrik Rydgård
376d92fcc9 Start messing with the draw engine... 2018-01-27 15:10:17 +01:00
Henrik Rydgård
9340260802 Finish the shader manager (almost) 2018-01-27 15:10:17 +01:00
Henrik Rydgård
b10b24feea GLES device lost/store fixes 2017-12-10 02:05:25 +01:00
Henrik Rydgård
7d0fc9ce65 Rework GL lost-device to work more like Vulkan. Gets rid of gl_lost manager etc. 2017-12-07 15:05:59 +01:00
Unknown W. Brackets
4731a2918c GPU: Use more typesafe shader IDs.
Since they really are fairly distinct, let's make sure we can't mix them
accidentally.
2017-12-02 09:07:27 -08:00
Henrik Rydgård
734d9c494c Fix bug in Vulkan non-buffered where clears could extend outside the frame, since Vulkan clears do not respect scissors. 2017-12-02 11:05:10 +01:00
Henrik Rydgård
713afdfe49 Refactor: Unify DecodeVerts and move ComputeNumVertsToDecode to Common 2017-11-19 12:39:09 +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
17d624d311 Ditch a silly vertex count limit that only makes sense for GLES, so move it there. 2017-11-10 15:59:36 +01:00
Henrik Rydgård
237cca683b Maintain the hashmap from time to time. Fix a bug in count reset on grow. 2017-08-20 13:34:11 +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
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