Commit Graph

200 Commits

Author SHA1 Message Date
bunnei 4c38220a64 android: native: Add support for custom Vulkan driver loading. 2023-06-03 00:05:31 -07:00
Billy Laws 158a1896ec Implement scaled vertex buffer format emulation
These formats are unsupported by mobile GPUs so they need to be emulated in shaders instead.
2023-06-03 00:05:31 -07:00
Billy Laws 206f1304d6 Disable push descriptors on adreno drivers
Regular descriptors are around 1.5x faster to update.
2023-06-03 00:05:31 -07:00
Billy Laws 26bdecbf45 Disable VK_EXT_extended_dynamic_state on mali 2023-06-03 00:05:31 -07:00
Liam f7a3f1ddf4 externals: add adrenotools for bcenabler 2023-06-03 00:05:28 -07:00
bunnei 2972a3ccc7 video_core: vulkan_device: Device initialization for Adreno. 2023-06-03 00:05:28 -07:00
Matías Locatti d6db422098
Merge pull request #10414 from liamwhite/anv-push-descriptor
vulkan_device: Enable VK_KHR_push_descriptor on newer ANV
2023-05-26 17:36:37 -03:00
Fernando S 76f6388969
Merge pull request #10398 from liamwhite/bcn
video_core: add ASTC recompression
2023-05-24 03:55:45 +02:00
Liam 415c78b87c textures: add BC1 and BC3 compressors and recompression setting 2023-05-23 12:54:40 -04:00
Liam 8bba9f7dea vulkan_device: Enable VK_KHR_push_descriptor on newer ANV 2023-05-22 19:53:20 -04:00
scorpion81 f8e7b44d28
Limit the device access memory to 4 GB
Hardly limiting the device access memory to 4 GB for integrated vulkan devices here. This works for the Steam Deck in order not to go above 4 GB VRAM usage any more (above this value the likelihood to crash when the RAM exceeds 12 GB as well raises).

But there will be perhaps a detection mechanism necessary for detecting the real memory limit for integrated vulkan devices. Those likely might have small limits anyway, but what about integrated GPUs on machines with > 16 GB RAM, aka larger amounts ?
2023-05-22 16:48:55 +02:00
lat9nq c1a8a508bc vulkan_device: Disable VK_KHR_push_descriptor on ANV
Mesa commit ff91c5ca42bc80aa411cb3fd8f550aa6fdd16bdc breaks
VK_KHR_push_descriptor usage on ANV drivers 22.3.0, so disable it
and allow games to boot.
2023-05-17 22:19:57 -04:00
bunnei 9d4a2de72b
Merge pull request #10262 from liamwhite/depth-clamp
vulkan_common: disable depth clamp dynamic state for older radv
2023-05-17 12:19:03 -07:00
Liam 2be751100b vulkan_device: reserve extra memory to prevent swaps 2023-05-14 16:49:59 -04:00
Liam 856838f7ce vulkan_common: disable depth clamp dynamic state for older radv 2023-05-13 00:37:17 -04:00
Liam 4df49631de vulkan: disable turbo when debugging tool is attached 2023-05-02 18:14:57 -04:00
Liam da83afdeaf vulkan: disable extendedDynamicState3ColorBlendEquation on radv 2023-03-15 15:55:07 -04:00
Liam 600f325d87 general: fix spelling mistakes 2023-03-12 11:33:01 -04:00
Liam ec6ee04c64 vulkan_common: disable vertexInputDynamicState on unsupported driver 2023-03-01 22:48:12 -05:00
TellowKrinkle eaf425bd32 MoltenVK: restrict number of vertex attributes/bindings to 16 2023-01-09 19:01:09 -05:00
Liam 279005448a vulkan_device: refactor feature testing 2023-01-09 16:12:16 -05:00
Narr the Reg 432d48d9c8
Merge pull request #9570 from liamwhite/less-clock-boost
renderer_vulkan: disable clock boost on unvalidated devices
2023-01-07 10:41:37 -06:00
Liam 444b25bae1 vulkan_device: avoid attempt to access empty optional 2023-01-06 21:23:21 -05:00
Liam 2e4dde12c7 renderer_vulkan: disable clock boost on unvalidated devices 2023-01-06 19:07:47 -05:00
liamwhite 020dbcdbc7
Merge pull request #9552 from liamwhite/turbo
vulkan: implement 'turbo mode' clock booster
2023-01-06 09:59:59 -05:00
Liam 301e9bbc03 vulkan: implement 'turbo mode' clock booster 2023-01-04 22:22:01 -05:00
Liam 66ae79de13 renderer_vulkan: implement fallback path for null descriptors 2023-01-04 22:14:01 -05:00
Fernando Sahmkow ddbf851ef6 Vulkan: Update blacklisting to latest driver versions. 2023-01-03 21:16:43 -05:00
Liam f9c6d39a6c vulkan_common: blacklist radv from extended_dynamic_state2 on drivers before 22.3.1 2023-01-01 16:43:58 -05:00
Liam 4814d87385 video_core: fix build 2023-01-01 16:43:58 -05:00
Fernando Sahmkow d09aa0182f MacroHLE: Final cleanup and fixes. 2023-01-01 16:43:58 -05:00
Fernando Sahmkow d33251db93 Vulkan: Implement Dynamic State 3 2023-01-01 16:43:58 -05:00
Fernando Sahmkow f800e485c9 Vulkan Implement Dynamic State 2 LogicOp and PatchVertices 2023-01-01 16:43:58 -05:00
Fernando Sahmkow c897c55e3c Vulkan: Implement Dynamic States 2 2023-01-01 16:43:57 -05:00
Fernando Sahmkow 0f89828073 MacroHLE: Implement DrawIndexedIndirect & DrawArraysIndirect. 2023-01-01 16:43:57 -05:00
Fernando Sahmkow a5a94f52ff MacroHLE: Add MultidrawIndirect HLE Macro. 2023-01-01 16:43:57 -05:00
liamwhite 5da72a891f
Merge pull request #7450 from FernandoS27/ndc-vulkan
Vulkan: Add support for VK_EXT_depth_clip_control.
2022-12-17 16:08:10 -05:00
Narr the Reg 9ff891ce71
Merge pull request #9431 from liamwhite/sixty-five-oh-two
vulkan_common: declare storageBuffer8BitAccess
2022-12-15 17:52:16 -06:00
FernandoS27 0104e28fe4 Vulkan: Add support for VK_EXT_depth_clip_control. 2022-12-13 21:39:18 -05:00
Liam 4fce72c902 vulkan_common: declare storageBuffer8BitAccess 2022-12-13 18:28:50 -05:00
yzct12345 f6868ae4dd Fix validation errors on less compatible Intel GPU 2022-12-12 20:53:05 -05:00
Morph bfdd512787
Merge pull request #9365 from liamwhite/val
vulkan_common: quiet some validation errors
2022-12-06 21:08:14 -05:00
Liam 7e7a23363a vulkan_common: further initialization tweaks 2022-12-05 22:06:35 -05:00
Liam 157981cac5 vulkan_common: add feature test for shaderDrawParameters 2022-12-04 10:55:13 -05:00
Liam 18831e0933 vulkan_common: clean up extension usage 2022-12-04 10:55:13 -05:00
Liam f23f875dd8 vulkan_common: ensure all mandatory features are tested in feature report 2022-12-04 10:55:13 -05:00
Liam 06a67d2bbd vulkan_common: unsuffix 16-bit storage feature test structure 2022-12-04 10:55:13 -05:00
Liam bbc1809951 vulkan_common: unsuffix timeline semaphore feature test structure 2022-12-04 10:55:13 -05:00
Liam a9633ba8b2 vulkan_common: add logicOp to feature report 2022-12-04 10:55:13 -05:00
Liam 7fc6514be1 vulkan_common: promote host query reset usage to core 2022-12-04 10:55:13 -05:00
Liam e44a804ec7 vulkan_common: promote descriptor update template usage to core 2022-12-04 10:55:13 -05:00
Liam a948ab3e48 vulkan_common: promote timeline semaphore usage to core 2022-12-04 10:55:13 -05:00
liamwhite 22aff09b33
Merge pull request #9289 from liamwhite/fruit-company
general: fix compile for Apple Clang
2022-12-03 12:09:21 -05:00
Liam be05cb640c vulkan_common: quiet some validation errors 2022-11-30 19:18:05 -05:00
Liam 2956a33463 Vulkan: update initialization
Co-authored-by: bylaws <bylaws@users.noreply.github.com>
2022-11-27 14:58:28 -05:00
Liam 9737615948 general: fix compile for Apple Clang 2022-11-22 22:22:28 -05:00
Liam c40cec5e58 renderer_vulkan: add format fallbacks for R16G16B16_SFLOAT, R16G16B16_SSCALED, R8G8B8_SSCALED 2022-08-02 18:39:33 -04:00
lat9nq d41ffb592c
Revert "vulkan_device: Block AMDVLK's VK_KHR_push_descriptor" 2022-06-29 16:35:06 -04:00
Liam 084d7d6b01 common: Change semantics of UNREACHABLE to unconditionally crash 2022-06-13 20:09:00 -04:00
bunnei a9beb4746e
Merge pull request #8379 from lat9nq/amd-push-desc-workaround
vulkan_device: Block AMDVLK's VK_KHR_push_descriptor
2022-05-25 13:07:39 -07:00
lat9nq 3a8c2ae328 vulkan_device: Workaround extension bug
A bug occurs in yuzu when VK_KHR_workgroup_memory_explicit_layout is
available but 16-bit integers are not supported in the host driver.

Disable usage of the extension when this case arises.
2022-05-25 01:22:15 -04:00
lat9nq 7f53cd1e96 vulkan_device: Block AMDVLK's VK_KHR_push_descriptor
Recent AMD Vulkan drivers (22.5.2 or 2.0.226 for specifically Vulkan)
have a broken VK_KHR_push_descriptor implementation that causes a crash
in yuzu. Disable it for the time being.
2022-05-25 01:17:48 -04:00
Morph 99ceb03a1c general: Convert source file copyright comments over to SPDX
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-23 05:55:32 -04:00
Fernando Sahmkow f783883bf8 video_core: implement formats for N64 emulation 2022-04-14 11:06:27 -04:00
Andrea Pappacoda 0c214cb5b9
fix: typos 2022-04-02 16:34:07 +02:00
bunnei 9b52ee4558
Merge pull request #8076 from ameerj/nv-vk-msaa-scale
Vulkan: Use 3D helpers for MSAA scaling on NV drivers 510+
2022-03-30 23:00:44 -07:00
Fernando Sahmkow 9872d4bc4f GC: Address Feedback. 2022-03-25 03:05:56 +01:00
Fernando Sahmkow ecb3342145 Garbage Collection: Redesign the algorithm to do a better use of memory. 2022-03-25 01:51:51 +01:00
ameerj 8d45dd3b73 Vulkan: Use 3D helpers for MSAA scaling on NV drivers 510+
Nvidia Vulkan drivers 510+ crash when blitting MSAA images. Fall-back to 3D scale helpers for MSAA image scaling.
2022-03-23 23:30:17 -04:00
ameerj 1bc7d61b57 video_core: Reduce unused includes 2022-03-19 15:01:31 -04:00
Ameer J 5f8d6bc504 vulkan_device: Blacklist RADV on RDNA2 from VK_EXT_vertex_input_dynamic_state
RDNA2 devices running under the RADV driver were crashing when VK_EXT_vertex_input_dynamic_state was enabled.

Blacklisting these devices until a proper fix is established.
2022-02-25 23:09:03 -05:00
voidanix 7712e46d64
vulkan_device: fix missing format in ANV
Currently Mesa's ANV driver does not support
VK_FORMAT_B5G6R5_UNORM_PACK16, implement an alternative for it.
2022-02-21 09:21:41 +01:00
Georg Lehmann d15814d39f vulkan_device: Fix sType for VkPhysicalDeviceShaderAtomicInt64Features 2022-01-19 19:48:46 +01:00
ameerj f9e0681d59 vk_texture_cache: Use 3D scale helpers for MSAA texture scaling on Intel Windows drivers
Fixes a crash when scaling MSAA textures in titles such as Sonic Colors Ultimate.
2021-12-23 22:35:19 -05:00
Fernando Sahmkow 6c00151d17 Vulkan: Fix the checks for primitive restart extension. 2021-12-18 07:17:08 +01:00
Fernando Sahmkow 14d2c77f91 Vulkan: implement Logical Operations. 2021-12-18 06:52:28 +01:00
Fernando Sahmkow 6430fc29a9 Vulkan: Implement VK_EXT_primitive_topology_list_restart 2021-12-18 05:47:48 +01:00
Morph 47a724780f renderer_vulkan: Add R16G16_UINT
- Used by Immortals Fenyx Rising
2021-12-08 10:55:11 -05:00
Morph dc61b7045b renderer_vulkan: Implement S8_UINT stencil format
It should be noted that on Windows, only nvidia gpus support this format natively as of this commit.
2021-11-18 00:05:51 -05:00
Feng Chen 70d51f72ec
vulkan_device: Add missing vulkan image format R5G6B5 in GetFormatProperties
- Used by Dragon Quest Builders
2021-11-05 10:31:40 -04:00
Ameer J 494e34af6a
Merge pull request #7070 from FernandoS27/want-you-bad
Vulkan Rasterizer: Correct DepthBias/PolygonOffset on Vulkan.
2021-10-23 18:02:23 -04:00
ameerj 1e1ecca691 vk_texture_cache: Disable cube compatibility flag on non-mesa AMD GCN4 and earlier
Fixes rainbow textures on BOTW.
2021-09-23 19:40:53 -04:00
Fernando Sahmkow 60a3980561 Vulkan Rasterizer: Correct DepthBias/PolygonOffset on Vulkan. 2021-09-23 03:49:10 +02:00
ameerj e3c153efa4 vulkan_device: Reorder Float16Int8 declaration
This variable was going out of scope before its usage in the vulkan device creation, causing a crash on very specific drivers.
2021-09-16 00:54:24 -04:00
ameerj 5601e1cb00 Revert "Merge pull request #7006 from FernandoS27/a-motherfucking-driver"
This reverts commit 62e88d0e74, reversing
changes made to edf3da346f.
2021-09-16 00:51:22 -04:00
Morph d86a9b9a4b
Merge pull request #6943 from FernandoS27/omae-wa-mou-shindeiru
Vulkan: Disable VK_EXT_SAMPLER_FILTER_MINMAX in GCN AMD
2021-09-13 17:33:15 -04:00
Fernando Sahmkow 7a712da2b3 Vulkan: Disable VK_EXT_SAMPLER_FILTER_MINMAX in GCN AMD since it's broken. 2021-09-13 23:29:57 +02:00
Morph 62e88d0e74
Merge pull request #7006 from FernandoS27/a-motherfucking-driver
Vulkan: Blacklist Int8Float16 Extension on AMD on driver 21.9.1
2021-09-13 17:25:56 -04:00
Morph fde9b84b21
Merge pull request #6944 from FernandoS27/dear-drunk-me
Vulkan/Descriptors: Increase sets per pool on AMD propietary driver.
2021-09-13 17:20:07 -04:00
Fernando Sahmkow e7c8a0bb23 Vulkan: Blacklist Int8Float16 Extension on AMD on driver 21.9.1 2021-09-13 23:17:37 +02:00
Fernando Sahmkow e7ca37b1e5 Vulkan/Descriptors: Increase sets per pool on AMFD propietary driver. 2021-09-13 23:09:18 +02:00
ameerj 27f8f3333f vulkan_device: Enable VK_KHR_swapchain_mutable_format if available
Silences validation errors when creating sRGB image views of linear swapchain images
2021-08-29 02:03:36 -04:00
ameerj 4d535799eb vulkan_device: Add a check for int8 support
Silences validation errors when shaders use int8 without specifying its support to the API
2021-08-24 21:22:41 -04:00
ReinUsesLisp 3b006f4fe2 renderer_vulkan: Add setting to log pipeline statistics
Use VK_KHR_pipeline_executable_properties when enabled and available to
log statistics about the pipeline cache in a game.

For example, this is on Turing GPUs when generating a pipeline cache
from Super Smash Bros. Ultimate:

Average pipeline statistics
==========================================
Code size:       6433.167
Register count:    32.939

More advanced results could be presented, at the moment it's just an
average of all 3D and compute pipelines.
2021-07-27 21:29:24 -03:00
ReinUsesLisp f6796cad9c vulkan_device: Blacklist Volta and older from VK_KHR_push_descriptor
Causes crashes on Link's Awakening intro. It's hard to debug if it's our
fault due to bugs in validation layers.
2021-07-22 21:51:40 -04:00
ReinUsesLisp be54aad1c4 maxwell_to_vk: Add R16_SNORM 2021-07-22 21:51:40 -04:00
lat9nq 55233c2861 vulkan_device: Add missing include algorithm 2021-07-22 21:51:40 -04:00
ameerj 7277d7fe96 vulkan_device: Blacklist ampere devices from float16 math 2021-07-22 21:51:40 -04:00
ReinUsesLisp 57171b23f9 vulkan_device: Enable VK_EXT_extended_dynamic_state on RADV 21.2 onward 2021-07-22 21:51:40 -04:00
ReinUsesLisp f94f0be521 vk_graphics_pipeline: Implement smooth lines 2021-07-22 21:51:39 -04:00