aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_vulkan
AgeCommit message (Collapse)Author
2020-05-09Merge pull request #3842 from makigumo/maxwell_to_vk_vertexattribute_signed_intbunnei
maxwell_to_vk: implement missing signed int formats
2020-05-08Merge pull request #3885 from ReinUsesLisp/viewport-swizzlesbunnei
video_core: Implement viewport swizzles with NV_viewport_swizzle
2020-05-04vk_sampler_cache: Use VK_EXT_custom_border_color when availableReinUsesLisp
This should fix grass interactions on Breath of the Wild on Vulkan. It is currently untested against validation layers. Nvidia's Windows 443.09 beta driver or Linux 440.66.12 is required for now.
2020-05-04vk_graphics_pipeline: Implement viewport swizzles with NV_viewport_swizzleReinUsesLisp
2020-05-03Merge pull request #3808 from ReinUsesLisp/wait-for-idlebunnei
{maxwell_3d,buffer_cache}: Implement memory barriers using 3D registers
2020-05-02Merge pull request #3732 from lioncash/headerbunnei
vulkan: Remove unnecessary includes
2020-05-02Merge pull request #3809 from ReinUsesLisp/empty-indexbunnei
vk_rasterizer: Skip index buffer setup when vertices are zero
2020-05-02vk_graphics_pipeline: Implement rasterizer_enable on VulkanReinUsesLisp
We can simply enable rasterizer discard matching the current pipeline key.
2020-05-02Merge pull request #3693 from ReinUsesLisp/clean-samplersbunnei
shader/texture: Support multiple unknown sampler properties
2020-04-30maxwell_to_vk: implement missing signed int formatsDan
2020-04-30texture: Implement R8G8UIMorph
- Used by The Walking Dead: The Final Season
2020-04-30Merge pull request #3807 from ReinUsesLisp/fix-depth-clampbunnei
maxwell_3d: Fix depth clamping register
2020-04-30Merge pull request #3799 from ReinUsesLisp/iadd-ccbunnei
shader: Implement P2R CC, IADD Rd.CC and IADD.X
2020-04-30Merge pull request #3805 from ReinUsesLisp/preserve-contentsbunnei
texture_cache: Reintroduce preserve_contents accurately
2020-04-28vulkan: Remove unnecessary includesLioncash
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.
2020-04-28Merge pull request #3784 from ReinUsesLisp/shader-memory-utilbunnei
shader/memory_util: Deduplicate code
2020-04-28vk_rasterizer: Skip index buffer setup when vertices are zeroReinUsesLisp
Xenoblade 2 invokes a draw call with zero vertices. This is likely due to indirect drawing (glDrawArraysIndirect). This causes a crash in the staging buffer pool when trying to create a buffer with a size of zero. To workaround this, skip index buffer setup entirely when the number of indices is zero.
2020-04-28{maxwell_3d,buffer_cache}: Implement memory barriers using 3D registersReinUsesLisp
Drop MemoryBarrier from the buffer cache and use Maxwell3D's register WaitForIdle. To implement this on OpenGL we just call glMemoryBarrier with the necessary bits. Vulkan lacks this synchronization primitive, so we set an event and immediately wait for it. This is not a pretty solution, but it's what Vulkan can do without submitting the current command buffer to the queue (which ends up being more expensive on the CPU).
2020-04-27maxwell_3d: Fix depth clamping registerReinUsesLisp
Using deko3d as reference: https://github.com/devkitPro/deko3d/blob/4e47ba0013552e592a86ab7a2510d1e7dadf236a/source/maxwell/gpu_3d_state.cpp#L42 We were using bits 3 and 4 to determine depth clamping, but these are the same both enabled and disabled: state->depthClampEnable ? 0x101A : 0x181D The same happens on Nvidia's OpenGL driver, where they do something like this (default capabilities, GL 4.5 compatibility): (state & DEPTH_CLAMP) != 0 ? 0x201a : 0x281c There's always a difference between the first bits in this register, but bit 11 is consistently disabled on both deko3d/NVN and OpenGL. This commit changes yuzu's behaviour to use bit 11 to determine depth clamping. - Fixes depth issues on Super Mario Odyssey's intro.
2020-04-27Merge pull request #3766 from ReinUsesLisp/renderpass-cache-keyFernando Sahmkow
vk_renderpass_cache: Pack renderpass cache key and unify keys
2020-04-27Merge pull request #3756 from ReinUsesLisp/integrated-devicesFernando Sahmkow
vk_memory_manager: Remove unified memory model flag
2020-04-26texture_cache: Reintroduce preserve_contents accuratelyReinUsesLisp
This reverts commit 94b0e2e5dae4e0bd0021ac2d8fe1ff904a93ee69. preserve_contents proved to be a meaningful optimization. This commit reintroduces it but properly implemented on OpenGL. We have to make sure the clear removes all the previous contents of the image. It's not currently implemented on Vulkan because we can do smart things there that's preferred to be introduced in a separate commit.
2020-04-26Merge pull request #3753 from ReinUsesLisp/ac-vulkanRodrigo Locatti
{gl,vk}_rasterizer: Add lazy default buffer maker and use it for empty buffers
2020-04-26shader/memory_util: Deduplicate codeReinUsesLisp
Deduplicate code shared between vk_pipeline_cache and gl_shader_cache as well as shader decoder code. While we are at it, fix a bug in gl_shader_cache where compute shaders had an start offset of a stage shader.
2020-04-25shader/arithmetic_integer: Implement CC for IADDReinUsesLisp
2020-04-25Merge pull request #3721 from ReinUsesLisp/sort-devicesbunnei
vulkan/wrapper: Sort physical devices
2020-04-24vk_rasterizer: Pack texceptions and color formats on invalid formatsReinUsesLisp
Sometimes for unknown reasons NVN games can bind a render target format of 0. This may be a yuzu bug. With the commits before this the formats were specified without being "packed", assuming all formats and texceptions will be written like in the color_attachments vector. To address this issue, iterate all render targets and pack them as they are valid. This way they will match color_attachments. - Fixes validation errors and graphical issues on Breath of the Wild.
2020-04-24Fix -Werror=conversion error.Markus Wick
2020-04-23shader_ir: Turn classes into data structuresReinUsesLisp
2020-04-23vk_rasterizer: Fix framebuffer creation validation errorsReinUsesLisp
Framebuffer creation was ignoring the number of color attachments.
2020-04-23vk_pipeline_cache: Unify pipeline cache keys into a single operationReinUsesLisp
This allows us to call Common::CityHash and std::memcmp only once for GraphicsPipelineCacheKey. While we are at it, do the same for compute.
2020-04-23vk_renderpass_cache: Pack renderpass cache key to 12 bytesReinUsesLisp
2020-04-22Merge pull request #3677 from FernandoS27/better-syncbunnei
Introduce Predictive Flushing and Improve ASYNC GPU
2020-04-22vk_pipeline_cache: Fix unintentional memcpy into optionalReinUsesLisp
The intention behind this was to assign a float to from an uint32_t, but it was unintentionally being copied directly into the std::optional. Copy to a temporary and assign that temporary to std::optional. This can be replaced with std::bit_cast<float> once we are in C++20.
2020-04-22Merge pull request #3653 from ReinUsesLisp/nsight-aftermathFernando Sahmkow
renderer_vulkan: Integrate Nvidia Nsight Aftermath on Windows
2020-04-22Async GPU: Correct flushing behavior to be similar to old async GPU behavior.Fernando Sahmkow
2020-04-22ShaderCache/PipelineCache: Cache null shaders.Fernando Sahmkow
2020-04-22Address Feedback.Fernando Sahmkow
2020-04-22vk_fence_manager: Initial implementationReinUsesLisp
2020-04-22OpenGL: Guarantee writes to Buffers.Fernando Sahmkow
2020-04-22GPU: Implement Flush Requests for Async mode.Fernando Sahmkow
2020-04-22FenceManager: Manage syncpoints and rename fences to semaphores.Fernando Sahmkow
2020-04-22Rasterizer: Document SignalFence & ReleaseFences and setup skeletons on Vulkan.Fernando Sahmkow
2020-04-22ThreadManager: Sync async reads on accurate gpu.Fernando Sahmkow
2020-04-22BufferCache: Implement OnCPUWrite and SyncGuestHostFernando Sahmkow
2020-04-22GPU: Refactor synchronization on Async GPUFernando Sahmkow
2020-04-21vk_memory_manager: Remove unified memory model flagReinUsesLisp
All drivers (even Intel) seem to have a device local memory type that is not host visible. Remove this flag so all devices follow the same path. This fixes a crash when trying to map to host device local memory on integrated devices.
2020-04-21vk_rasterizer: Add lazy default buffer maker and use it for empty buffersReinUsesLisp
Introduce a default buffer getter that lazily constructs an empty buffer. This is intended to match OpenGL's buffer 0. Use this for disabled vertex and uniform buffers. While we are at it, include vertex buffer usages for staging buffers to silence validation errors.
2020-04-21gl_rasterizer: Fix buffers without sizeReinUsesLisp
On NVN buffers can be enabled but have no size. According to deko3d and the behavior we see in Animal Crossing: New Horizons these buffers get the special address of 0x1000 and limit themselves to 0xfff. Implement buffers without a size by binding a null buffer to OpenGL without a side. https://github.com/devkitPro/deko3d/blob/1d1930beea093b5a663419e93b0649719a3ca5da/source/maxwell/gpu_3d_vbo.cpp#L62-L63
2020-04-21Merge pull request #3718 from ReinUsesLisp/better-pipeline-stateRodrigo Locatti
fixed_pipeline_state: Pack structure, use memcmp and CityHash on it