Commit graph

280 commits

Author SHA1 Message Date
Henrik Rydgård
748b8287a6 Add format string support to Vulkan log-profiler 2021-12-19 22:21:34 +01:00
Henrik Rydgård
80ae4b039c Vulkan: Be more restrictive about texture upscaling on "slow" devices.
Applies the same rules as for software upscaling in this case.

Should fix the stutters seen in #15109
2021-12-16 21:00:49 +01:00
Henrik Rydgård
ff887b0f11 Vulkan: Don't generate mipmaps for huge textures (probably menu backgrounds). Other minor fixes. 2021-12-13 09:13:48 +01:00
Henrik Rydgård
b99a5b6613 Minor fixes 2021-12-12 23:21:28 +01:00
Henrik Rydgård
5adf23280c Turn video upscaling off. 2021-12-12 23:21:28 +01:00
Henrik Rydgård
dc9816ceac Add hardcoded bool toggle for upscaling video, fix log, remove a comment, minor opt 2021-12-12 23:20:57 +01:00
Henrik Rydgård
3833d935f4 Fixes when profiler is disabled.
Typo, validation fix

More fixes

Fix mipgen logging

Disable the logging profiler by default again

Important to use the macro
2021-12-12 12:42:40 +01:00
Henrik Rydgård
9945620504 Switch to macros to easily disable the new profiling. Add missing scope 2021-12-12 12:11:59 +01:00
Henrik Rydgård
55fe21db1e Add a simple GPU profiler to profile individual events, rather than full passes. 2021-12-12 12:11:54 +01:00
Henrik Rydgård
45308a16c0 Vulkan is strict about scissor rect, so let's clamp centrally.
Better than spreading the logic all over.

Fixes #15207
2021-12-08 22:38:01 +01:00
Henrik Rydgård
05429fc34f Vulkan: Correct the max level to generate mipmap calculation 2021-12-07 21:28:58 +01:00
Henrik Rydgård
f991f6a789 Remove the old allocator visualizer. Keep the setting but hide it. Other feedback 2021-11-23 08:55:12 +01:00
Henrik Rydgård
c2f594cc73 Remove the VulkanDeviceAllocator 2021-11-22 18:54:09 +01:00
Henrik Rydgård
1b1e585a35 More integration, use VMA in VulkanTexture 2021-11-22 18:54:09 +01: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
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
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
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
d7ac6aa63d Fix an assortment of minor VK barrier bugs in mostly texture upload 2021-10-08 21:58:03 +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
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
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
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
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
Henrik Rydgård
a40b1dec5f Use Path for fullName in dirlisting. Bugfixes.
Buildfixes

UWP: Buildfix.

headless: Buildfix.

Common: Buildfix.

iOS: Buildfixes.

libretro: Buildfix.

Qt: Buildfix.
2021-05-13 10:39:16 +02:00
Unknown W. Brackets
8a8328c431 Common: Move ColorConv to a more appropriate place. 2021-05-01 11:20:05 -07:00
Henrik Rydgård
4e1bc2b3e0 Further std::string removal 2021-03-13 17:55:07 +01:00
Unknown W. Brackets
82a7a26409 GPU: Look up replaced filtering options. 2021-02-27 17:17:21 -08:00
Henrik Rydgård
2f3bc2d373
Merge pull request #14056 from unknownbrackets/debugger-mem
Track memory allocations and writes for debug info
2021-02-21 10:18:11 +01:00
Unknown W. Brackets
557bf0d963 TexCache: Check for videos rendered as slices.
In a few places, we were checking only the start address of the video.
2021-02-20 20:59:04 -08:00
Unknown W. Brackets
10a77d29ab Debugger: Track texture usage too. 2021-02-15 15:01:23 -08:00
Unknown W. Brackets
e85a8b0f5b Global: Cleanup class init order warnings. 2021-02-15 11:59:45 -08:00
Unknown W. Brackets
f32f89dd90 Global: Remove some unused variables. 2021-02-15 11:59:45 -08:00
Henrik Rydgård
c48bdf7efc Vulkan: Fix image layout issues after compute shader uploads.
We're already in GENERAL so probably not worth to transfer to DST just
to do even more transfers due to the silliness of GenerateMip.

I'm planning to rework the whole texture upload thing to be far more
optimal with some kind of TextureUploadManager

Fixes #13987
2021-01-30 23:09:42 +01:00
Unknown W. Brackets
c630d365cd Vulkan: Allow tex shaders to specify a max scale. 2021-01-28 01:03:02 -08:00
Unknown W. Brackets
97b68e6964 Vulkan: Prevent scaling shader leak.
No need to recreate if they haven't changed.
2021-01-18 13:31:43 -08:00