summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/renderer_vulkan.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* video_core: Replace VKSwapchain with Swapchaingerman772022-06-271-1/+1
|
* video_core: Replace VKScheduler with Schedulergerman772022-06-271-2/+2
|
* video_core: Replace VKBlitScreen with BlitScreengerman772022-06-271-1/+1
|
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | 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.
* video_core: Reduce unused includesameerj2022-03-191-1/+0
|
* renderer_vulkan: Implement screenshotsameerj2021-07-291-0/+2
|
* video_core: Add GPU vendor name to window title barameerj2021-06-211-0/+4
|
* video_core: Reimplement the buffer cacheReinUsesLisp2021-02-131-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reimplement the buffer cache using cached bindings and page level granularity for modification tracking. This also drops the usage of shared pointers and virtual functions from the cache. - Bindings are cached, allowing to skip work when the game changes few bits between draws. - OpenGL Assembly shaders no longer copy when a region has been modified from the GPU to emulate constant buffers, instead GL_EXT_memory_object is used to alias sub-buffers within the same allocation. - OpenGL Assembly shaders stream constant buffer data using glProgramBufferParametersIuivNV, from NV_parameter_buffer_object. In theory this should save one hash table resolve inside the driver compared to glBufferSubData. - A new OpenGL stream buffer is implemented based on fences for drivers that are not Nvidia's proprietary, due to their low performance on partial glBufferSubData calls synchronized with 3D rendering (that some games use a lot). - Most optimizations are shared between APIs now, allowing Vulkan to cache more bindings than before, skipping unnecesarry work. This commit adds the necessary infrastructure to use Vulkan object from OpenGL. Overall, it improves performance and fixes some bugs present on the old cache. There are still some edge cases hit by some games that harm performance on some vendors, this are planned to be fixed in later commits.
* gpu: Report renderer errors with exceptionsReinUsesLisp2021-02-131-26/+17
| | | | | | Instead of using a two step initialization to report errors, initialize the GPU renderer and rasterizer on the constructor and report errors through std::runtime_error.
* renderer_vulkan: Rename Vulkan memory manager to memory allocatorReinUsesLisp2021-01-151-2/+2
| | | | | "Memory manager" collides with the guest GPU memory manager, and a memory allocator sounds closer to what the abstraction aims to be.
* renderer_vulkan: Rename VKDevice to DeviceReinUsesLisp2021-01-031-2/+2
| | | | | | | The "VK" prefix predates the "Vulkan" namespace. It was carried around the codebase for consistency. "VKDevice" currently is a bad alias with "VkDevice" (only an upcase character of difference) that can cause confusion. Rename all instances of it.
* vulkan_instance: Allow different Vulkan versions and enforce 1.1ReinUsesLisp2020-12-311-1/+0
| | | | | | | For listing the available physical devices we can use Vulkan 1.0. Now that MoltenVK supports 1.1 we can require it for running games. Add missing documentation.
* renderer_vulkan: Remove two step initialization on VKDeviceReinUsesLisp2020-12-311-1/+1
| | | | | The Vulkan device abstraction either initializes successfully on the constructor or throws a Vulkan exception.
* renderer_vulkan: Initialize surface in separate fileReinUsesLisp2020-12-311-2/+0
| | | | | | Move surface initialization code to a separate file. It's unlikely to use this code outside of Vulkan, but keeping platform-specific code (Win32, Xlib, Wayland) in its own translation unit keeps things cleaner.
* renderer_vulkan: Create debug callback on separate file and throwReinUsesLisp2020-12-311-3/+1
| | | | | | | | Initialize debug callbacks (messenger) from a separate file. This allows sharing code with different backends. Change our Vulkan error handling to use exceptions instead of error codes, simplifying the initialization process.
* vulkan_common: Rename renderer_vulkan/wrapper.h to vulkan_common/vulkan_wrapper.hReinUsesLisp2020-12-311-1/+1
| | | | Allows sharing Vulkan wrapper code between different rendering backends.
* video_core: Rewrite the texture cacheReinUsesLisp2020-12-301-2/+1
| | | | | | | | | | | | | | The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage.The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage. This commit aims to address those issues.
* video_core: Resolve more variable shadowing scenarios pt.2Lioncash2020-12-051-3/+3
| | | | | | | Migrates the video core code closer to enabling variable shadowing warnings as errors. This primarily sorts out shadowing occurrences within the Vulkan code.
* Merge pull request #4204 from ReinUsesLisp/vulkan-1.0bunnei2020-10-191-0/+2
|\ | | | | renderer_vulkan: Create and properly use Vulkan 1.0 instances when 1.1 is not available
| * vk_device: Use Vulkan 1.0 properlyReinUsesLisp2020-08-201-0/+2
| | | | | | | | | | Enable the required capabilities to use Vulkan 1.0 without validation errors and disable those that are not compatible with it.
* | Merge pull request #4674 from ReinUsesLisp/timeline-semaphoresbunnei2020-09-241-4/+1
|\ \ | | | | | | renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore
| * | renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphoreReinUsesLisp2020-09-191-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reworks how host<->device synchronization works on the Vulkan backend. Instead of "protecting" resources with a fence and signalling these as free when the fence is known to be signalled by the host GPU, use timeline semaphores. Vulkan timeline semaphores allow use to work on a subset of D3D12 fences. As far as we are concerned, timeline semaphores are a value set by the host or the device that can be waited by either of them. Taking advantange of this, we can have a monolithically increasing atomic value for each submission to the graphics queue. Instead of protecting resources with a fence, we simply store the current logical tick (the atomic value stored in CPU memory). When we want to know if a resource is free, it can be compared to the current GPU tick. This greatly simplifies resource management code and the free status of resources should have less false negatives. To workaround bugs in validation layers, when these are attached there's a thread waiting for timeline semaphores.
* | | renderer_opengl: Remove emulated mailbox presentationReinUsesLisp2020-09-201-1/+0
|/ / | | | | | | | | Emulated mailbox presentation was causing performance issues on Nvidia's OpenGL driver. Remove it.
* | video_core: Remove all Core::System references in rendererReinUsesLisp2020-09-061-3/+13
| | | | | | | | | | | | | | | | | | Now that the GPU is initialized when video backends are initialized, it's no longer needed to query components once the game is running: it can be done when yuzu is booting. This allows us to pass components between constructors and in the process remove all Core::System references in the video backend.
* | video_core: Initialize renderer with a GPUReinUsesLisp2020-08-221-1/+4
|/ | | | | Add an extra step in GPU initialization to be able to initialize render backends with a valid GPU instance.
* vulkan: Remove unnecessary includesLioncash2020-04-291-1/+0
| | | | | | | Reduces some header churn and reduces rebuilds when some header internals change. While we're at it we can also resolve a missing include in buffer_cache.
* renderer_vulkan: Drop Vulkan-HppReinUsesLisp2020-04-111-5/+5
|
* yuzu: Drop SDL2 and Qt frontend Vulkan requirementsReinUsesLisp2020-04-071-5/+11
| | | | Create Vulkan instances and surfaces from the Vulkan backend.
* renderer_vulkan: Query device names from the backendReinUsesLisp2020-04-071-0/+3
|
* Frontend/GPU: Refactor context managementJames Rowe2020-03-251-1/+1
| | | | | | | | | | | | | | | | | | | | Changes the GraphicsContext to be managed by the GPU core. This eliminates the need for the frontends to fool around with tricky MakeCurrent/DoneCurrent calls that are dependent on the settings (such as async gpu option). This also refactors out the need to use QWidget::fromWindowContainer as that caused issues with focus and input handling. Now we use a regular QWidget and just access the native windowHandle() directly. Another change is removing the debug tool setting in FrameMailbox. Instead of trying to block the frontend until a new frame is ready, the core will now take over presentation and draw directly to the window if the renderer detects that its hooked by NSight or RenderDoc Lastly, since it was in the way, I removed ScopeAcquireWindowContext and replaced it with a simple subclass in GraphicsContext that achieves the same result
* vk_state_tracker: Initial implementationReinUsesLisp2020-02-281-0/+4
| | | | Add support for render targets and viewports.
* frontend: qt: bootmanager: Vulkan: Restore support for VK backend.bunnei2020-02-261-6/+2
|
* renderer_vulkan: Add header as placeholderReinUsesLisp2020-01-171-0/+72