Commit graph

6841 commits

Author SHA1 Message Date
Fernando S 49643d8134
Merge pull request #9913 from ameerj/acc-dma-refactor
AccelerateDMA: Refactor Buffer/Image copy code and implement for OGL
2023-03-11 20:04:19 +01:00
liamwhite 103380134f
Merge pull request #9925 from ameerj/gl-sync-signal
OpenGL: Prefer glClientWaitSync for OGLSync objects
2023-03-10 13:55:22 -05:00
liamwhite 021af4fd00
Merge pull request #9917 from Morph1984/the-real-time
native_clock: Re-adjust the RDTSC frequency to its real frequency
2023-03-10 13:55:11 -05:00
Feng Chen c8ad039612 video_core: Update texture format 2023-03-10 21:48:50 +08:00
liamwhite b5c0c1e163
Merge pull request #9822 from ameerj/buffcache-ssbo-addr
buffer_cache: Add logic for non-NVN storage buffer tracking
2023-03-09 09:18:39 -05:00
ameerj 03137086db OpenGL: Prefer glClientWaitSync for OGLSync objects
At least on Nvidia, glClientWaitSync with a timeout of 0 (non-blocking) is faster than glGetSynciv of GL_SYNC_STATUS.
2023-03-08 20:29:25 -05:00
liamwhite 3cf88a4d6c
Merge pull request #9896 from Kelebek1/d24s8
Check all swizzle components for red, not just [0]
2023-03-08 09:16:06 -05:00
Morph 3053a62375 core: Promote CPU/GPU threads to time critical
And also demote Audren and CoreTiming to High thread priority.
2023-03-07 21:17:46 -05:00
Liam ba4213d956 general: fix type inconsistencies 2023-03-07 20:05:19 -05:00
liamwhite a7792e5ff8
Merge pull request #9889 from Morph1984/time-is-ticking
core_timing: Reduce CPU usage on Windows
2023-03-07 10:54:13 -05:00
ameerj 268942c8fe gl_rasterizer: Implement AccelerateDMA DmaBufferImageCopy 2023-03-06 22:57:52 -05:00
ameerj 6b9cc0ed23 Refactor AccelerateDMA code 2023-03-06 22:57:45 -05:00
Fernando Sahmkow 8a3411b417 Engines: Implement Accelerate DMA Texture. 2023-03-05 12:18:00 +01:00
Morph bff1453282 core_timing: Use higher precision sleeps on Windows
The precision of sleep_for and wait_for is limited to 1-1.5ms on Windows.
Using SleepForOneTick() allows us to sleep for exactly one interval of the current timer resolution.
This allows us to take advantage of systems that have a timer resolution of 0.5ms to reduce CPU overhead in the event loop.
2023-03-05 02:36:31 -05:00
Morph ce8f4da638
Merge pull request #9884 from liamwhite/service-cleanup
service: miscellaneous cleanups
2023-03-03 22:51:17 -05:00
Kelebek1 a7fb80e612 Check all swizzle components for red, not just [0], pass float border color rather than int 2023-03-04 02:33:50 +00:00
Behunin 44518b225c gpu_thread: Use bounded queue 2023-03-03 18:20:56 -07:00
Liam ec6ee04c64 vulkan_common: disable vertexInputDynamicState on unsupported driver 2023-03-01 22:48:12 -05:00
Liam 809148e1a5 nvnflinger: fix name 2023-03-01 10:39:49 -05:00
Matías Locatti c38bb96a2c Partially apply LTO to only core and video_core projects. 2023-02-27 18:44:14 -03:00
ameerj 2ce5bb9bd6 buffer_cache: Add logic for non-NVN storage buffer tracking 2023-02-25 16:24:21 -05:00
ameerj b5bcd8c71b configuration: Add async ASTC decode setting 2023-02-22 18:21:09 -05:00
ameerj 090bc588e5 texture_cache: Add async texture decoding 2023-02-22 00:26:07 -05:00
Merry c9678bda24 svc: Fix type consistency (exposed on macOS) 2023-02-21 21:39:17 +00:00
liamwhite a4d0663158
Merge pull request #9588 from liamwhite/bylaws-reverts
Revert "shader_recompiler: Align SSBO offsets to meet host requirements"
2023-02-19 13:11:57 -05:00
bunnei e91ff9b7bd
Merge pull request #9810 from Kelebek1/nvdec_threads
Allow >1 cpu threads on video decoding, disable multi-frame decoding
2023-02-17 09:44:38 -08:00
bunnei 889bfce447
Merge pull request #9802 from Kelebek1/wait_data_cache
Re-add the invalidate_texture_data_cache register
2023-02-16 12:27:24 -08:00
Kelebek1 3b50906f00 Reimplement the invalidate_texture_data_cache register 2023-02-14 19:34:10 +00:00
Kelebek1 139b645aa2 Allow >1 cpu threads on video decoding, disable multi-frame decoding 2023-02-14 18:55:46 +00:00
arades79 683019878f remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistency
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14 12:35:39 -05:00
arades79 45e13b03f3 add static lifetime to constexpr values to force compile time evaluation where possible
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14 12:33:11 -05:00
bunnei f70fcdb873
Merge pull request #9746 from ameerj/ogl-msaa-texcache
texture_cache: OpenGL: Implement MSAA uploads and copies
2023-02-12 00:18:52 -08:00
ameerj 93cf2b3ca8 texture_cache: OpenGL: Implement MSAA uploads and copies 2023-02-11 15:43:07 -05:00
liamwhite c97b5c9ff9
Merge pull request #9777 from vonchenplus/speed_up_video_copy
video_core: Speed up video frame data copy
2023-02-11 12:35:16 -05:00
liamwhite 1040f1f503
Merge pull request #9744 from behunin/quick-release
gpu_thread: Remove OnCommandListEndCommand
2023-02-11 10:28:30 -05:00
FengChen 4adf39edf2 video_core: Speed up video frame data copy 2023-02-11 22:18:54 +08:00
liamwhite c5743d5499
Merge pull request #9736 from Kelebek1/dynamic_vertex_attribs
Remove fake vertex bindings when dynamic state is enabled
2023-02-09 22:14:55 -05:00
ameerj eb9f16dce4 buffer_base: Partially revert changes from #9559
This fixes a regression where Yoshi's Crafted World (and potentially other titles) would enter an infinite loop when GPU Accuracy was set to "Normal"
2023-02-08 19:37:23 -05:00
Behunin 8551ac6008 Remove OnCommandListEndCommand
Call rasterizer->ReleaseFences() directly
2023-02-07 17:21:17 -07:00
Kelebek1 8ae2a664d2 Remove fake vertex bindings when dynamic state is enabled 2023-02-05 22:28:03 +00:00
liamwhite 8a33f8bd30
Merge pull request #9708 from ameerj/gl-context-flush
gl_shader_cache: Force context flush when loading disk shader cache
2023-02-01 22:38:13 -05:00
liamwhite 9de88cb5a7
Merge pull request #9631 from vonchenplus/vulkan_clear
video_core: Implement vulkan clear specified channel
2023-01-30 09:01:55 -05:00
ameerj 720ff38097 gl_compute_pipeline: Force context flush when loading shader cache 2023-01-29 21:32:12 -05:00
ameerj 01eeda74a6 gl_graphics_pipeline: Force context flush when loading shader cache 2023-01-29 20:26:49 -05:00
Levi Behunin d5fc56db4b Move to Clang Format 15
Depends on https://github.com/yuzu-emu/build-environments/pull/69

clang-15 primary run
2023-01-29 17:49:42 -07:00
bunnei a3aedcce65
Merge pull request #9691 from ameerj/msaa-texcache
texture_cache: Fix tracking of MSAA image views
2023-01-28 23:47:45 -08:00
ameerj c2fb7b64ce texture_cache: Adjust image view sizes by MSAA samples 2023-01-28 00:15:29 -05:00
FengChen 818631a412 video_core: Implement vulkan clear specified channel 2023-01-28 12:53:05 +08:00
liamwhite 6fa86989f1
Merge pull request #9539 from Wollnashorn/opengl-fsr
video_core/opengl: Added FSR upscaling filter to the OpenGL renderer
2023-01-27 19:28:35 -05:00
Wollnashorn c4a49eb1dd video_core/opengl: Add FSR upscaling filter to the OpenGL renderer 2023-01-26 21:43:33 +01:00
Merry dc7ab4c5d6 Revert "MemoryManager: use fastmem directly."
This reverts commit af5ecb0b15.
2023-01-25 10:12:04 +00:00
Liam c6eab71d5c nsight_aftermath_tracker: update for latest Aftermath SDK 2023-01-21 13:01:19 -05:00
liamwhite 475370c8f8
Merge pull request #9556 from vonchenplus/draw_texture
video_core: Implement maxwell3d draw texture method
2023-01-19 14:58:53 -05:00
Kelebek1 5a106cf11e Demote maxwell3d Firmware4 call log to debug 2023-01-18 01:59:11 +00:00
Feng Chen 9fc7ca1731 Address feedback 2023-01-16 10:27:57 +08:00
Morph c277dad25f
Merge pull request #9596 from liamwhite/mvk
MoltenVK: restrict number of vertex attributes/bindings to 16
2023-01-10 18:11:44 -05:00
Liam fa8581e900 vulkan_common: fix indirect draw with count 2023-01-10 09:43:36 -05:00
TellowKrinkle eaf425bd32 MoltenVK: restrict number of vertex attributes/bindings to 16 2023-01-09 19:01:09 -05:00
Morph ffb12f4f9f
Merge pull request #9581 from liamwhite/turbo2
renderer_vulkan: pause turbo submissions on inactive queue
2023-01-09 16:23:16 -05:00
Liam 279005448a vulkan_device: refactor feature testing 2023-01-09 16:12:16 -05:00
Fernando Sahmkow efbb6fe288 VideoCore: Fix OGL cache invalidation. 2023-01-07 21:56:17 -05:00
Liam 57a4388e2d Revert "Vulkan, OpenGL: Hook up storage buffer alignment code"
This reverts commit 9e2997c4b6.
2023-01-07 15:48:50 -05:00
Liam c19c8ac92c renderer_vulkan: pause turbo submissions on inactive queue 2023-01-07 14:35:11 -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
Narr the Reg 4bda2b475f opengl: Sanitize antialiasing config 2023-01-06 13:42:20 -06:00
Wollnashorn 457826a83b video_core/vulkan: Fixed loading of Vulkan driver pipeline cache
The header size of the Vulkan driver pipeline cache files was incorrectly in PipelineCache::LoadVulkanPipelineCache, for which the pipeline cache wasn't read correctly and got invalidated on each load.
2023-01-06 16:52:41 +01:00
Fernando S 8b251fc3f6
Merge pull request #9535 from bylaws/master
Port over several shader-compiler fixes from skyline
2023-01-06 10:06:45 -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
Fernando S 5bcbb8de45
Merge pull request #9559 from FernandoS27/cached-writes
VideoCore: Implement Cached Writes, use fastmem for reading GPU memory and eliminate old stuffs
2023-01-06 07:31:39 -05:00
Fernando Sahmkow f6245dc40a MacroHLE: eliminate 2 rushed macros. 2023-01-05 20:53:31 -05:00
liamwhite eaca61e073
Merge pull request #9528 from liamwhite/mvk-nulldesc
renderer_vulkan: implement fallback path for null buffer descriptors
2023-01-05 18:31:55 -05:00
liamwhite 3e33a878dc
Merge pull request #9536 from liamwhite/debug-utils
vulkan_common: unify VK_EXT_debug_utils and selection of validation layer
2023-01-05 18:31:45 -05:00
Billy Laws 58fec43768 Run clang-format 2023-01-05 22:18:10 +00:00
Billy Laws 6c812a0c84 Vulkan, OpenGL: Hook up geometry shader passthrough emulation 2023-01-05 22:13:07 +00:00
Billy Laws 9e2997c4b6 Vulkan, OpenGL: Hook up storage buffer alignment code 2023-01-05 22:13:07 +00:00
Billy Laws bbfad79c89 Vulkan: Add a workaround for input_position on Adreno drivers
Adreno drivers will crash compiling geometry shaders if the input position is not wrapped in a gl_in struct.
2023-01-05 22:13:07 +00:00
Wollnashorn e07976a22b video_core/vulkan: Vulkan driver pipelines now contain cache version
So that old cache can get deleted when the cache version changes and does not grow infinitely
2023-01-05 21:03:01 +01:00
Wollnashorn f2aa816679 video_core/vulkan: Added check if Vulkan pipeline path has been set 2023-01-05 21:03:01 +01:00
Wollnashorn 16809c1fa7 video_core/vulkan: Added VkPipelineCache to store Vulkan pipelines
As an optional feature which can be enabled in the advanced graphics configuration, all pipelines that get built at the initial shader loading are stored in a VkPipelineCache object and are dumped to the disk.

These vendor specific pipeline cache files are located at `/shader/GAME_ID/vulkan_pipelines.bin`. This feature was mainly added because of an issue with the AMD driver (see yuzu-emu#8507) causing invalidation of the cache files the driver builds automatically.
2023-01-05 21:02:44 +01:00
Fernando Sahmkow b56ad93bbc BufferBase: Don't ignore GPU pages. 2023-01-05 14:00:10 -05:00
Fernando Sahmkow 2d0c4f2b1d Fermi2D: sync cache flushes 2023-01-05 06:43:28 -05:00
Fernando Sahmkow af5ecb0b15 MemoryManager: use fastmem directly. 2023-01-05 06:06:33 -05:00
Fernando Sahmkow 6c7eb81f7d video_core: Cache GPU internal writes. 2023-01-05 05:23:39 -05:00
Fernando Sahmkow 4d9af4a9d2 Vulkan: Fix drivers that don't support dynamic_state_2 up 2023-01-05 00:11:16 -05:00
Feng Chen 013b689153 video_core: Implement opengl/vulkan draw_texture 2023-01-05 12:41:33 +08:00
Feng Chen 1e8cee2ddf video_core: Implement maxwell3d draw texture method 2023-01-05 12:41:28 +08:00
Liam a4269c285a common: add setting for renderer clock workaround 2023-01-04 22:22:01 -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 3ecc03ec1b yuzu-ui: Add setting for disabling macro HLE 2023-01-04 14:56:52 -05:00
Fernando Sahmkow a0c697124c Video_core: Address feedback 2023-01-04 14:39:42 -05:00
Fernando Sahmkow 03ccd8bf43 Texture Cache: Implement async texture downloads. 2023-01-03 22:52:15 -05:00
Fernando Sahmkow ddbf851ef6 Vulkan: Update blacklisting to latest driver versions. 2023-01-03 21:16:43 -05:00
Fernando Sahmkow a045e860dd ShaderCompiler: Inline driver specific constants. 2023-01-03 16:29:25 -05:00
Fernando Sahmkow b62ffb612d Vulkan: rework stencil tracking. 2023-01-03 16:29:16 -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 581a7d785b Rasterizer: Setup skeleton for Host Conditional rendering 2023-01-01 16:43:58 -05:00
Fernando Sahmkow 3630bfaef3 RasterizerMemory: Add filtering for flushing/invalidation operations. 2023-01-01 16:43:58 -05:00
Fernando Sahmkow 2793304117 Vulkan: Allow stagging buffer deferrals. 2023-01-01 16:43:58 -05:00
Fernando Sahmkow 8d694701bc MacroHLE: Add OpenGL Support 2023-01-01 16:43:58 -05:00
Fernando Sahmkow 4c82e47edd Vulkan: Add other additional pipeline specs 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 cb1497d0d7 DMAPusher: Improve collection of non executing methods 2023-01-01 16:43:57 -05:00
Fernando Sahmkow ce448ce770 Revert Buffer cache changes and setup additional macros. 2023-01-01 16:43:57 -05:00
Fernando Sahmkow 18637766ef MacroHLE: Reduce massive calculations on sizing estimation. 2023-01-01 16:43:57 -05:00
Fernando Sahmkow aad0cbf024 MacroHLE: Add HLE replacement for base vertex and base instance. 2023-01-01 16:43:57 -05:00
Fernando Sahmkow 93ac5a6a6d MacroHLE: Add Index Buffer size estimation. 2023-01-01 16:43:57 -05:00
Fernando Sahmkow c541559767 MacroHLE: Refactor MacroHLE system. 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
Liam aa13ee5c4a vulkan_common: unify VK_EXT_debug_utils and selection of validation layer 2023-01-01 11:59:47 -05:00
liamwhite 9fdacb5e3a
Merge pull request #9423 from vonchenplus/vulkan_quad_strip
video_core: Implement all vulkan topology
2022-12-28 20:59:23 -05:00
FengChen 6a397bc8ed video_core: Implement other missing vulkan topology 2022-12-26 12:20:49 +08:00
FengChen 86d5b4e556 video_core: Implement vulkan QuadStrip topology 2022-12-26 11:37:34 +08:00
ameerj 7584d36922 texture_cache: Use Common::ScratchBuffer for swizzle buffers 2022-12-25 15:47:41 -05:00
ameerj 1209d428f1 texture_cache: Use pre-allocated buffer for texture downloads 2022-12-25 15:38:36 -05:00
ameerj c448b3af2f texture_cache: Use pre-allocated buffer for texture uploads 2022-12-25 15:38:36 -05:00
Fernando S 3e6850f00b
Merge pull request #9453 from ameerj/scratch-vector
common: Add ScratchBuffer Class
2022-12-24 20:26:06 -05:00
ameerj c6590ad07b scratch_buffer: Explicitly defing resize and resize_destructive functions
resize keeps previous data intact when the buffer grows
resize_destructive destroys the previous data when the buffer grows
2022-12-19 22:40:50 -05:00
ameerj 61e4f2d931 dma_pusher: Rework command_headers usage
Uses ScratchBuffer and avoids overwriting the command_headers buffer with the prefetch_command_list
2022-12-19 18:08:04 -05:00
ameerj bdef22ff85 buffer_cache: Use Common::ScratchBuffer for ImmediateBuffer usage 2022-12-19 18:08:04 -05:00
ameerj 4bc2d82130 video_core: Add usages of ScratchBuffer 2022-12-19 18:08:04 -05:00
Jan Beich b60a93a936 externals: update Vulkan-Headers to v1.3.238 2022-12-19 17:14:29 +00: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
Kelebek1 f7d95d0a3a Remove unimplemented transform feedback geometry spam, it should be implemented 2022-12-16 22:52:29 +00: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
liamwhite 3ff7a5de1a
Merge pull request #7410 from Nefsen402/wayland-fixes
Wayland fixes
2022-12-15 12:05:01 -05: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
Alexander Orzechowski 09e3029c11 gl_device: Use a more robust way to use strict context mode
Instead of checking a environment variable which may not actually
exist or is just wrong, ask QT if it's running on the wayland
platform.
2022-12-13 15:01:51 -05:00
Alexander Orzechowski 3cc3176ad6 video_core/vulkan: Explicity check swapchain size when deciding to recreate
Vulkan for whatever reason does not return VK_ERROR_OUT_OF_DATE_KHR when
the swapchain is the wrong size. Explicity make sure the size is indeed
up to date to workaround this.
2022-12-13 13:23:35 -05:00
Liam d5f53da79d renderer_opengl: refactor context acquire 2022-12-13 13:23:23 -05:00
yzct12345 f6868ae4dd Fix validation errors on less compatible Intel GPU 2022-12-12 20:53:05 -05:00
bunnei da58eb6208
Merge pull request #9406 from vonchenplus/topology
video_core: Adjust topology update logic and Adjust Clear Manage
2022-12-12 14:37:06 -08:00
Mai 8ef9075b1b
Merge pull request #9420 from liamwhite/aniso
video_core: fix off by one in anisotropic filtering amount
2022-12-12 03:34:09 +00:00
Matías Locatti 623429a27e
Merge pull request #9409 from liamwhite/smaa2
video_core: Integrate SMAA
2022-12-11 01:38:28 -03:00
Liam 456322dde6 video_core: fix off by one in anisotropic filtering amount 2022-12-10 20:54:45 -05:00
Salvage 0e265db873
Fix compilation error 2022-12-09 14:49:15 +01:00
Liam 5b837157bd video_core: Integrate SMAA
Co-authored-by: goldenx86 <goldenx86@users.noreply.github.com>
Co-authored-by: BreadFish64 <breadfish64@users.noreply.github.com>
2022-12-08 17:17:45 -05:00
FengChen 37014e9127 video_core: Add vertex_array_instance_* sbubbed called warning 2022-12-08 23:19:31 +08:00
FengChen 1e64b5e2ec video_core: The draw manager manages whether Clear is required. 2022-12-08 23:10:52 +08:00
FengChen 15d63c3d3d video_core: Adjust topology update logic 2022-12-08 22:40:28 +08:00
Fernando S 41461514d6
Merge pull request #9401 from vonchenplus/draw_manager
video_core: Implement maxwell3d draw manager and split draw logic
2022-12-08 12:41:39 +01:00
Feng Chen bf0b957c05 video_core: Implement maxwell3d draw manager and split draw logic 2022-12-08 10:12:19 +08:00
Morph bfdd512787
Merge pull request #9365 from liamwhite/val
vulkan_common: quiet some validation errors
2022-12-06 21:08:14 -05:00
Fernando S 08d4e7c7af
Merge pull request #9393 from liamwhite/more-vulkan
vulkan_common: further initialization tweaks
2022-12-06 17:45:08 +01:00
liamwhite 90145c424d
Merge pull request #9360 from Kelebek1/R-E-S-P-E-C-T
Respect render mode override
2022-12-05 22:17:22 -05:00
Liam 7e7a23363a vulkan_common: further initialization tweaks 2022-12-05 22:06:35 -05:00
liamwhite 3b19f741bd
Merge pull request #6833 from abouvier/unbundle
cmake: prefer system libraries
2022-12-05 12:26:09 -05:00
Fernando Sahmkow 6352c5dc31 Vulkan: Implement Alpha coverage 2022-12-05 12:33:12 +01:00
Alexandre Bouvier 8e17b5469f cmake: prefer system libraries 2022-12-04 17:09:25 +01: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 ea56d8f388 vulkan_common: correct usage of timeline semaphore fallbacks 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 02b10a6e4d
Merge pull request #9374 from liamwhite/externals
externals: update dynarmic, SDL2
2022-12-04 10:44:12 -05:00
Liam 6d2c597371 externals: update dynarmic, SDL2 2022-12-04 10:12:26 -05:00
bunnei f77cc6c412
Merge pull request #9344 from liamwhite/null
video_core: add null backend
2022-12-03 11:23:25 -08:00
liamwhite 75e16547f8
Merge pull request #9300 from ameerj/pch
CMake: Use precompiled headers to improve compile times
2022-12-03 14:10:06 -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
liamwhite ac0721a4bc
Merge pull request #9353 from vonchenplus/draw_indexed
video_core: Fine tuning the index drawing judgment logic
2022-12-03 10:43:34 -05:00
Matías Locatti c043ba8467
Merge pull request #9303 from liamwhite/new-vulkan-init
Vulkan: update initialization
2022-12-02 18:32:54 -03:00
Liam 3ef006b5ab shader_recompiler: add gl_Layer translation GS for older hardware 2022-12-01 09:51:27 -05:00
Feng Chen cb5400b34d video_core: Fine tuning the index drawing judgment logic 2022-12-01 19:14:58 +08:00
Liam be05cb640c vulkan_common: quiet some validation errors 2022-11-30 19:18:05 -05:00
ameerj 5b5612c1cc CMake: Consolidate common PCH headers 2022-11-30 18:30:30 -05:00
Kelebek1 a78372110c Respect render mode override 2022-11-30 01:43:36 +00:00
ameerj 37bc5118ea CMake: Use precompiled headers 2022-11-29 18:50:49 -05:00
liamwhite c845d8a9e8
Merge pull request #9352 from lioncash/vidcast
engines: Remove unnecessary casts
2022-11-29 18:45:16 -05:00
Lioncash b6d93b2c77 host1x/syncpoint_manager: Eliminate unnecessary std::function construction
We can just pass the function object through, and if it's a valid
function, then it will automatically be converted.
2022-11-29 08:58:50 -05:00
Lioncash c4af7b3f5c host1x/syncpoint_manager: Pass DeregisterAction() handle as const-ref
The handle is only compared against and not modified in any way, so we
can pass it by const reference.

This also allows us to mark the respective parameters for
DeregisterGuestAction() and DeregisterHostAction() as const references
as well.
2022-11-29 08:55:33 -05:00
Lioncash 96ffc174aa maxwell_3d: Mark shifted value as unsigned
Otherwise this is technically creating a signed int result that gets
converted. Just a consistency change.

While we're in the area, we can mark Samples() as const.
2022-11-29 08:39:33 -05:00
Lioncash d7ec031419 engines: Remove unnecessary casts
In a few cases we have some casts that can be trivially removed.
2022-11-29 08:38:46 -05:00
Lioncash a9efea8ae9 video_core/surface: Eliminate casts in GetFormatType()
We can just compare directly and get rid of verbose casting.
2022-11-28 20:25:44 -05:00
Liam 89dd7dc180 video_core: add null backend 2022-11-28 19:49:09 -05:00
Liam 2956a33463 Vulkan: update initialization
Co-authored-by: bylaws <bylaws@users.noreply.github.com>
2022-11-27 14:58:28 -05:00
bunnei 3ab8d9ac7c
Merge pull request #9276 from goldenx86/fsrSlider
FSR Sharpening Slider
2022-11-27 00:13:15 -08:00
liamwhite 3e53d8138c
Merge pull request #9288 from vonchenplus/deferred_draw
video_core: Fine tune maxwell drawing trigger mechanism
2022-11-26 09:35:45 -05:00
liamwhite ddca512f3f
Merge pull request #9307 from Morph1984/not-used-correctly
maxwell_to_vk: Fix format usage bits and add R16_SINT
2022-11-26 09:08:55 -05:00
liamwhite 20b62dbd30
Merge pull request #9194 from FernandoS27/yfc-fermi2d
YFC - Fermi2D: Rework blit engine and add a software blitter.
2022-11-24 21:48:41 -05:00
Fernando Sahmkow 826e0785bf Fermi2D: Cleanup and address feedback. 2022-11-24 21:00:48 +01:00
Fernando Sahmkow 3b582d5fb2 GPU: Fix buffer cache issue, engine upload not inlining memory in multiline and pessismistic invalidation. 2022-11-24 20:57:16 +01:00
Fernando Sahmkow 7356ab1de6 GPU: Implement additional render target formats. 2022-11-24 20:35:44 +01:00
Fernando Sahmkow daf2ef8f1c MaxwellDMA: Implement BlockLinear to BlockLinear copies. 2022-11-24 20:35:44 +01:00
Fernando Sahmkow 5fbd6954ef Fermi2D: Implement Bilinear software filtering and address feedback. 2022-11-24 20:35:44 +01:00
Fernando Sahmkow 957840be91 Fermi2D: Rework blit engine and add a software blitter. 2022-11-24 20:35:44 +01:00
Matías Locatti f209e976f4 FSR Sharpening Slider part 1 - only a global slider 2022-11-24 04:22:13 -05:00
Morph 852de7a771 maxwell_to_vk: Add R16_SINT
This was somehow missed when the format was added to GL
2022-11-23 21:30:58 -05:00
Morph ca154d466a maxwell_to_vk: Fix format usage bits
- VK_FORMAT_B8G8R8A8_UNORM supports the STORAGE_IMAGE_BIT
- VK_FORMAT_R4G4B4A4_UNORM_PACK16 does not support the COLOR_ATTACHMENT_BIT
2022-11-23 21:29:43 -05:00
Liam 9737615948 general: fix compile for Apple Clang 2022-11-22 22:22:28 -05:00
FengChen 1d57851fc7 video_core: Optimize maxwell drawing trigger mechanism 2022-11-22 17:53:26 +08:00
liamwhite 7f1c6def1f
Merge pull request #9216 from vonchenplus/reimp_inline_index_buffer
video_core: Reimplement inline index buffer binding
2022-11-20 12:08:08 -05:00
Morph 69c92b8156
Merge pull request #9249 from goldenx86/available-vram
Add available Vulkan VRAM to log files
2022-11-20 00:21:29 -05:00
bunnei 4975f60162
Merge pull request #9252 from liamwhite/radv-superiority
maxwell3d: HLE multi-layer clear macro
2022-11-19 01:46:48 -08:00
Morph e5a446a0df
Merge pull request #9229 from Docteh/achy_breaky_heart
Add break for default cases
2022-11-17 19:20:18 -05:00
Liam 4c42655a2d maxwell3d: full HLE for multi-layer clears 2022-11-17 08:31:43 -05:00
Liam ece0c1095d maxwell3d: HLE multi-layer clear macro 2022-11-16 22:28:58 -05:00
Matías Locatti 7c50a916c7
Update renderer_vulkan.cpp 2022-11-16 05:53:42 -03:00
Feng Chen cb971ad654 video_core: Reimplement inline index buffer binding 2022-11-15 12:10:44 +08:00
Kyle Kienapfel 6fa3faec65 Add break for default cases
Visual Studio has an option to search all files in a solution, so I
did a search in there for "default:" looking for any missing break
statements.

I've left out default statements that return something, and that throw
something, even if via ThrowInvalidType. UNREACHABLE leads towards throw

R_THROW macro leads towards a return
2022-11-13 16:30:55 -08:00
bunnei 08091ff3e3
Merge pull request #9226 from Kelebek1/regs_regression
[video_core] Fix a couple regs regressions
2022-11-12 02:27:06 -08:00
liamwhite e4d55e4ee4
Merge pull request #9204 from vonchenplus/dma_copy_1d_random_crash
video_core: Fix dma copy 1D random crash
2022-11-11 17:56:41 -05:00
liamwhite c973029374
Merge pull request #9167 from vonchenplus/tess
video_core: Fix few issues in Tess stage
2022-11-11 08:03:40 -05:00
Kelebek1 33ea0fdfe8 Fix regs regression with OpenGL two-sided stencil, and re-add data invalidation reg 2022-11-11 04:04:36 +00:00
Morph c9bb888adf
ir/texture_pass: Use host_info instead of querying Settings::values (#9176) 2022-11-11 03:32:53 +01:00
FengChen d03afd6f4b video_core: Fix dma copy 1D random crash 2022-11-11 00:23:45 +08:00
Liam cbaf642ffe Initial ARM64 support 2022-11-09 16:58:49 -05:00
FengChen a4472b5526 video_core: Fix few issues in Tess stage 2022-11-07 15:42:42 +08:00
FengChen aa97f39ba8 video_core:Fix vmm kinds size error 2022-11-06 22:31:22 +08:00
Fernando S df38c03a09
Merge pull request #9163 from vonchenplus/draw_error
video_core: Fix drawing trigger mechanism regression
2022-11-06 01:13:59 +01:00
Morph 8baf036cdc
Merge pull request #9189 from vonchenplus/stupid
video_core: Fix scaling graphical regressions for multiple games
2022-11-05 11:57:52 -04:00
FengChen 7283010305 video_core: Fix scaling graphical regressions for multiple games 2022-11-05 17:21:02 +08:00
gidoly 9fc1bcc7b2
Update shader cache version. (#9175) 2022-11-04 03:16:01 -04:00
Feng Chen 75596c07e0
video_core: Fix SNORM texture buffer emulating error (#9001) 2022-11-04 02:39:42 -04:00
bunnei 38e4382f53
Merge pull request #8858 from vonchenplus/mipmap
video_core: Generate mipmap texture by drawing
2022-11-03 22:21:58 -07:00
Fernando S 3794851f7f
Merge pull request #9154 from liamwhite/new-fb
vk_blit_screen: recreate swapchain images on guest format change
2022-11-04 01:25:34 +01:00
Morph 74275d0968
Merge pull request #9097 from liamwhite/intel-spv-compiler
video_core: don't build ASTC decoder shader unless requested
2022-11-03 19:29:33 -04:00
liamwhite de4afde065
Merge pull request #9143 from K0bin/scheduler-empty
vk_scheduler: Remove recorded_counts
2022-10-31 21:37:46 -04:00
FengChen b42b894785 video_core: Fix drawing trigger mechanism regression 2022-10-31 21:57:38 +08:00
Fernando Sahmkow 67e0d38152 Vulkan: Fix regression caused by limiting render area to width/height of rendef targets. 2022-10-30 21:24:28 +01:00
Liam 808e22984f vk_blit_screen: recreate swapchain images on guest format change 2022-10-30 15:04:16 -04:00
bunnei 72bff8ba11
Merge pull request #9140 from vonchenplus/darw_index_bufferx_first_error
video_core: Fix drawing trigger mechanism regression
2022-10-29 16:10:53 -07:00
Robin Kertels dce242858a
vk_scheduler: Remove recorded_counts 2022-10-28 03:42:43 +02:00
FengChen f6e7cae62c video_core: Fix drawing trigger mechanism regression 2022-10-27 13:26:52 +08:00
FengChen 0ec1801bc1 video_core: Catch vulkan clear op not all channel need clear 2022-10-25 22:39:29 +08:00
liamwhite fa913a702f
Merge pull request #9112 from vonchenplus/deferred_draw
video_core: Reimplementing the maxwell drawing trigger mechanism
2022-10-25 09:42:59 -04:00
bunnei cbb6c24215
Merge pull request #8873 from vonchenplus/fix_legacy_location_error
video_core: Fix legacy to generic location unpaired
2022-10-24 10:50:24 -07:00
Morph 42c4ef7373 general: Resolve -Wunused-but-set-variable 2022-10-22 15:02:04 -04:00
Morph c7e079a5d4 general: Resolve -Wunused-lambda-capture and C5233 2022-10-22 15:02:04 -04:00
Morph bad3025951 decoders: Use 2's complement instead of unary -
Resolves C4146 on MSVC
2022-10-22 15:02:04 -04:00
Morph 93297d14d8 CMakeLists: Remove all redundant warnings
These are already explicitly or implicitly set in src/CMakeLists.txt
2022-10-22 15:02:04 -04:00
Fernando S 0860fffd78
Merge pull request #9095 from FernandoS27/meat-good-vegetable-bad
Maxwell3D/Puller: Fix regressions and syncing issues.
2022-10-22 13:06:03 +02:00
FengChen 2f90694797 video_core: Implement maxwell inline_index method 2022-10-22 16:58:23 +08:00
FengChen 1f54cd4ac7 video_coare: Reimplementing the maxwell drawing trigger mechanism 2022-10-21 17:09:22 +08:00
Morph f16db300c6 format_lookup_table: Implement R32_B24G8 with D32_FLOAT_S8_UINT
This format is similar to Z32_FLOAT_X24S8_UINT, which is implemented with D32_FLOAT_S8_UINT.

Used in Persona 5 Royal
2022-10-21 01:54:57 -04:00
Liam 9524e28d20 video_core: don't build ASTC decoder shader unless requested 2022-10-19 18:52:42 -04:00
liamwhite 560bca57a2
Merge pull request #9071 from bunnei/mp-mm
Kernel Multiprocess (Part 1) - Persist memory & core timing
2022-10-19 16:27:43 -04:00
Fernando S b8a70c9999
Merge pull request #9084 from vonchenplus/dma_copy
video_core: implement 1D copies based on VMM 'kind'
2022-10-19 06:56:00 +02:00
Fernando Sahmkow 3cb4498142 Maxwell3D/Puller: Fix regressions and syncing issues. 2022-10-19 06:21:51 +02:00
bunnei d00245d444 video_core: renderer_vulkan: vk_query_cache: Avoid shutdown crash in QueryPool::Reserve. 2022-10-18 19:13:35 -07:00
FengChen 23b6569fc2 video_core: implement 1D copies based on VMM 'kind' 2022-10-17 15:35:12 +08:00
FengChen 99507d0188 video_core: Implement memory manager page kind 2022-10-17 15:33:29 +08:00
Morph ddf5577799 video_core: Fix spelling of "synchronize" 2022-10-16 00:50:53 -04:00
Morph d3114c620d renderer_(opengl/vulkan): Fix tessellation clockwise parameter
This should be assigned CW only on Triangles_CW rather than not Triangles_CCW, making CCW the default winding order rather than CW.
2022-10-13 15:52:56 -04:00
bunnei dbacb31f61
Merge pull request #9027 from yuzu-emu/revert-8987-another-name-for-reinforcement-steel
Revert "vulkan: automatically use larger staging buffer sizes when possible"
2022-10-12 15:36:56 -07:00
bunnei e158167139
Merge pull request #9024 from liamwhite/async-screenshot
video_core: don't block rendering on screenshots
2022-10-12 13:26:32 -07:00
bunnei 77177a7e33
Merge pull request #9049 from liamwhite/monkeyhawk
syncpoint_manager: ensure handle is removable before removing
2022-10-12 12:34:22 -07:00
Liam b1cd6cec19 syncpoint_manager: ensure handle is removable before removing 2022-10-10 19:22:26 -04:00
Kelebek1 4496030ea9 Fix stencil func registers, make clip control equivalent to how it was before, but surely wrong. 2022-10-10 20:59:57 +01:00
Fernando S 55e6d0dae0
Merge pull request #8766 from Kelebek1/regs
[video_core] Update 3D registers
2022-10-09 07:04:03 +02:00
Mai 155213484b
Merge pull request #9016 from liamwhite/drunken-schedule
vk_scheduler: wait for command processing to complete
2022-10-07 20:27:16 -04:00
Liam a5476541f2 video_core: don't block rendering on screenshots 2022-10-07 17:33:59 -04:00
Kelebek1 752659aef3 Update 3D regs 2022-10-07 14:13:45 +01:00
liamwhite 20cf09471a
Revert "vulkan: automatically use larger staging buffer sizes when possible" 2022-10-07 04:49:08 -04:00
Byte df6dffa30b vulkan_blitter: Fix pool allocation double free. 2022-10-06 21:00:54 +02:00
Liam aedd739631 maxwell_dma: remove warnings from implemented functionality 2022-10-06 21:00:54 +02:00
Fernando Sahmkow ca3db0d7c9 General: address feedback 2022-10-06 21:00:54 +02:00
Liam 0d99b7962d state_tracker: workaround channel setup for homebrew 2022-10-06 21:00:54 +02:00
Morph fedd983f96 general: Format licenses as per SPDX guidelines 2022-10-06 21:00:54 +02:00
Fernando Sahmkow c2b7de66b3 Address Feedback from bylaws. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow fe24c65153 General: Fix clang format. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow cdce7f781b Vulkan Swapchain: Overall improvements. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow ada09778d9 Vulkan Texture Cache: Limit render area to the max width/height of the targets. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow 8fd1d769fe ImageBase: Basic fixes. 2022-10-06 21:00:53 +02:00
Liam White afab6c143c General: Fix compilation for GCC 2022-10-06 21:00:53 +02:00
Fernando Sahmkow fd7afda1e8 VideoCore: Implement formats needed for N64 emulation. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow 770e19f51a Buffer Cache: Deduce vertex array limit from memory layout when limit is the highest possible. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow 8bb604b3be VideoCore: Add option to dump the macros. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow a9ca39f859 NVDRV: Further improvements. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow b59ca4df0c Buffer Cache: Basic fixes. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow 98317f2b77 Decoders: Improve overall speed. 2022-10-06 21:00:53 +02:00
bunnei f5fd6b5c86 DMA & InlineToMemory Engines Rework. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow b2099fbdcc Maxwell3D: Add small_index_2 2022-10-06 21:00:53 +02:00
Fernando Sahmkow 7cfa28a666 Memory Manager: ensure safety of GPU to CPU address. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow 5a568b1655 MemoryManager: Fix errors popping out. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow ba34cf0a69 Shader Decompiler: Check for shift when deriving composite samplers. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 359f22b808 MemoryManager: Finish up the initial implementation. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 5caa150e9a OpenGL: Fix TickWork 2022-10-06 21:00:52 +02:00
Fernando Sahmkow bc8b3d225e VideoCore: Refactor fencing system. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 4d60410dd9 MemoryManager: initial multi paging system implementation. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 98b5e236d4 Vulkan: Fix Scissor on Clears 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 920429fde7 NVDRV: Further refactors and eliminate old code. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 2931101e6f NVDRV: Refactor Host1x 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 668e80a9f4 VideoCore: Refactor syncing. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow e44ac8b821 Texture Cache: Fix GC and GPU Modified on Joins. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow f350c3d74e Texture cache: Fix the remaining issues with memory mnagement and unmapping. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 9cf4c8831d Texture cache: Fix dangling references on multichannel. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow e462191482 Refactor VideoCore to use AS sepparate from Channel. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow bb74973bba General: Rebase fixes. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 6fc4012396 VideoCore: Extra Fixes. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow feb49c822d NVDRV: Remake ASGPU 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 0f4ae3cc52 MemoryManager: Temporary Fix for NVDEC. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow cbaf3fb433 VideoCore: Update MemoryManager 2022-10-06 21:00:51 +02:00
Fernando Sahmkow 3f8e7a5585 VideoCore: Fix channels with disk pipeline/shader cache. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow d7990c159e OpenGl: Implement Channels. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow 2c62563ab5 NVHOST_CTRl: Implement missing method and fix some stuffs. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow 139ea93512 VideoCore: implement channels on gpu caches. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow 39a5ce4e69 NvHost: Remake Ctrl Implementation. 2022-10-06 21:00:51 +02:00
Fernando Sahmkow 1a49991676 Texture Cache: Add ASTC 10x5 Format. 2022-10-06 16:45:40 +02:00
bunnei d55096ce85
Merge pull request #9013 from liamwhite/spinning-a-yarn
common: remove "yuzu:" prefix from thread names
2022-10-05 18:53:42 -07:00
Fernando S 71fe9fd0f2
Merge pull request #8987 from liamwhite/another-name-for-reinforcement-steel
vulkan: automatically use larger staging buffer sizes when possible
2022-10-05 08:54:22 +02:00
bunnei fc0ace6048
Merge pull request #9005 from liamwhite/micro-fit
macro_jit_x64: cancel exit for taken branch
2022-10-04 20:08:02 -07:00
bunnei 92c0ad23eb
Merge pull request #9010 from liamwhite/buttwise
macro_jit_x64: fix miscompilation of bit extraction operations
2022-10-04 15:52:39 -07:00
Liam 7969d4d5de vk_scheduler: wait for command processing to complete 2022-10-03 20:03:25 -04:00
Liam 35d3e7db2a common: remove "yuzu:" prefix from thread names 2022-10-03 18:43:56 -04:00
liamwhite 188932768e
Merge pull request #6598 from FernandoS27/falklands-are-british
MacroHLE: Add MultidrawIndirect HLE Macro.
2022-10-01 20:58:03 -04:00
Fernando Sahmkow a60b669ef4 MacroHLE: Add MultidrawIndirect HLE Macro. 2022-10-01 20:57:00 -04:00
Liam 1225627515 macro_jit_x64: fix miscompilation of bit extraction operations 2022-10-01 20:31:21 -04:00
bunnei 4242064560
Merge pull request #8874 from vonchenplus/align_index_buffer_size
Align index buffe size when vertex_buffer_unified_memory enable
2022-10-01 10:28:50 -07:00
Liam b80f7faebe macro_jit_x64: cancel exit for taken branch 2022-10-01 01:32:24 -04:00
bunnei d9e375acc3
Merge pull request #8910 from vonchenplus/astc_decode_error
video_core: Modify astc texture decode error fill value
2022-09-30 15:34:11 -07:00
Liam 087c6c2ef1 vulkan: automatically use larger staging buffer sizes when possible 2022-09-25 02:28:03 -04:00
FengChen d4cb0eac87 video_core: Fix legacy to generic location unpaired 2022-09-20 12:03:31 +08:00
Feng Chen c864cb5772
Merge branch 'master' into mipmap 2022-09-20 11:56:43 +08:00
FengChen 9a95c7fa14 video_core: Generate mipmap texture by drawing 2022-09-20 11:55:43 +08:00
Morph 809126c94a astc: Enable parallel CPU astc decoding
Given the issues with GPU accelerated ASTC decoding with NVIDIA's latest drivers, parallelize astc decoding on the CPU.
Uses half the available threads in the system for astc decoding.
2022-09-16 10:16:42 -04:00
FengChen 88007077e2 video_core: Modify astc texture decode error fill value 2022-09-15 17:04:44 +08:00
FengChen 92b1f8d5da Align index buffe size when vertex_buffer_unified_memory enable 2022-09-10 20:01:33 +08:00
lat9nq 0cef3b47f3
Merge pull request #8819 from liamwhite/cash-money
video_core: add option for pessimistic flushing
2022-09-08 22:46:58 -04:00
Morph 9533365486 style: General style changes to match with the rest of the codebase 2022-08-31 08:51:47 -04:00
Morph 7e379207ec (shader/pipeline)_cache: Raise shader/pipeline cache version
Since the following commit: a83a5d2e4c , many games will refuse to boot unless the shader/pipeline cache has been invalidated.
2022-08-31 08:39:37 -04:00
Fernando S a83a5d2e4c
Merge pull request #8752 from vonchenplus/rectangle_texture
video_code: support rectangle texture
2022-08-31 10:40:45 +02:00
Liam db3eb168cd video_core: add option for pessimistic flushing 2022-08-25 12:32:14 -04:00
FengChen b2a6dde438 video_code: support rectangle texture 2022-08-25 12:45:58 +08:00
Narr the Reg 0c8aeb09d2 video_core: vulkan: rasterizer: Workaround on viewport swizzle on AMD 2022-08-23 18:38:34 -05:00
liamwhite 064f836d1c
Merge pull request #8784 from Docteh/nosnek
code: dodge PAGE_SIZE #define
2022-08-21 12:59:01 -04:00
vonchenplus 0a8c5c8622 video_core: support framebuffer crop rect top not zero 2022-08-20 21:41:40 +08:00
Kyle Kienapfel 14e9de6678 code: dodge PAGE_SIZE #define
Some header files, specifically for OSX and Musl libc define PAGE_SIZE to be a number
This is great except in yuzu we're using PAGE_SIZE as a variable

Specific example
`static constexpr u64 PAGE_SIZE = u64(1) << PAGE_BITS;`

PAGE_SIZE PAGE_BITS PAGE_MASK are all similar variables.
Simply deleted the underscores, and then added YUZU_ prefix

Might be worth noting that there are multiple uses in different classes/namespaces
This list may not be exhaustive

Core::Memory   12 bits (4096)
QueryCacheBase 12 bits
ShaderCache    14 bits (16384)
TextureCache   20 bits (1048576, or 1MB)

Fixes #8779
2022-08-19 16:08:40 -07:00
Liam c5c425914f video_core: implement R16G16B16X16 texture format 2022-08-19 17:17:38 -04:00
bunnei d04bc95934
Merge pull request #8739 from merryhime/swizzle_table
video_core/textures/decoders: Avoid SWIZZLE_TABLE
2022-08-13 22:03:32 -07:00
Merry f2fbf6d910 video_core/textures/decoders: Avoid SWIZZLE_TABLE 2022-08-09 00:27:26 +01:00
DJRobX d8b160c883 Make vsync setting work for Vulkan 2022-08-07 20:57:47 -07:00
bunnei 9dc8d02acc
Merge pull request #8658 from liamwhite/plgp
video_core: differentiate between tiled and untiled framebuffer sizes for unaccelerated blits
2022-08-06 23:00:46 -07:00
bunnei 0f2fc6335e
Merge pull request #8700 from liamwhite/xc3-vk-crash
vk_texture_cache: return VK_NULL_HANDLE for views of null images
2022-08-06 13:11:34 -07:00
Liam c40cec5e58 renderer_vulkan: add format fallbacks for R16G16B16_SFLOAT, R16G16B16_SSCALED, R8G8B8_SSCALED 2022-08-02 18:39:33 -04:00
Liam 1d364adf3e vk_texture_cache: return VK_NULL_HANDLE for views of null images 2022-08-02 13:31:42 -04:00
bunnei 5ae0e5ba67
Merge pull request #8678 from liamwhite/stop-waiting
video_core: stop waiting for shader compilation on user cancel
2022-07-31 14:47:43 -07:00
Liam b9360681df renderer_opengl: delete shader source after linking 2022-07-30 13:21:26 -04:00
Liam fc013d88cb video_core: stop waiting for shader compilation on user cancel 2022-07-29 23:33:40 -04:00
Liam cbe5b8a13e video_core: differentiate between tiled and untiled framebuffer sizes for unaccelerated copies 2022-07-27 21:52:06 -04:00
liamwhite ea861cc1c4
Merge pull request #8542 from Morph1984/gpu-use-old-q
gpu_thread: Use the previous MPSCQueue implementation
2022-07-27 15:55:28 -04:00
Andrea Pappacoda cdb240f3d4
chore: make yuzu REUSE compliant
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.

Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.

The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.

Following REUSE has a few advantages over the current approach:

- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
  `.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
  files like binary assets / images is always accurate and up to date

To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.

[REUSE]: https://reuse.software

Follow-up to 01cf05bc75
2022-07-27 12:53:49 +02:00
Liam 382b41b18f video_core: use correct byte size for framebuffer 2022-07-19 17:46:26 -04:00
bunnei 02282477e7 yuzu: settings: Remove framerate cap and merge unlocked framerate setting.
- These were all somewhat redundant.
2022-07-16 23:11:39 -07:00
Morph fa09f7aa6c gpu_thread: Use the previous MPSCQueue implementation
The bounded MPSCQueue implementation causes crashes in Fire Emblem Three Houses, use the previous implementation for now.
2022-07-06 01:33:17 -04:00
Morph aec129c1ab renderer_(gl/vk): Implement ASTC_10x6_UNORM
- Used by Monster Hunter Rise Update 10.0.2
2022-07-05 20:33:43 -04:00
lat9nq d41ffb592c
Revert "vulkan_device: Block AMDVLK's VK_KHR_push_descriptor" 2022-06-29 16:35:06 -04:00
german77 c34a95fa25 video_core: Replace VKUpdateDescriptorQueue with UpdateDescriptorQueue 2022-06-26 20:21:45 -05:00
german77 b5d6194f6d video_core: Replace VKSwapchain with Swapchain 2022-06-26 20:21:45 -05:00
german77 a5e419535f video_core: Replace VKQueryCache with QueryCache 2022-06-26 20:21:45 -05:00
german77 9775fae4eb video_core: Replace VKScheduler with Scheduler 2022-06-26 20:21:45 -05:00
german77 a262dc02b5 video_core: Replace VKBlitScreen with BlitScreen 2022-06-26 20:21:45 -05:00
german77 fca5752690 video_core: Replace VKFenceManager with FenceManager 2022-06-26 20:21:45 -05:00
liamwhite 0ae4eae9a6
Merge pull request #8460 from Morph1984/bounded-q
bounded_threadsafe_queue: Use constexpr capacity and mask
2022-06-15 19:39:22 -04:00
Morph 25429998e3 bounded_threadsafe_queue: Use constexpr capacity and mask
While this is the primary change, we also:
- Remove the mpsc namespace and rename Queue to MPSCQueue
- Make Slot a private struct within MPSCQueue
- Remove the AlignedAllocator template argument, as we use std::allocator
- Replace instances of mask + 1 with capacity, and mask + 2 with capacity + 1
2022-06-15 16:59:13 -04:00
Morph 4572634a4e vk_compute_pass: Explicitly cast to VkAccessFlags
According to the standard, a narrowing conversion is an implicit conversion from an integer or unscoped enumeration type to an integer type that cannot represent all the values of the original type, except when the value is a literal or constant expression.
MSVC, unlike GCC or Clang, determines this to be a narrowing conversion despite the enumeration exclusively containing values that fit within the range of a 32 bit integer, emitting a warning since designated initializers prohibit narrowing conversions.
To solve this, explicitly cast to the type we are initializing.
2022-06-15 07:12:16 -04:00
Mai 103997ee56
Merge pull request #8383 from Morph1984/shadow-of-the-past
yuzu: Make variable shadowing a compile-time error
2022-06-14 21:08:58 -04:00
Morph 5568763a57 vk_compute_pass: Use VK_ACCESS_NONE
This enumeration was introduced in Vulkan 1.3, prefer using this instead of defaulting the enum.

Also resolves a narrowing conversion warning on MSVC.
2022-06-14 09:14:13 -04:00
Mai a3b12e3809
Merge pull request #8439 from liamwhite/monkey-compiler
general: fix compilation on GCC 12
2022-06-14 08:34:16 -04:00
Morph fcfe192e83 vk_compute_pass: Silence Wextra warning
Silences a warning about using enumerated and non-enumerated types in a conditional expression.
2022-06-14 05:29:57 -04:00
Liam ebecdd3a74 general: fix compilation on MinGW GCC 12 2022-06-13 20:09:32 -04:00
Liam 084d7d6b01 common: Change semantics of UNREACHABLE to unconditionally crash 2022-06-13 20:09:00 -04:00
Morph efc89c032b CMakeLists: Make variable shadowing a compile-time error
Now that the entire project is free of variable shadowing, we can enforce this as a compile time error to prevent any further introduction of this logic bug.
2022-06-13 18:19:23 -04:00
bunnei 5282efac1b
Merge pull request #8413 from behunin/bounded-queue
gpu_thread: Move to bounded queue
2022-06-11 00:07:18 -07:00
bunnei ae83d5c6d3
Merge pull request #8393 from lat9nq/default-vulkan
general: Set renderer_backend's default to Vulkan
2022-06-11 00:06:59 -07:00
Levi Behunin 4dd6bcd206 gpu_thread: Move to bounded queue 2022-06-02 19:37:46 -06:00
Billy Laws ea89cf8639 Maxwell3D: Fix 3D semaphore counter type 0 handling
Counter type 0 actually releases the semaphore payload rather than a constant zero as was previously thought. This is required by Skyrim.
2022-06-02 21:46:38 +01:00
Liam 989d4a7a41 core/debugger: Improved stepping mechanism and misc fixes 2022-06-01 02:15:15 -04:00
lat9nq b43ae9d5ed vulkan_library: Add debug logging 2022-05-30 10:57:59 -04:00
bunnei 1c8b509441
Merge pull request #8332 from Morph1984/reduce_exec_size
general: Use smaller array types where applicable
2022-05-29 02:33:24 -07: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
bunnei 79352ee9d5
Merge pull request #8369 from lat9nq/amd-wmel-workaround
vulkan_device: Workaround extension bug
2022-05-25 13:07:28 -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
bunnei 4118aad491
Merge pull request #8311 from asLody/fix-stencil-faces
vk_rasterizer: fix stencil test when two faces are disabled
2022-05-24 18:37:31 -07:00
Alexandre Bouvier 020982508d video_core: Support new VkResult 2022-05-17 17:37:10 +02:00
Morph 370d3fa1e3 video_core/surface: Use u8 for PixelFormat block tables
Using this smaller type saves 33280 bytes in the compiled executable.
2022-05-13 00:51:11 -04:00
Morph b3f8c7ce58 codecs/vp9: Use u8 for norm and map luts
Using this smaller type saves 1536 bytes in the compiled executable.
2022-05-13 00:51:05 -04:00
Morph 2fb6df3fe9
Merge pull request #8314 from liamwhite/gl-flip-2
OpenGL: interpret face flips according to GL NDC
2022-05-11 17:51:18 -04:00
Morph dca63391b6
Merge pull request #8313 from liamwhite/dma-bpp
maxwell_dma: fix bytes_per_pixel
2022-05-11 17:51:02 -04:00
Liam e7ba9fd7e1 maxwell_dma: use fallback if remapping is enabled 2022-05-10 19:26:48 -04:00
Liam e158951695 video_core/macro: clear code on upload address assignment 2022-05-10 17:07:21 -04:00
Fernando Sahmkow 5562ae9cc5 VideoCore: Add option to dump the macros.
Co-Authored-By: liamwhite <liamwhite@users.noreply.github.com>
2022-05-08 21:37:34 -04:00
Liam 7fe5004f90 video_core/macro_jit_x64: warn on invalid parameter access 2022-05-08 02:48:03 -04:00
Liam b317f54f22 OpenGL: implement face flips according to NDC 2022-05-06 20:05:21 -04:00
Liam 4f1a2c2562 maxwell_dma: fix bytes per pixel 2022-05-06 18:18:00 -04:00
Lody 535bc61b4c vk_rasterizer: fix stencil test when two faces are disabled 2022-05-06 14:47:55 +08:00
Mai M ca28b447ac
Merge pull request #8280 from Tachi107/spdx-fixup
chore: add missing SPDX tags
2022-04-28 23:28:42 -04:00
Mai M 5687bc6e10
Merge pull request #8282 from liamwhite/gcc-12
GCC 12 fixes
2022-04-28 23:28:07 -04:00
Liam 709d7fd92c GCC 12 fixes 2022-04-28 16:50:34 -04:00
Andrea Pappacoda 01cf05bc75
chore: add missing SPDX tags
Follow-up to 99ceb03a1c
2022-04-28 18:24:11 +02:00
Morph 213120a98b renderer_vulkan: Update screen info if the framebuffer size has changed 2022-04-26 02:48:40 -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
german77 3e77466b86 bootmanager: Don't create another screenshot request if previous one is not done yet 2022-04-18 01:00:48 -05:00
Fernando Sahmkow f783883bf8 video_core: implement formats for N64 emulation 2022-04-14 11:06:27 -04:00
Liam d4571b123d buffer_cache: cap vertex buffer sizes 2022-04-14 10:46:48 -04:00
Liam a24e7ba61b maxwell3d: add small_index_2 register 2022-04-14 09:57:06 -04:00
bunnei bf3c6f8812
Merge pull request #8149 from liamwhite/front-face
OpenGL: flip front faces if Z scale is inverted
2022-04-09 01:39:39 -07:00
Merry bbc585881a video_core: Replace lock_guard with scoped_lock 2022-04-07 19:44:07 +01:00
Fernando S 4265372099
Merge pull request #8161 from liamwhite/gl-s8d24
OpenGL: fix S8D24 to ABGR8 conversions
2022-04-07 16:59:41 +02:00
Fernando S 03d5794183
Merge pull request #8152 from liamwhite/gl-crop
OpenGL: fix cropping
2022-04-07 16:58:59 +02:00
Liam 52ebdd42c6 OpenGL: fix S8D24 to ABGR8 conversions 2022-04-06 19:44:33 -04:00
bunnei 02473ea7d5
Revert "texture_cache/util: Remove unneeded ReadBlockUnsafe" 2022-04-04 16:26:53 -07:00
ameerj 494c41dd5a texture_cache/util: Remove unneeded ReadBlockUnsafe
This call was reading GPU memory into the dst buffer, which is then overwritten by the SwizzleTexture call.
2022-04-04 15:57:54 -04:00
Liam b7be6a4316 OpenGL: fix cropping 2022-04-04 12:51:09 -04:00
Liam c59c035d74 Vulkan: crop to screen dimensions if crop not explicitly requested 2022-04-04 11:45:15 -04:00
Liam a57531854e OpenGL: propagate face flip condition 2022-04-04 10:32:14 -04:00
Liam cb913e5c02 OpenGL: flip front faces if Z scale is inverted 2022-04-04 10:19:40 -04:00
Andrea Pappacoda 0c214cb5b9
fix: typos 2022-04-02 16:34:07 +02:00
Fernando S 550844e5e8
Merge pull request #8128 from FernandoS27/gc-fixes
GPU Garbage Collection: Fix regressions.
2022-04-01 17:19:55 +02:00
Fernando S b1fdc02465
Merge pull request #8066 from ameerj/gpu-decode-fixes
codec: Fix GPU decoder detection on Windows and a memory leak
2022-04-01 01:37:22 +02:00
Fernando Sahmkow e9e671d101 GPU Garbage Collection: Fix regressions. 2022-04-01 01:36:24 +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
ameerj 3e489782e1 gl_rasterizer: Avoid scenario locking already owned mutex
gpu.TickWork() may lock the texture_cache and buffer_cache mutexes, which are owned by the thread prior to invoking TickWork().

Defer invoking gpu.TickWork() until the scope ends, where the owned mutexes are released.
2022-03-28 20:35:15 -04:00
bunnei af04f8b8e9
Revert "Memory GPU <-> CPU: reduce infighting in the texture cache by adding CPU Cached memory." 2022-03-26 12:38:30 -07:00
Fernando Sahmkow 7a9d9e575b Texture Cache: Add Cached CPU system. 2022-03-25 04:24:05 +01:00
bunnei ab6a5784fa
Merge pull request #7720 from FernandoS27/yfc-gc
First Nugget: Reworked Garbage Collection to be smarter [originally from Project YFC]
2022-03-24 20:16:11 -07:00
Fernando Sahmkow 9872d4bc4f GC: Address Feedback. 2022-03-25 03:05:56 +01:00
bunnei ca12a77670 hle: nvflinger: Migrate android namespace -> Service::android. 2022-03-24 18:13:33 -07:00
bunnei 7f4165fc05 hle: vi: Integrate new NVFlinger and HosBinderDriverServer service. 2022-03-24 18:13:33 -07:00
bunnei 05d80fba38 hle: nvflinger: Move BufferTransformFlags to its own header. 2022-03-24 18:13:32 -07:00
bunnei d456b9d554 hle: nvflinger: Move PixelFormat to its own header. 2022-03-24 18:13:32 -07:00
Fernando Sahmkow 9edbbf2af4 Garbage Collection: Final tuning. 2022-03-25 01:51:52 +01:00
Fernando Sahmkow 5e982a7812 Buffer Cache: Tune to the levels of the new GC. 2022-03-25 01:51:51 +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
Liam dea5de91d2 buffer_cache: reset cached write bits after flushing invalidations 2022-03-23 20:59:01 -04:00
bunnei 82ac66f8a4
Merge pull request #8048 from ameerj/include-purge
general: Reduce unused includes across the project
2022-03-21 18:03:54 -07:00
ameerj 15f9472b15 codec: Plug GPU decoder memory leak 2022-03-21 20:22:52 -04:00
ameerj 109566fc8f codec: Disable HW_FRAMES method check on Windows
It was reported that this method causes crashes on certain Linux decoding backends, hence the check to avoid it.

This subsequently caused Windows GPU decoders to never be selected and always fall back to CPU decoding, disable the check on Windows for now.
2022-03-21 20:21:09 -04:00
bunnei ff2e891022
Merge pull request #7812 from FernandoS27/made-straight-from-the-nut
BufferCache: Find direction of the stream buffer increase.
2022-03-20 15:23:53 -07:00
Fernando Sahmkow 3b0d233cbd BufferCache: Find direction of the stream buffer increase. 2022-03-20 21:37:23 +01:00
Fernando S 7c05c987a3
Merge pull request #8036 from ameerj/starbit-nv
vk_texture_cache: Do not reinterpret DepthStencil source images
2022-03-20 13:35:59 +01:00
bunnei 150f6db4d1
Merge pull request #7840 from lioncash/bitor
texture_cache: Amend unintended bitwise OR in SynchronizeAliases
2022-03-20 02:19:30 -07:00
ameerj 866b7c20a8 general: Fix clang/gcc build errors 2022-03-20 02:25:09 -04:00
ameerj 923decae5a common: Reduce unused includes 2022-03-19 15:01:31 -04:00
ameerj 1bc7d61b57 video_core: Reduce unused includes 2022-03-19 15:01:31 -04:00
ameerj d618bba8a6 general: Reduce core.h includes 2022-03-18 02:13:02 -04:00
ameerj 4d840aa903 vk_texture_cache: Do not reinterpret DepthStencil source images
Fixes star pointer interactions in Super Mario Galaxy on some drivers, notably Nvidia.

Co-Authored-By: Fernando S. <1731197+fernandos27@users.noreply.github.com>
2022-03-17 20:55:05 -04:00
Fernando S a616f49864
Merge pull request #8030 from liamwhite/s8d24-conversion
Vulkan: convert S8D24 <-> ABGR8
2022-03-18 00:36:06 +01:00
Liam 6407f16d81 Address review comments 2022-03-16 18:00:42 -04:00
Fernando S c3c351e2c2
Merge pull request #8023 from ameerj/kirby-pop-in
maxwell_3d: Implement a safer CB data upload
2022-03-16 12:14:08 +01:00
Liam bcc2d7e69b Vulkan: convert S8D24 <-> ABGR8 2022-03-15 20:05:21 -04:00
ameerj 5119a57614 maxwell_3d: Implement a safer CB data upload
This makes constant buffer uploads safer and more accurate by updating the GPU memory as soon as the CB Data method is invoked. The previous implementation was deferring the updates until a different maxwell 3d method was detected, then writing all CB data at once.
2022-03-14 19:18:36 -04:00
Fernando S f9e1f559b1
Merge pull request #8000 from liamwhite/hagi
Initial support for Wii Hagi emulator
2022-03-15 00:08:05 +01:00
byte[] be0e6a2bb4 Maxwell3D: Link to override constant definition in nouveau 2022-03-14 11:06:25 -04:00
byte[] 364c67e49b Maxwell3D: restore original topology when topology overrides are disabled 2022-03-14 11:00:08 -04:00
Liam 37aa472269 Maxwell3D: Use override constants from nouveau
This fixes some incorrect rendering in Sunshine
2022-03-14 10:11:58 -04:00
ameerj e8c50e709e emit_spirv, vk_compute_pass: Resolve VS2022 compiler errors 2022-03-12 02:54:33 -05:00
Liam 56c646d82c Maxwell3D: Restrict topology override effect to after the register is set 2022-03-11 19:42:12 -05:00
Liam 70e632f153 Maxwell3D: mark index buffers as dirty after updating counts 2022-03-11 08:51:22 -05:00
Liam 82c3042c0f TextureCacheRuntime: allow converting D24S8 to ABGR8
I can't see how this would be useful, but Galaxy uses it.
2022-03-10 20:25:34 -05:00
Liam f1521183f8 Maxwell3D: read small-index draw and primitive topology override registers
This allows Galaxy and Sunshine to render for the first time.
2022-03-10 19:21:04 -05:00
bunnei f2743b41b0
Merge pull request #7986 from lat9nq/vk-callback
core, video_core: Fix two crashes when failing to create the emulated GPU instance
2022-03-08 12:36:57 -08:00
lat9nq b5e60ae1b0 video_core: Cancel Scoped's exit call on GPU failure
When CreateRenderer fails, the GraphicsContext that was std::move'd into
it is destroyed before the Scoped that was created to manage its
currency. In that case, the GraphicsContext::Scoped will still call its
destructor at the ending of the function. And because the context is
destroyed, the Scoped will cause a crash as it attempts to call a
destroyed object's DoneCurrent function.

Since we know when the call would be invalid, call the Scoped's Cancel
method. This prevents it from calling a method on a destroyed object.
2022-03-07 18:21:56 -05:00
Fernando S 58b52f4884
Merge pull request #7930 from asLody/dma-semaphore
MaxwellDMA: Implement semaphore operations
2022-03-07 21:53:38 +01:00
Lody 4498908e72 MaxwellDMA: Implement semaphore operations 2022-03-07 13:46:18 +08:00
Ameer J 370e480c8c
gl_graphics_pipeline: Improve shader builder synchronization using fences (#7969)
* gl_graphics_pipeline: Improve shader builder synchronization

Make use of GLsync objects to ensure better synchronization between shader builder threads and the main context

* gl_graphics_pipeline: Make built_fence access threadsafe

* gl_graphics_pipeline: Use GLsync objects only when building in parallel

* gl_graphics_pipeline: Replace GetSync calls with non-blocking waits

The spec states that a ClientWait on a Fence object ensures the changes propagate to the calling context
2022-03-06 16:46:49 +01:00
ameerj 7f7df43da2 gl_fence_manager: Minor optimization to signal querying
Per the spec, bufSize is the number of integers that will be written, in this case, 1.

Also, the length argument is optional if the information of the number of elements written is not needed.
2022-02-27 17:57:33 -05:00
bunnei 56d9052b73
Merge pull request #7953 from ameerj/radv-rdna2-crash
vulkan_device: Blacklist RADV on RDNA2 from VK_EXT_vertex_input_dynamic_state
2022-02-26 01:19:13 -08:00
Mai M 91d802f68d
Merge pull request #7948 from Morph1984/11-11-10-float
maxwell_to_(gl/vk): Add 11_11_10 float vertex format
2022-02-26 00:09:44 -05: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
Morph e292b2d991 maxwell_to_(gl/vk): Add 11_11_10 float vertex format
- Used by パワプロクンポケットR
2022-02-25 17:11:17 -05:00
Lody 6978093404 vk_blit_screen: Add missing format bgra8 2022-02-24 19:25:39 +08: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
bunnei 8ec32e9755
Merge pull request #7814 from FernandoS27/another-bug-in-my-schedule
Vulkan: Fix Scheduler Chunks when their FuncType is 0.
2022-02-02 19:15:06 -07:00
Lioncash e015dc8264 texture_cache: Ensure has_blacklisted is always initialized
Resolves a -Wmaybe_uninitialized warning
2022-02-02 14:37:27 -05:00
Lioncash 7367e55d1d texture_cache: Remove dead code within SynchronizeAliases
Since these were being copied by value, none of the changes applied in
the loop would be reflected.

However, from the looks of it, this would already be applied within
CopyImage() anyways, so this can be removed.
2022-02-02 14:37:22 -05:00
Lioncash 856f576c05 texture_cache: Amend unintended bitwise OR in SynchronizeAliases 2022-02-02 14:20:58 -05:00
Lioncash f785f73e92 general: Replace NonCopyable struct with equivalents 2022-02-02 13:17:12 -05:00
Morph 26a9dc3f65
Merge pull request #7824 from lioncash/scache
video_core/shader_cache: Take std::span in RemoveShadersFromStorage()
2022-02-01 01:58:38 -05:00
Lioncash 360a97ab54 video_core/shader_cache: Remove unused algorithm include 2022-02-01 01:41:05 -05:00
Lioncash 540ed72e99 video_core/shader_cache: Take std::span in RemoveShadersFromStorage()
Same behavior, but without the need to move into the function to avoid
an allocation.
2022-02-01 01:40:41 -05:00
Fernando Sahmkow 8a6e6465a7 Rasterizer: Refactor inlineToMemory. 2022-02-01 01:47:28 +01:00
Fernando Sahmkow 35ed051742 Vulkan: Fix Scheduler Chunks when their FuncType is 0. 2022-01-31 17:08:08 +01:00
Fernando Sahmkow d0a5a48948 GPU: Improve syncing. 2022-01-29 23:02:04 +01:00
Fernando Sahmkow 4258d515e6 Rasterizer: Implement Inline2Memory Acceleration. 2022-01-29 22:53:27 +01:00
Fernando Sahmkow f54280dafd Inline2Memory: Flush before writting buffer. 2022-01-29 17:42:28 +01:00
ameerj f300a1d54b buffer_cache: Reduce stream buffer allocations when expanding from the left
The existing stream buffer optimization accounts for size increases at the end of the allocated buffer.
This adds the same optimization, increasing the size from the beginning of the buffer as well to reduce buffer allocations when expanding the same buffer from the left.
2022-01-27 15:31:43 -05:00
Lioncash f6a049337e common/xbyak_api: Make BuildRegSet() constexpr
This allows us to eliminate any static constructors that would have been
emitted due to the function not being constexpr.
2022-01-26 16:29:15 -05:00
bunnei 40050c1188
Merge pull request #7780 from lioncash/macro
video_core/macro: Move impl classes into their cpp files
2022-01-26 12:39:59 -08:00
Morph c93dd45997
Merge pull request #7779 from lioncash/gpu-iface
gpu: Remove obsoleted CDmaPusher() accessors
2022-01-25 16:16:04 -05:00
Lioncash a8a4f37628 video_core/macro: Add missing <cstring> header
Necessary since memcpy is used.
2022-01-25 14:10:02 -05:00
Lioncash 81d1a1133d video_core/macro_interpreter: Move impl class to the cpp file
Keeps the implementation hidden from the intended API and lessens the
header dependencies on the interpreter's header.
2022-01-25 14:03:48 -05:00
Lioncash cfd9f7d25b video_core/macro_hle: Return unique_ptr directly from GetHLEProgram()
Same behavior, but less code and header dependencies.
2022-01-25 13:50:14 -05:00
Lioncash a05d9405b9 video_core/macro: Remove unused parameter from Execute()
Simplifies the function interface.
2022-01-25 13:41:38 -05:00
Lioncash 74f80299b0 video_core/macro_jit_x64: Remove unused impl class member
Reduces the size of the impl class a tiny bit.
2022-01-25 13:33:09 -05:00
Lioncash f11eefed56 video_core/macro_jit_x64: Decouple PersistentCallerSavedRegs() from impl
This doesn't depend on class state and can just be a regular function.
2022-01-25 13:31:54 -05:00
Lioncash 6b873b72ae video_core/macro_jit_x64: Move impl class into cpp file
Keeps the implementation internalized and also reduces API-facing header
dependencies.

Notably, this fully internalizes all of the xbyak externals.
2022-01-25 13:31:46 -05:00
Lioncash a3c81745b1 video_core/macro_hle: Move impl class into cpp file
Given it's intended to be an internal implementation class, we can move
it into the cpp file to ensure that.

This also lets us move some header dependencies into the cpp file as
well.
2022-01-25 13:15:48 -05:00
Lioncash d8486a9968 gpu: Tidy up forward declarations
Over time a few forward declarations became unnecessary, so we can
remove these to tidy up the header a little bit.
2022-01-25 13:05:39 -05:00
Lioncash 9b38c8ef08 gpu: Remove obsoleted CDMAPusher() accessors
These were obsoleted in 2c47f8aa18 but
were accidentally overlooked.
2022-01-25 12:53:56 -05:00
Lioncash e7af84670d vk_fsr: Replace comma operator with semicolon
Generally, we should be ending statements with a semicolon not a comma

Resolves a clang diagnostic.
2022-01-25 12:42:27 -05:00
Jan Beich d24a4b79d4 video_core: constify AVCodec for ffmpeg >= 5.0
src/video_core/command_classes/codecs/codec.cpp:177:16: error: assigning to 'AVCodec *' from 'const AVCodec *' discards qualifiers
    av_codec = avcodec_find_decoder(codec);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-01-20 11:09:21 +00:00
Georg Lehmann d15814d39f vulkan_device: Fix sType for VkPhysicalDeviceShaderAtomicInt64Features 2022-01-19 19:48:46 +01:00
ameerj a5bff8e9b3 astc_decoder: Combine FastReplicate functions to work around new NV driver bug
The new Nvidia drivers have a bug where the FastReplicateTo6 function produces a lookup into the REPLICATE_TO_8 table rather than the REPLICATE_TO_6 table.

This seems to be an optimization gone wrong. Combining the logic of the FastReplicate functions seems to address the bug.
2022-01-16 16:13:20 -05:00
Fernando S a95c49e7d0
Merge pull request #7658 from ameerj/sparse-fixes
video_core/memory_manager: Fixes for sparse memory management
2022-01-06 13:50:14 +01:00
Mai M 7116a7d28b
Merge pull request #7673 from german77/no_return
glsl: Remove unreachable return
2022-01-05 06:41:16 -05:00
Narr the Reg 41bbb31af4 video_core: Remove unnecesary maybe_unused flag 2022-01-04 21:25:47 -06:00
bunnei afb06b1495
Merge pull request #7636 from vonchenplus/buffer_queue_query
core:hle:service:nvflinger Implement few type in bufferqueue query method
2022-01-04 11:28:49 -08:00
Fernando S 118d5fa3b0
Merge pull request #7670 from ameerj/vsync-block
gpu: Add shut down method to synchronize threads before destruction
2022-01-04 14:16:24 +01:00
bunnei c68a0d17fc
Merge pull request #7251 from FernandoS27/shader-dump
ShaderDecompiler: Add a debug option to dump the game's shaders.
2022-01-03 17:56:30 -08:00
ameerj c17938f96b gpu: Add shut down method to synchronize threads before destruction 2022-01-03 20:47:26 -05:00
Fernando Sahmkow f58ee3f15f ShaderDecompiler: Add a debug option to dump the game's shaders. 2022-01-04 02:39:00 +01:00
ameerj 7652543231 Revert "Merge pull request #7668 from ameerj/fence-stop-token"
This reverts commit e773354477, reversing
changes made to abbbdc2bc0.
2022-01-03 20:28:54 -05:00
ameerj d866916f42 gpu: Use std::stop_token in WaitFence for VSync thread
Fixes a hang that may occur when stopping emulation and the VSync thread is blocked on the syncpoint condition variable.
2022-01-03 12:31:33 -05:00
Fernando S 3fa9702952
Merge pull request #7624 from ameerj/intel-msaa-scale
vk_texture_cache: Use 3D scale helpers for MSAA texture scaling on Intel Windows drivers
2022-01-03 00:40:14 +01:00
Fernando S ae7da0b12d
Merge pull request #7629 from ameerj/nv-driver-fixes
shaders: Add fixes for NVIDIA drivers 495+
2022-01-03 00:39:59 +01:00
ameerj 951c61aeaa texture_cache/util: Fix s32 overflow when resolving overlaps 2021-12-31 20:03:22 -05:00
ameerj 285b6dbc39 video_core/memory_manager: Fixes for sparse memory management 2021-12-31 17:04:02 -05:00
ameerj 2428214c4b video_core/memory_manager: Deduplicate Read/WriteBlock 2021-12-31 02:08:22 -05:00
ameerj 8c907c620d glsl: Add boolean reference workaround 2021-12-29 19:03:50 -05:00
ameerj b84d429c2e glsl_context_get_set: Add alternative cbuf type for broken drivers
some drivers have a bug bitwise converting floating point cbuf values to uint variables. This adds a workaround for these drivers to make all cbufs uint and convert to floating point as needed.
2021-12-29 19:03:50 -05:00
Feng Chen e18bf4b062 Remove invalid header include 2021-12-28 18:51:11 +08:00
bunnei f67605e6aa
Merge pull request #7622 from ameerj/vk-rescale-invalid-ptr
vk_texture_cache: Fix invalidated pointer access
2021-12-28 00:46:37 -08: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
ameerj cbc0f0a66e blit_image: Remove unused function 2021-12-23 21:06:32 -05:00
ameerj 481b210c0d vk_texture_cache: Fix invalidated pointer access
The vulkan ImageView held a reference to its source image for rescale status checking. This pointer is sometimes invalidated when the texture cache slot_images container is resized.
To avoid an invalid pointer dereference, the ImageView now holds a reference to the container itself.
2021-12-23 20:55:48 -05:00
Fernando S 648c7b4ed6
Merge pull request #7375 from vonchenplus/convert_legacy
Convert all legacy attributes to generic attributes
2021-12-22 17:36:05 +01:00
bunnei 36df305b13
Merge pull request #7599 from FernandoS27/primrestart-vulkan
Vulkan: Fix Primitive Restart and implement Logical Operations
2021-12-22 00:19:23 -08:00
Jan Beich e57b13ad94 video_core/codecs: re-enable VAAPI/VDPAU on BSDs after 72aa418b0b 2021-12-18 20:57:30 +00:00
bunnei 2030522d86
Merge pull request #7587 from liushuyu/fix-linux-decoding
[Patch v2] externals/ffmpeg: refactor ffmpeg searching and handling in cmake
2021-12-18 02:33:07 -08:00
vonchenplus 4908a07c20 Address format clang 2021-12-18 14:27:07 +08:00
Fernando Sahmkow 6c00151d17 Vulkan: Fix the checks for primitive restart extension. 2021-12-18 07:17:08 +01:00
Fernando S 04b4f3b051
Merge pull request #7399 from ameerj/art-refactor
video_core: Refactoring post A.R.T. merge
2021-12-18 07:09:58 +01:00
Feng Chen e49184e606
Merge branch 'yuzu-emu:master' into convert_legacy 2021-12-18 13:57:14 +08: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
bunnei 7cf74abbf5
Merge pull request #7551 from vonchenplus/fix_blit_image_view_mismatching
Fix blit image/view not compatible
2021-12-15 21:39:53 -08:00
liushuyu 3f765ea9a4 video_core/codecs: (re-spin) refactor ffmpeg searching and handling 2021-12-15 20:57:01 -07:00
bunnei 2f32133ad5
Revert "video_core/codecs: refactor ffmpeg searching and handling in cmake" 2021-12-15 00:02:53 -08:00
bunnei 156215d1fa
Merge pull request #7565 from liushuyu/fix-linux-decoding
video_core/codecs: refactor ffmpeg searching and handling in cmake
2021-12-14 22:27:13 -08:00
liushuyu dd72e4dce4
CI: fix CI on Linux 2021-12-13 22:31:19 -07:00
liushuyu a2d73eaa10 video_core/codecs: skip decoders that use hw frames ...
... this would resolve some edge-cases where multiple devices are
present and ffmpeg is unable to auto-supply the hw surfaces
2021-12-13 22:29:19 -07:00
Morph 14110230c7 maxwell_to_vk: Add ASTC_2D_5X4_UNORM 2021-12-10 22:44:24 -05:00
Feng Chen 1598426493 Fix blit image/view not compatible 2021-12-10 12:41:09 +08:00
Morph ae4869650a maxwell_to_vk: Add ASTC_2D_8X5_UNORM
- Used by Lego City Undercover
2021-12-09 13:53:53 -05:00
Morph 429320aee8
Merge pull request #7495 from FernandoS27/text-blit-fix-again
Texture Cache: Fix mismatching image/views on blits
2021-12-09 05:26:21 -05:00