Commit Graph

1028 Commits

Author SHA1 Message Date
Unknown W. Brackets
f7a029c61f Vulkan: Fix crash on shutdown after device lost.
This happens in SDL every time, apparently.
2021-11-21 05:35:07 -08:00
Unknown W. Brackets
8a5f07b860 Vulkan: Don't cache vulkan_ with draw context.
Since we can get the VulkanContext cheaply from the draw context, it's
easier to make sure things stay up to date.
2021-11-14 15:25:28 -08:00
Unknown W. Brackets
0dc7688838 GPU: Cleanup some extra pointers in fb managers.
These weren't being used / weren't final anyway.
2021-11-14 14:13:48 -08:00
Henrik Rydgård
f58e75e462 Remove unused variable 2021-11-07 16:31:28 +01:00
Henrik Rydgård
43dc54bc4a Comment fix, remove assert 2021-11-07 16:30:47 +01:00
Henrik Rydgård
c60feef55e Remove support for 16-bit textures from the upscaling shader, to shorten it for benefit of mobile GPUs 2021-11-07 16:08:57 +01:00
Henrik Rydgård
281ddc2437 Speed up the 4xBRZ upscaler with 16x and the MMPX one with 4x by not doing redundant work 2021-11-07 15:47:05 +01:00
Henrik Rydgård
6349704924 Switch texture scaling shaders to a fixed scale model, preparing for the next change. 2021-11-07 13:12:28 +01:00
Henrik Rydgård
c111d6cc2d Remove the copy-compute-shader path 2021-11-07 12:55:39 +01:00
Unknown W. Brackets
60bd25582c Vulkan: Remove wide line handling.
No longer used, since we convert lines to triangles now.
2021-10-31 14:47:21 -07:00
Unknown W. Brackets
2718e81c0e GPU: Expand lines to triangles. 2021-10-31 14:46:46 -07:00
Unknown W. Brackets
1d76e55f84 Vulkan: Disable large points feature.
No longer used.
2021-10-31 13:07:03 -07:00
Unknown W. Brackets
b3a8e013f6 GPU: Expand points into triangles for higher res. 2021-10-31 13:06:06 -07:00
Unknown W. Brackets
9fc94a3494 GPU: Skip cull for lines and points.
These already always go through software transform, so make sure we handle
them consistently.  We'll eventually convert to triangles.
2021-10-31 10:54:50 -07:00
Unknown W. Brackets
5128480d74 GPU: Implement cull behavior in sw transform. 2021-10-30 21:04:16 -07:00
Unknown W. Brackets
4ec75de0e7 GPU: Add fog separately for swtransform verts.
At this point, still being processed wrong, this just changes the
attribute structure.
2021-10-30 18:22:54 -07:00
Unknown W. Brackets
159eab5141 GPU: Set projection matrix per backend.
There's a bit of variance, so this keeps the central code clean.
2021-10-30 18:20:36 -07:00
Unknown W. Brackets
f35c7d04bd GPU: Update viewport params before sw transform. 2021-10-30 18:19:16 -07:00
Unknown W. Brackets
3730460bc5 GPU: Move swtransform flippedY to params. 2021-10-30 18:17:22 -07:00
Henrik Rydgård
edc4e69c3d
Merge pull request #15025 from unknownbrackets/texreplace-pop
Allow delayed loading of texture replacements
2021-10-25 23:31:30 +02:00
Unknown W. Brackets
5557950a4b GPU: Allow range cull on Mali/etc.
Previously had been disabled when cullDistance/clipDistance were
unsupported, but it's still helpful without those.  See #15049.
2021-10-23 08:43:14 -07:00
Unknown W. Brackets
83b7b33cfd Replacement: Centralize lookup logic.
And make sure we don't change our minds about using a replacement during a
draw.
2021-10-21 17:05:38 -07:00
Unknown W. Brackets
2356280a9c Replacement: Add structure for delayed loading. 2021-10-21 17:05:38 -07:00
Unknown W. Brackets
d804d35dcb GPU: Enable new guardband culling again. 2021-10-21 15:29:51 -07:00
Unknown W. Brackets
c72d045170 Compat: Ignore DisableRangeCulling with clip/cull.
As long as we support these things and the NAN issue isn't there, we
should be able to safely enable regardless.
2021-10-21 13:23:13 -07:00
Henrik Rydgård
593241b50f
Merge pull request #14996 from hrydgard/vulkan-best-practices
Vulkan "best practices" fixes
2021-10-19 17:57:39 +02:00
Unknown W. Brackets
33598f2e75 GPU: Support clip and cull distances separately.
Older GL devices, and it seems Apple devices, may not support cull.
2021-10-12 20:34:44 -07:00
Unknown W. Brackets
7b00c4a572 GPU: Move Z/W equal hack to bugs from supports.
It's really a bug (might even ideally cap the version?), and we already
have other bugs handled the same way.
2021-10-12 20:34:44 -07:00
Unknown W. Brackets
2271b41d07 Vulkan: Use clip distance only if supported. 2021-10-12 20:34:42 -07:00
Henrik Rydgård
14bf5de83c
Merge pull request #14994 from hrydgard/more-crash-fixes
More crash fixes
2021-10-08 22:56:08 +02:00
Henrik Rydgård
e57770977b We don't use primitiveRestart for anything, let's not enable it. It has costs on some hardware. 2021-10-08 22:22:08 +02:00
Henrik Rydgård
d7ac6aa63d Fix an assortment of minor VK barrier bugs in mostly texture upload 2021-10-08 21:58:03 +02:00
Henrik Rydgård
b426d12a17 More best-practices adjustments 2021-10-08 21:32:40 +02:00
Henrik Rydgård
ddc0f0829b Replaced textures: Don't leak handles on failure, check allocation success 2021-10-08 19:09:43 +02:00
Henrik Rydgård
59ac4d3e27 Vulkan: Rework mipmap generation and its image barrier/layout handling.
Fixes bugs on mobile with texture scaling + auto max quality texturing
(since that generates mipmaps with blits from an image which was just generated from
compute, making proper barriers very critical).
2021-10-05 22:50:49 +02:00
Henrik Rydgård
992ad801e7 Add a crude way to blacklist post/texture shaders from certain vendors.
Use it to work around #14530 for now.
2021-09-28 23:39:52 +02:00
Unknown W. Brackets
c37c078254 Vulkan: Only force 32-bit if needed.
If there are mips already, we can keep 16-bit.
2021-09-13 00:07:01 -07:00
Unknown W. Brackets
d9f62d690a Vulkan: Expand 16-bit textures to generate mips.
When using "Auto Max Quality", we can't use 16-bit formats.
See #14804.
2021-09-13 00:03:42 -07:00
Henrik Rydgård
5dab9994b6 Bezier/Spline: Fix logical error (must flush buffered data before we modify submitType).
Should fix #14774
2021-09-07 23:52:06 +02:00
Henrik Rydgård
e2b0137400 VK: Only autogenerate mipmaps for R8G8B8A8 format textures.
Quickfix for bug with Auto High Quality texture filtering.

Fixes #14804 (good enough for now at least).
2021-09-07 23:41:03 +02:00
Henrik Rydgård
1df31e9304 Fix windows menus for the new tex filtering options. 2021-09-05 23:54:41 +02:00
Henrik Rydgård
6b76bcf070 Add new texture filtering "Auto Max Quality" that tweaks texture filtering for best quality.
It does this by enforcing mipmapping and minification filters, and
always autogenerates mipmaps and enforces anisotropic filtering for all
modes (if that's separately enabled).

This looks nice and flicker free in most games without any additional
tweaking, including GTA and Burnout which have long been painfully
flickery in the distance due to undersampling.

Needs a bit more testing before merge, maybe.

Fixes #13888
2021-09-03 00:14:58 +02:00
Bram Verweij
a31cbe42d2 Rename namespace to PPSSPP_VK, remove indentation 2021-08-21 12:39:15 +02:00
Bram Verweij
cc00a4132d Prevent dlopen collisions between ppsspp_libretro.so and libvulkan.so 2021-08-20 11:22:57 +02:00
Henrik Rydgård
bd15ae4f75 Fix bug in homebrew store with files with "." in their names.
Also, move the homebrew store button to the top bar instead of the
bottom of the list.
2021-07-12 11:55:15 +02:00
Henrik Rydgård
deee9f9720 Unify the Vulkan format definitions / swizzles
To make the next attempt at #14602 easier.
2021-07-11 11:26:40 +02:00
Henrik Rydgård
3595e092c9 Turn off all 16-bit formats if B5G6R5 format is not available.
Works around #14602 for now.
2021-07-10 23:33:46 +02:00
Henrik Rydgård
7e048dbbff Revert "Merge pull request #14588 from hrydgard/vk-correct-565-format"
This reverts commit 43c16f1ea2, reversing
changes made to 25cfb92a9c.
2021-07-10 20:01:16 +02:00
Henrik Rydgård
4c9b5ada0f Address feedback 2021-07-09 21:09:44 +02:00
Henrik Rydgård
9a2e220e0d Vulkan: Use the mandatory-support RGB565 format and not the opposite one.
Had apparently misread the spec.

Fixes validation (and probably rendering) errors on Linux/Intel.

https://www.khronos.org/registry/vulkan/specs/1.2/html/chap33.html#features-required-format-support
2021-07-07 19:07:29 +02:00