Commit graph

785 commits

Author SHA1 Message Date
Unknown W. Brackets
5009698cc0 Core: Use a shared_ptr for i18n categories.
This does not make them thread safe, but it reduces the chances of a crash
a bit (see #12594.)
2020-02-09 07:35:16 -08:00
Henrik Rydgård
92a1395cd0 Apply viewport before SoftwareTransform so flipping can be checked 2020-01-26 15:30:20 +01:00
Henrik Rydgård
714205d699 Vulkan: Enable renderpass merging for all games (was introduced in 1.9 for GoW games). A number of other games can also benefit. 2019-11-30 22:44:59 +01:00
Henrik Rydgård
767b1e45b2 Fix the build - there's a Vec3 name collision, fixed it using a namespace. 2019-10-22 22:58:10 +02:00
Henrik Rydgård
c7b3a08cf3 Vulkan: Add checks so we don't try to write NULL objects to a descriptor set.
(Shouldn't happen, but bad rendering is better than a crash in descriptor writing)
2019-10-20 17:05:42 +02:00
Henrik Rydgård
1e3711ee66 Vulkan blend factor: Bugfix and minor optimization 2019-10-13 21:17:29 +02:00
Henrik Rydgård
0b17dd04e6
Merge pull request #10393 from hrydgard/compute-upload
Vulkan: Texture upload through compute, experimental texture scaling too
2019-10-08 09:11:25 +02:00
Henrik Rydgård
e67a0606ef Vulkan: Always write gl_PointSize, fixes #12364. Remove unnecessary predeclaration of gl_Position.
Replaces #12393.

The predeclaration used to be required by early versions of glslang but is no longer. Since the GLSL compiler is controlled by us, we don't need to fear incompatibilities.
2019-10-07 19:57:13 +02:00
Unknown W. Brackets
be5d93d5f1 Vulkan: Compile compute shaders only if enabled. 2019-09-30 00:39:00 -07:00
Unknown W. Brackets
41a6831333 Vulkan: Add a setting for hardware scaling. 2019-09-30 00:35:50 -07:00
Unknown W. Brackets
7fa05a3181 Vulkan: Initial 16-bit texture shader decode. 2019-09-30 00:35:14 -07:00
Unknown W. Brackets
6613312ecc Vulkan: Add 4xbrz texture shader. 2019-09-30 00:34:53 -07:00
Henrik Rydgård
eeec18c018 Make the barrier a bit more focused. Up some limits. 2019-09-29 10:55:49 -07:00
Henrik Rydgård
080f34acfe Need a barrier on Mali. Strange that validation didn't warn... 2019-09-29 10:54:55 -07:00
Henrik Rydgård
e9b2af7fc7 In the computeUpload path, use a shader intrinsic to unpack the color. 2019-09-29 10:54:33 -07:00
Henrik Rydgård
101019d5cd Fix build error on 64-bit android 2019-09-29 10:53:53 -07:00
Henrik Rydgård
a355f49c91 Also experiment with a "copy shader" that just does raw data manipulation into GPU local memory, then copies to image from there. 2019-09-29 10:39:12 -07:00
Henrik Rydgård
9ed66001c6 Use a plain compute shader for RGBA8888 texture uploads, as a proof of concept. 2019-09-29 10:27:50 -07:00
Henrik Rydgård
e6bec3e555 Vulkan: Add simple manager for compute shaders that upload data to images. 2019-09-29 10:24:48 -07:00
Henrik Rydgård
e723594133 Vulkan: Fix shutdown crash accidentally caused by #12324 2019-09-17 14:47:38 +02:00
Henrik Rydgård
6d2be0d716
Merge pull request #12324 from unknownbrackets/vulkan-cache
Vulkan: Clear caches when deleting shaders
2019-09-15 20:00:06 +02:00
Unknown W. Brackets
59062ca7bc Vulkan: Clear caches when deleting shaders.
As noticed by iota97 in #12317, we're not clearing these.  If a pointer
gets reused by the Vulkan driver, we have to be careful not to reuse a
pipeline.
2019-09-14 11:23:12 -07:00
Henrik Rydgård
02a96e29bb Fix a comment 2019-09-09 00:52:23 +02:00
Henrik Rydgård
70ec327b40 Vulkan: Slim down and rename the Mali hack. 2019-09-09 00:43:31 +02:00
Henrik Rydgård
f76adfd760 Vulkan ARM mali Z hack: Modify the matrix instead of the shader. 2019-09-09 00:09:57 +02:00
Henrik Rydgård
0462c01228 Workaround ARM Mali depth hardware bug. Fixes #11937
When triangles coincide with the Z=1 plane in specific ways, triggered
by Burnout Legends' sky for example, the depth buffer gets corrupted.

This is worked around here by slightly rescaling Z. This type of
workaround is recommended by ARM driver engineers.

Ugly but what can you do when the hardware is bugged. I've done quick
tests on a number of games with no issues.
2019-09-08 23:44:26 +02:00
Henrik Rydgård
025a9f4dae Improve Mali driver version detection 2019-09-04 21:46:07 +02:00
Henrik Rydgård
7ad10ff0ef Vulkan profiling vis bugfix: Restore font scale after drawing. 2019-08-21 23:11:01 +02:00
Henrik Rydgård
93412aff3b Vulkan: Automatically merge render passes to the same target when possible.
Should speed things up a bit on mobile in some games that do stupid
things like GoW. Currently only enabled in GoW, but plan to enable this
globally as it should be quite cheap when nothing is detected.
2019-08-21 20:32:23 +02:00
Henrik Rydgård
e3f1e563f2 Improve renderpass profiling descriptions a little 2019-08-21 18:31:01 +02:00
Henrik Rydgård
653afeb7ab Vulkan: Implement basic integrated GPU profiling.
Currently simply measures the total GPU time of the frame. Will later be
extended to get the execution time of individual render passes.
2019-08-21 00:03:00 +02:00
Henrik Rydgård
cf06b4a947 Vulkan: Image views: The driver is probably smart enough to recognize a no-swizzle, but let's use the proper method. 2019-08-12 23:09:47 +02:00
Henrik Rydgård
caabc9023f Vulkan: Set all four coordinates to NaN instead of just W. Fixes range culling on ARM. Fixes #11999. 2019-08-08 23:14:20 +02:00
Henrik Rydgård
96a15cf525 Fix the indirect postprocessing path. Fixes #12133 (but see the issue for a secondary bug). 2019-08-04 18:01:36 +02:00
Henrik Rydgård
3916f8d7b6 Add a little reminder to self with a link to an interesting article. 2019-07-23 17:45:52 +02:00
Henrik Rydgård
b5ad92b9ef Avoid rotating the image when DrawActiveTexture is used for other things than drawing to the backbuffer. 2019-06-21 14:00:02 +02:00
Henrik Rydgård
e943724905 Vulkan: Apply the desired pretransform when drawing to the backbuffer.
This should save a lot of memory bandwidth on mobile devices that can't
rotate images natively in the display engine. Fixes #12099.
2019-06-21 09:38:51 +02:00
vnctdj
0ec0c6eb92 Remove the related #include
Following https://github.com/hrydgard/ppsspp/pull/12030
Oops, I forgot to check if it was still needed...
2019-05-12 16:38:37 +02:00
vnctdj
80807675f1 Delete 2 unused i18n category pointer declarations 2019-05-11 23:47:37 +02:00
Henrik Rydgård
b0048525a1
Merge pull request #11884 from hrydgard/vulkan-buffer-usage
Vulkan: Tighten up push buffer usage flags a little bit.
2019-03-18 11:17:49 +01:00
Unknown W. Brackets
c5b844cc98 GPU: Respect stencil write mask on clear.
Actually identified this for the softgpu in #11319, but applying it for
RGBA is a problem in most renderers.  Forgot to at least apply it to
stencil.

Fixes #11901.
2019-03-16 19:42:18 -07:00
Henrik Rydgård
06b04f65a0 Vulkan: Narrow down buffer usage flags a little bit. 2019-03-14 12:41:39 +01:00
Henrik Rydgård
3445f39f3f Survive pipeline creation failure on Vulkan. Makes Burnout playable on Pocophone... Sigh.
Minor cleanups.
2019-03-11 16:40:10 +01:00
Henrik Rydgård
8e7da3fef4 Disable vertex range culling when the depthrange hack is enabled. Temporary workaround for #11576. 2019-02-26 16:07:11 +01:00
Henrik Rydgård
593c3139bd Ignore DisableAccurateDepth on Adreno as well. Fixes #11557 2019-02-26 15:21:21 +01:00
Henrik Rydgård
bf2bbd891c Back out wrong change. Leaving better error handling for later. 2019-02-25 15:15:04 +01:00
Henrik Rydgård
c1427f5981 VulkanImage: Fix issue where we'd try to free dedicated allocations from the allocator_ instead of Vulkan directly.
Snuck in some minor cleanups.
2019-02-24 22:23:26 +01:00
Henrik Rydgard
5aed2a2cee Gate fewer effects behind "Disable slow framebuffer effects". 2019-02-08 15:02:31 +01:00
Henrik Rydgard
9736bc431a The block transfer setting should not affect clearing memory behind a render target, especially since that's already gated behind a compat flag. 2019-02-08 14:46:16 +01:00
Henrik Rydgard
e30daa8027 Remove unused API, assorted cleanup.
No longer enable the geometry shader feature, no plans to use it.
2019-02-05 21:31:43 +01:00