aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_vulkan
AgeCommit message (Collapse)Author
2020-06-01Merge pull request #3996 from ReinUsesLisp/front-facesbunnei
fixed_pipeline_state,gl_rasterizer: Swap negative viewport checks for front faces
2020-05-31Merge pull request #3930 from ReinUsesLisp/animal-bordersbunnei
vk_rasterizer: Implement constant attributes
2020-05-30Merge pull request #3982 from ReinUsesLisp/membar-ctsbunnei
shader/other: Implement MEMBAR.CTS
2020-05-28Merge pull request #3991 from ReinUsesLisp/depth-samplingbunnei
texture_cache: Implement depth stencil texture swizzles
2020-05-27Merge pull request #3961 from Morph1984/bgra8_srgbbunnei
maxwell_to_vk: Add format B8G8R8A8_SRGB and add Attachable capability for B8G8R8A8_UNORM
2020-05-27shader/other: Implement MEMBAR.CTSReinUsesLisp
This silences an assertion we were hitting and uses workgroup memory barriers when the game requests it.
2020-05-26texture_cache: Implement depth stencil texture swizzlesReinUsesLisp
Stop ignoring image swizzles on depth and stencil images. This doesn't fix a known issue on Xenoblade Chronicles 2 where an OpenGL texture changes swizzles twice before being used. A proper fix would be having a small texture view cache for this like we do on Vulkan.
2020-05-26fixed_pipeline_state: Remove unnecessary check for front faces flipReinUsesLisp
The check to flip faces when viewports are negative were a left over from the old OpenGL code. This is not required on Vulkan where we have negative viewports.
2020-05-26Merge pull request #3981 from ReinUsesLisp/barbunnei
shader/other: Implement BAR.SYNC 0x0
2020-05-25Merge pull request #3978 from ReinUsesLisp/write-rzbunnei
shader_decompiler: Visit source nodes even when they assign to RZ
2020-05-24Merge pull request #3905 from FernandoS27/vulkan-fixbunnei
Correct a series of crashes and intructions on Async GPU and Vulkan Pipeline
2020-05-24Merge pull request #3979 from ReinUsesLisp/thread-groupbunnei
shader/other: Implement thread comparisons (NV_shader_thread_group)
2020-05-21shader/other: Implement BAR.SYNC 0x0ReinUsesLisp
Trivially implement this particular case of BAR. Unless games use OpenCL or CUDA barriers, we shouldn't hit any other case here.
2020-05-21shader/other: Implement thread comparisons (NV_shader_thread_group)ReinUsesLisp
Hardware S2R special registers match gl_Thread*MaskNV. We can trivially implement these using Nvidia's extension on OpenGL or naively stubbing them with the ARB instructions to match. This might cause issues if the host device warp size doesn't match Nvidia's. That said, this is unlikely on proper shaders. Refer to the attached url for more documentation about these flags. https://www.khronos.org/registry/OpenGL/extensions/NV/NV_shader_thread_group.txt
2020-05-21shader_decompiler: Visit source nodes even when they assign to RZReinUsesLisp
Some operations like atomicMin were ignored because they returned were being stored to RZ. This operations have a side effect and it was being ignored.
2020-05-21vk_shader_decompiler: Don't assert for void returnsReinUsesLisp
Atomic instructions can be used without returning anything and this is valid code. Remove the assert.
2020-05-21buffer_cache: Use boost::intrusive::set for cachingReinUsesLisp
Instead of using boost::icl::interval_map for caching, use boost::intrusive::set. interval_map is intended as a container where the keys can overlap with one another; we don't need this for caching buffers and a std::set-like data structure that allows us to search with lower_bound is enough.
2020-05-18maxwell_to_vk: Add format B8G8R8A8_SRGBMorph
Add format B8G8R8A8_SRGB and add Attachable capability for B8G8R8A8_UNORM Used by Bravely Default II
2020-05-15vk_rasterizer: Match OpenGL's FlushAndInvalidate behaviorReinUsesLisp
Match OpenGL's behavior. This can fix or simplify bisecting issues on Vulkan.
2020-05-13Merge pull request #3899 from ReinUsesLisp/float-comparisonsbunnei
shader_ir: Add separate instructions for ordered and unordered comparisons and fix NE on GLSL
2020-05-13vk_rasterizer: Implement constant attributesReinUsesLisp
Constant attributes (in OpenGL known disabled attributes) are not supported on Vulkan, even with extensions. To emulate this behavior we return zero on reads from disabled vertex attributes in shader code. This has no caching cost because attribute formats are not dynamic state on Vulkan and we have to store it in the pipeline cache anyway. - Fixes Animal Crossing: New Horizons terrain borders
2020-05-13vk_rasterizer: Remove buffer check in attribute selectionReinUsesLisp
This was a left over from OpenGL when disabled buffers where not properly emulated. We no longer have to assert this as it is checked in vertex buffer initialization.
2020-05-11Merge pull request #3816 from ReinUsesLisp/vk-rasterizer-enablebunnei
vk_graphics_pipeline: Implement rasterizer_enable on Vulkan
2020-05-09VkPipelineCache: Use a null shader on invalid address.Fernando Sahmkow
2020-05-09VideoCore: Use SyncGuestMemory mechanism for Shader/Pipeline Cache invalidation.Fernando Sahmkow
2020-05-09Merge pull request #3839 from Morph1984/r8g8uiRodrigo Locatti
texture: Implement R8G8UI
2020-05-09shader_ir: Separate float-point comparisons in ordered and unorderedReinUsesLisp
This allows us to use native SPIR-V instructions without having to manually check for NAN.
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