Commit graph

5839 commits

Author SHA1 Message Date
Henrik Rydgård
8c2e318416 OpenGL dataformat cleanup - pass Draw::DataFormat to the GLRenderManager.
Avoids triple GLenum all over the place, and also clearly shows that the
mapping is wrong.
2019-10-24 22:41:41 +02: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
ae286aef86 Vulkan+SoftwareRenderer: Fix screen rotation on Android.
(Missed this because software rendering is normally disabled on Android)
2019-10-22 22:08:21 +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
LunaMoo
c23f11cf0a Change Bloom Hack aggressive detection to include GOW games bloom. 2019-10-19 19:10:39 +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
360e138c2c
Merge pull request #12372 from unknownbrackets/curves
GPU: Generate normals for curves with lighting
2019-09-29 08:17:35 +02:00
Unknown W. Brackets
5871ab0538 UI: Stop caching the draw context in coreParam.
This is possibly getting outdated in some paths of graphics reinit, and
then causing crashes.  Let's just always get it from the graphicsContext.
2019-09-28 21:58:15 -07:00
Unknown W. Brackets
cba6a63058 GPU: Generate normals for curves with lighting.
Improves #12354.  This needs to happen even if the vertex has no normals.
2019-09-28 15:08:37 -07:00
Unknown W. Brackets
bdd2029623 Core: Fix memory range guard check.
Was allowing sizes with the high bits set, which could cause all kinds of
weird issues and crashes.
2019-09-28 08:40:41 -07:00
Henrik Rydgård
9e7625c74b Workaround for a crash found in #12358 on older devices 2019-09-28 01:11:06 +02:00
Henrik Rydgård
9c4649d3ac Assorted cleanup 2019-09-27 23:25:30 +02:00
Henrik Rydgård
9d65ff8873 Silence a few warnings. 2019-09-24 23:10:18 +02:00
Henrik Rydgård
e723594133 Vulkan: Fix shutdown crash accidentally caused by #12324 2019-09-17 14:47:38 +02:00
Henrik Rydgård
c7798715a5 Fix issue preventing video to work correctly in Digimon. Fixes #12186
(due to BlockTransferAllowCreateFB not updating the framebuffer range
speedhack).
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
d8db8ecfcc Revert "GPU: Download CLUTs when loading at 256 stride."
This reverts commit dc03050730.
2019-08-23 00:11:13 +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
Unknown W. Brackets
3e51fc5a89 GPU: Avoid some unused var/func warnings. 2019-08-17 12:01:22 -07: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
09b5546828 Apply the same Mali range culling "fix" in OpenGL. 2019-08-09 00:09:06 +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
Unknown W. Brackets
748b33a561 GPU: Allow upload to temp resized framebuf.
Fixes #12045.
2019-07-28 05:31:49 -07: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
ba09e7fb32
Merge pull request #12160 from unknownbrackets/ge-pause
GPU: Forget pause signal on new list
2019-07-07 23:23:34 +02:00
Unknown W. Brackets
c87d5a637b GPU: Forget pause signal on new list.
Otherwise, when the list gets executed again, we just pause it when it
finishes instead of letting it finish properly.
2019-07-07 13:10:28 -07:00
Henrik Rydgård
82119eda9a
Merge pull request #12157 from unknownbrackets/travis-win
Travis: Build Windows on Travis too
2019-07-07 20:17:40 +02:00