Commit graph

6714 commits

Author SHA1 Message Date
GPUCode 272916eeaf renderer_vulkan: Fix some missing view formats
* Many times the format itself wouldn't have been added to the list causing device losses for nvidia GPUs

* Also account for ASTC acceleration storage views
2023-07-01 16:03:35 +03:00
GPUCode 95cefaf993 renderer_vulkan: Add support for VK_KHR_image_format_list 2023-07-01 16:03:29 +03:00
Steveice10 e146a00345 vulkan: Use newer VK_EXT_metal_surface to create surface for MoltenVK. 2023-06-30 23:46:03 -07:00
Morph 5a09fa5012 maxwell_dma: Specify dst_operand.pitch instead of a temp var 2023-06-30 21:49:59 -04:00
Morph 310b6cf4af general: Use ScratchBuffer where possible 2023-06-30 21:49:59 -04:00
Fernando S a10bdaf934
Merge pull request #10953 from FernandoS27/oh-oopsies-yfc
Texture cache: Fix YFC regression due to code testing
2023-06-30 20:25:09 +02:00
Fernando S 9252ad4e10
Merge pull request #10956 from FernandoS27/pikmin-another-game-ill-hate
AccelerateDMA: Don't accelerate 3D texture DMA operations
2023-06-30 09:37:07 +02:00
bunnei ddcd89afd4 video_core: vulkan_device: Scope S8Gen2 checks to just Qualcomm. 2023-06-29 18:41:38 -07:00
bunnei dfa040502a video_core: vulkan_device: Fix S8Gen2 dynamic state checks. 2023-06-29 17:37:42 -07:00
Fernando Sahmkow 596a6132b9 AccelerateDMA: Don't accelerate 3D texture DMA operations 2023-06-29 17:23:29 +02:00
Fernando Sahmkow b62121fd60 Texture cache: Fix YFC regression due to code testing 2023-06-29 11:58:45 +02:00
Matías Locatti ed93cbd462
Blacklist EDS3 blending from new AMD drivers 2023-06-28 20:10:27 -03:00
Fernando Sahmkow da440da9f5 Memory Tracking: Optimize tracking to only use atomic writes when contested with the host GPU 2023-06-28 21:32:45 +02:00
Fernando Sahmkow 47d0d292d5 MemoryTracking: Initial setup of atomic writes. 2023-06-28 19:34:21 +02:00
GPUCode ddcc958336 renderer_vulkan: Prevent crashes when blitting depth stencil 2023-06-27 18:00:09 -07:00
GPUCode eac46ad7ce video_core: Add BCn decoding support 2023-06-27 18:00:09 -07:00
GPUCode b8c96cee5f renderer_vulkan: Add more feature checking 2023-06-27 18:00:09 -07:00
GPUCode 220a42896d renderer_vulkan: Don't assume debug tool with debug renderer
* Causes crashes because mali drivers don't support debug utils
2023-06-27 18:00:09 -07:00
GPUCode 1522b95658 renderer_vulkan: Bump minimum SPIRV version
* 1.3 is guaranteed on all 1.1 drivers
2023-06-27 18:00:09 -07:00
GPUCode c339af37a7 renderer_vulkan: Respect viewport limit 2023-06-27 18:00:09 -07:00
GPUCode a9b44d37e1 renderer_vulkan: Don't add transform feedback flag if unsupported 2023-06-27 18:00:09 -07:00
GPUCode 72e7f5b4dd renderer_vulkan: Add suport for debug report callback 2023-06-27 18:00:09 -07:00
liamwhite 2b3bfafb9e
Merge pull request #10867 from Kelebek1/dma_safe
Use safe reads in DMA engine
2023-06-27 11:21:47 -04:00
liamwhite c6959449d1
Merge pull request #10473 from GPUCode/vma
Use vulkan memory allocator
2023-06-27 11:21:36 -04:00
GPUCode b6c6dcc576 externals: Use cmake subdirectory 2023-06-26 18:59:24 +03:00
Kelebek1 ffbaf574ca Use safe reads in DMA engine 2023-06-26 11:34:02 +01:00
ameerj 4f160633d3 OpenGL: Limit lmem warmup to NVIDIA
🐸
2023-06-25 19:06:51 -04:00
ameerj 405eae3734 shaders: Track local memory usage 2023-06-25 18:59:33 -04:00
ameerj 82107b33a2 OpenGL: Add Local Memory warmup shader 2023-06-25 18:43:23 -04:00
liamwhite a674022434
Merge pull request #10859 from liamwhite/no-more-atomic-wait
general: remove atomic signal and wait
2023-06-23 09:27:14 -04:00
GPUCode 75fb29e08e vulkan_common: Remove required flags
* Allows VMA to fallback to system RAM instead of crashing
2023-06-22 20:03:12 +03:00
Liam 1586f1c0b1 general: remove atomic signal and wait 2023-06-22 09:25:23 -04:00
Kelebek1 5da70f7197 Remove memory allocations in some hot paths 2023-06-22 08:05:10 +01:00
bunnei e3122c5b46
Merge pull request #10086 from Morph1984/coretiming-ng-1
core_timing: Use CNTPCT as the guest CPU tick
2023-06-21 21:12:46 -07:00
bunnei 7eb7d56b1b
Merge pull request #10777 from liamwhite/no-barrier
video_core: optionally skip barriers on feedback loops
2023-06-21 21:10:08 -07:00
liamwhite f1e12e3b08
Merge pull request #10818 from vonchenplus/render_target_samples
video_core: add samples check when find render target
2023-06-20 09:55:23 -04:00
liamwhite 93061d1ea1
Merge pull request #10835 from lat9nq/intel-restrict-compute-disable
vulkan_device: Restrict compute disable only to affected Intel drivers
2023-06-20 09:55:14 -04:00
liamwhite 6d12e7320b
Merge pull request #10840 from Kelebek1/unbug_blinks_brain
Use current GPU address when unmapping GPU pages, not the base
2023-06-20 09:55:01 -04:00
toast2903 78ff2862f6 vulkan_device: Remove brace initializer
Co-authored-by: Tobias <thm.frey@gmail.com>
2023-06-19 17:35:12 -04:00
lat9nq 197e13d93d video_core: Check broken compute earlier
Checks it as the system is determining what settings to enable. Reduces
the need to check settings while the system is running.
2023-06-19 17:33:30 -04:00
Kelebek1 711190bb67 Use current GPU address when unmapping GPU pages, not the base 2023-06-19 00:19:50 +01:00
lat9nq 346c253cd2 video_core: Formalize HasBrokenCompute
Also limits it to only affected Intel proprietrary driver versions.

vulkan_device: Move broken compute determination

vk_device: Remove errant back quote
2023-06-18 16:15:47 -04:00
liamwhite 23371fa187
Merge pull request #10829 from lat9nq/remove-external-mem
vulkan_device: Remove external memory extension
2023-06-18 09:43:03 -04:00
liamwhite 66b8042b59
Merge pull request #10798 from vonchenplus/draw_texture_scale
video_core: drawtexture support upscale
2023-06-18 09:42:41 -04:00
liamwhite 8acf728d5d
Merge pull request #10809 from Kelebek1/reduce_vertex_bindings
Synchronize vertex buffer even when it doesn't require binding
2023-06-18 09:42:32 -04:00
GPUCode ee0d68300e renderer_vulkan: Add missing initializers 2023-06-18 14:14:03 +03:00
GPUCode 7b2f680468 renderer_vulkan: Use VMA for buffers 2023-06-18 12:45:18 +03:00
GPUCode 48e39756f1 renderer_vulkan: Use VMA for images 2023-06-18 12:45:18 +03:00
GPUCode c60eed36b7 memory_allocator: Remove OpenGL interop
* Appears to be unused atm
2023-06-18 12:45:18 +03:00
lat9nq 6448eade2e externals: Add vma and initialize it
video_core: Move vma implementation to library
2023-06-18 12:45:12 +03:00
lat9nq 8a526b2c26 vulkan_device: Remove external memory extension
Unused in yuzu. Enables yuzu to boot games in Wine using Vulkan.
2023-06-18 01:20:08 -04:00
Liam 565a1226d7 renderer_vulkan: add missing include 2023-06-17 23:57:47 -04:00
Fernando S 27a36cd51b
Merge pull request #10744 from Wollnashorn/af-for-all
video_core: Improved anisotropic filtering heuristics
2023-06-18 00:02:05 +02:00
Kelebek1 e681f5678c Synchronize vertex buffer even when it doesn't require binding 2023-06-17 17:47:00 -04:00
FengChen 76a676883a video_core: add samples check when find render target 2023-06-17 23:48:51 +08:00
Wollnashorn 3e47ebe2e9 video_core: Only apply AF to 2D (array) image types 2023-06-17 14:20:44 +02:00
Wollnashorn c309a1c69b video_core: Removed AF for all mip modes option as it's default now 2023-06-17 11:19:39 +02:00
bunnei ec423c6919
Merge pull request #10783 from liamwhite/memory
video_core: preallocate fewer IR blocks
2023-06-16 16:53:25 -07:00
Feng Chen b77a247e8c video_core: drawtexture support upscale 2023-06-16 20:51:15 +08:00
Wollnashorn 2dc0ff79ec video_core: Use sampler IDs instead pointers in the pipeline config
The previous approach of storing pointers returned by `GetGraphicsSampler`/`GetComputeSampler` caused UB, as these functions can cause reallocation of the sampler slot vector and therefore invalidate the pointers
2023-06-16 13:45:14 +02:00
bunnei 0114abad9a
Merge pull request #10790 from liamwhite/arm-driver-moment
vulkan_device: disable extended_dynamic_state2 on ARM drivers
2023-06-15 18:34:31 -07:00
bunnei ca1cb9fd19
Merge pull request #10775 from liamwhite/cb2
renderer_vulkan: propagate conditional barrier support
2023-06-15 17:37:03 -07:00
Wollnashorn a3b7b5b22a video_core: Fallback to default anisotropy instead to 1x anisotropy 2023-06-15 23:16:26 +02:00
Wollnashorn 745d16132b video_core: Disable AF for non-color image formats 2023-06-15 20:59:33 +02:00
Wollnashorn 3e8cd91d54 video_core: Fixed compilation errors because of name shadowing 2023-06-15 18:46:40 +02:00
Liam 3304d58edb vulkan_device: disable extended_dynamic_state2 on ARM drivers 2023-06-15 12:29:54 -04:00
Wollnashorn 42c944b250 video_core: Add per-image anisotropy heuristics (format & mip count) 2023-06-15 18:19:32 +02:00
Liam 2c01669046 video_core: preallocate fewer IR blocks 2023-06-14 21:37:57 -04:00
Liam 8d6aefdcc4 video_core: optionally skip barriers on feedback loops 2023-06-14 14:11:46 -04:00
Liam cc4334870b renderer_vulkan: propagate conditional barrier support 2023-06-14 10:49:40 -04:00
Wollnashorn 0de6b9e3f5 video_core: Apply AF only to samplers with normal LOD range [0, 1+x] 2023-06-14 13:27:27 +02:00
Wollnashorn a9e4dddad5 video_core: Fix default anisotropic heuristic 2023-06-14 11:21:22 +02:00
Wollnashorn 44f616edb9 video_core: Never apply AF to None mipmap mode
Should fix some artifacts with the "apply anisotropic filtering for all mipmap modes" option
2023-06-14 03:57:39 +02:00
Wollnashorn b9bba3ac89 video_core: Disable anisotropic filtering for samplers with depth compare 2023-06-13 21:32:32 +02:00
Morph 925586f97b buffer_cache_base: Specify buffer type in HostBindings
Avoid reinterpret-casting from void pointer since the type is already known at compile time.
2023-06-13 00:59:42 -04:00
Wollnashorn 0eacf547c0 video_core: Option to apply anisotropic filtering for all mipmap modes 2023-06-13 03:21:01 +02:00
liamwhite e0de6dd63f
Merge pull request #10675 from liamwhite/scaler
image_info: adjust rescale thresholds and refactor constant use
2023-06-12 21:16:36 -04:00
Matías Locatti 42b2bc204f
Merge pull request #10699 from liamwhite/conditional-barrier
shader_recompiler: remove barriers in conditional control flow when device lacks support
2023-06-12 16:50:59 -03:00
bunnei ad8f122ab1
Merge pull request #10693 from liamwhite/f64-to-f32
shader_recompiler: translate f64 to f32 when unsupported on host
2023-06-12 12:46:54 -07:00
bunnei 569f8d3b44
Merge pull request #10668 from Kelebek1/reduce_vertex_bindings
Combine vertex/transform feedback buffer binding into a single call
2023-06-11 11:33:48 -07:00
bunnei ea716eb5cc android: Fix screen orientation & blurriness. 2023-06-10 15:13:06 -07:00
Liam 2f1e87dd83 shader_recompiler: translate f64 to f32 when unsupported on host 2023-06-10 12:38:49 -04:00
Liam 2bb7ea436d shader_recompiler: remove barriers in conditional control flow when device lacks support 2023-06-10 12:30:39 -04:00
Liam 05b66877d1 image_info: adjust rescale thresholds and refactor constant use 2023-06-08 17:46:40 -04:00
Liam 74671186bf vk_blit_screen: use higher bit depth for fxaa 2023-06-08 11:27:57 -04:00
Kelebek1 ace6c2318b Combine vertex/transform feedback buffer binding into a single call 2023-06-08 12:13:27 +01:00
Morph 907507886d (wall, native)_clock: Add GetGPUTick
Allows us to directly calculate the GPU tick without double conversion to and from the host clock tick.
2023-06-07 21:44:42 -04:00
Morph 8e56a84566 core_timing: Use CNTPCT as the guest CPU tick
Previously, we were mixing the raw CPU frequency and CNTFRQ.
The raw CPU frequency (1020 MHz) should've never been used as CNTPCT (whose frequency is CNTFRQ) is the only counter available.
2023-06-07 21:44:42 -04:00
liamwhite 5c79a07a36
Merge pull request #10635 from mrcmunir/l4t-tx1-nvidia
Make VK_EXT_robustness2 optional
2023-06-07 14:04:14 -04:00
liamwhite cfb76d8f3e
Merge pull request #10476 from ameerj/gl-memory-maps
OpenGL: Make use of persistent buffer maps in buffer cache
2023-06-07 14:03:57 -04:00
liamwhite 6907d30258
Merge pull request #10583 from ameerj/ill-logic
AccelerateDMA: Fix incorrect check in Buffer<->Texture copies
2023-06-07 14:03:40 -04:00
Carlos Estrague / Mrc_munir b854981917
Updated to lexicographical order suggestions 2023-06-06 19:33:52 +02:00
Carlos Estrague / Mrc_munir 19d05bd4d7
Make VK_EXT_robustness2 optional
For some reason nvidia implemented Vulkan 1.2 supported without support for VK_EXT_robustness2 in tegra X1/X2 .

Fix vulkan work in TX1/TX2  L4T drivers .
2023-06-06 06:32:47 +02:00
bunnei db6737f2ba android: vk_presentation_manager: Fix unusued needs_recreation. 2023-06-03 00:06:08 -07:00
bunnei df70fdc95b android: vk_turbo_mode: Remove unnecessary device recreation.
- Fixes a rare crash.
2023-06-03 00:06:08 -07:00
bunnei 098e2c4077 android: renderer_vulkan: Fix crash with surface recreation. 2023-06-03 00:06:07 -07:00
bunnei 057117f009 android: Fix presentation layout on foldable and tablet devices. 2023-06-03 00:06:07 -07:00
bunnei cf9f4f67dd video_core: vk_rasterizer: Decrease draw dispatch count for Android. 2023-06-03 00:06:04 -07:00
bunnei f0ed20c8a2 android: GPU: Enable async presentation, increase frames in flight. 2023-06-03 00:06:03 -07:00
bunnei 5d43594a70 android: vulkan_device: Skip BGR565 emulation on S8gen2. 2023-06-03 00:06:01 -07:00
bunnei 8b8123b733 android: vulkan_device: Only compile OverrideBcnFormats when used. 2023-06-03 00:06:00 -07:00
Liam 6b2e89a865 android: remove spurious warnings about BCn formats when patched with adrenotools 2023-06-03 00:06:00 -07:00
bunnei befd477279 android: video_core: Disable some problematic things on GPU Normal. 2023-06-03 00:06:00 -07:00
bunnei 8dc7fe0c96 android: video_core: Disable problematic compute shaders.
- Fixes #104.
2023-06-03 00:06:00 -07:00
bunnei 117bc2ae6c android: vulkan: Recreate surface after suspension & adapt to async. presentation. 2023-06-03 00:05:59 -07:00
bunnei ca4bf3844e video_core: Enable support_descriptor_aliasing on Turnip, disable storage atomic otherwise. 2023-06-03 00:05:58 -07:00
bunnei 12c9e18b55 android: vulkan: Disable vertex_input_dynamic_state on Qualcomm. 2023-06-03 00:05:51 -07:00
bunnei 6d2e7de2e0 android: vulkan_debug_callback: Ignore many innocuous errors. 2023-06-03 00:05:50 -07:00
bunnei b2aeb50229 android: vulkan_device: Disable VK_EXT_custom_border_color on Adreno.
- Causes crashes on sampler creation with Super Mario Odyssey.
2023-06-03 00:05:48 -07:00
Liam 616cf70a80 build: only enable adrenotools on arm64 2023-06-03 00:05:43 -07:00
liushuyu e26bd1421e video_core: fix clang-format errors 2023-06-03 00:05:33 -07:00
bunnei ff2f370946 video_core: vulkan_device: Correct error message for unsuitable driver. 2023-06-03 00:05:32 -07:00
bunnei 8248d69093 android: vulkan: Implement adrenotools turbo mode. 2023-06-03 00:05:32 -07:00
bunnei 21320d80d9 android: vulkan_device: Disable VK_EXT_extended_dynamic_state2 on Qualcomm.
- Newer drivers report this as supported, but it is broken.
2023-06-03 00:05:32 -07:00
bunnei 4c38220a64 android: native: Add support for custom Vulkan driver loading. 2023-06-03 00:05:31 -07:00
bunnei ae099d583c core: frontend: Refactor GraphicsContext to its own module. 2023-06-03 00:05:31 -07:00
Billy Laws b4a12b889e Avoid using VectorExtractDynamic for subgroup mask on Adreno GPUs
This crashes their shader compiler for some reason.
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
Billy Laws a3c261d940 Disable multithreaded pipeline compilation on Qualcomm drivers
This causes crashes during compilation on several 6xx and 5xx driver versions.
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
bunnei 91350524c2 video_core: vk_pipeline_cache: Disable support_descriptor_aliasing on Android. 2023-06-03 00:05:28 -07:00
bunnei 6ed62a9f10 video_core: vk_swapchain: Fix image format for Android. 2023-06-03 00:05:28 -07:00
bunnei 18527a8c42 video_core: vk_blit_screen: Rotate viewport for Android landscape. 2023-06-03 00:05:27 -07:00
bunnei 851b1008a8 cmake: Integrate bundled FFmpeg for Android. 2023-06-03 00:05:26 -07:00
ameerj 1fc47361a1 texture_cache: Fix incorrect logic for AccelerateDMA 2023-06-02 18:07:52 -04:00
liamwhite d89b98d8e8
Merge pull request #10091 from Kelebek1/bc_bugggggg
Fix buffer overlap checking skipping a page for stream score right expand
2023-06-01 09:06:07 -04:00
liamwhite 988f486061
Merge pull request #10474 from GPUCode/you-left-me-waiting
Remove timeline semaphore wait
2023-06-01 09:05:30 -04:00
Kelebek1 661375a222 Skip BufferCache tickframe with no channel state set 2023-05-30 21:57:13 +01:00
liamwhite 381caf4c00
Merge pull request #10483 from ameerj/gl-cpu-astc
gl_texture_cache: Fix ASTC CPU decoding with compression disabled
2023-05-28 13:18:31 -04:00
liamwhite bf3f450211
Merge pull request #10283 from danilaml/support-interlaced-videos
Add support for deinterlaced video playback
2023-05-28 13:17:58 -04:00
ameerj ea2e155b0b gl_texture_cache: Fix ASTC CPU decoding with compression disabled
gl_format was incorrectly being overwritten when compression was disabled
2023-05-28 13:14:51 -04:00
ameerj cb0a410907 gl_staging_buffers: Optimization to reduce fence waiting 2023-05-28 00:38:47 -04:00
ameerj 642c14f0c7 OpenGL: Make use of persistent buffer maps in buffer cache downloads
Persistent buffer maps were already used by the texture cache, this extends their usage for the buffer cache.

In my testing, using the memory maps for uploads was slower than the existing "ImmediateUpload" path, so the memory map usage is limited to downloads for the time being.
2023-05-28 00:38:46 -04:00
GPUCode 4a292efbff renderer_vulkan: Remove timeline semaphore wait 2023-05-28 02:39:44 +03:00
Kelebek1 b0bea13ed8 Move buffer bindings to per-channel state 2023-05-27 17:04:18 +01: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
Matías Locatti 919b54848b
Merge pull request #10418 from liamwhite/blink-and-youll-miss-it
texture_cache: process aliases and overlaps in the correct order
2023-05-26 17:36:09 -03:00
Kelebek1 7ce181edcf Fix buffer overlap checking skipping a page for stream score right expand 2023-05-26 10:35:46 +01:00
Liam 904dc1a567 video_core: don't garbage collect during configuration 2023-05-25 12:03:12 -04:00
bunnei 73a0ea0738
Merge pull request #10435 from FernandoS27/gotta-clean-mess-ups
Texture cache: revert wrong acceleration assumption
2023-05-24 21:00:53 -07:00
Fernando Sahmkow be3a7f4096 Texture cache: revert wrong acceleration assumption 2023-05-24 10:52:02 +02:00
Fernando Sahmkow 01c4568786 Texture Cache Util: Fix block depth adjustment on slices. 2023-05-24 10:06:58 +02:00
Fernando Sahmkow 72c1ee1bf9 texture_cache: process aliases and overlaps in the correct order 2023-05-24 09:53:42 +02:00
Fernando S 72a14a6817
Merge pull request #10422 from liamwhite/gc
video_core: tune garbage collection aggressiveness
2023-05-24 03:58:49 +02: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 3b1172c10f video_core: tune garbage collection aggressiveness 2023-05-23 12:55:14 -04:00
Liam 415c78b87c textures: add BC1 and BC3 compressors and recompression setting 2023-05-23 12:54:40 -04:00