aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_vulkan
AgeCommit message (Collapse)Author
2020-06-21Merge pull request #4126 from lioncash/noexceptbunnei
vulkan/wrapper: Remove noexcept from GetSurfaceCapabilitiesKHR()
2020-06-19Merge pull request #4099 from MerryMage/macOS-buildbunnei
Fix compilation on macOS
2020-06-19vulkan/wrapper: Remove noexcept from GetSurfaceCapabilitiesKHR()Lioncash
Check() can throw an exception if the Vulkan result isn't successful. We remove the check so that std::terminate isn't outright called and allows for better debugging (should it ever actually fail).
2020-06-18vk_rasterizer: Don't preserve contents on full screen clearsReinUsesLisp
There's no need to load contents from the CPU when a clear resets all the contents of the underlying memory. This is already implemented on OpenGL and the texture cache.
2020-06-18vk_update_descriptor: Upload descriptor sets data directlyReinUsesLisp
Instead of copying to a temporary payload before sending the update task to the worker thread, insert elements to the payload directly.
2020-06-18vk_rasterizer: BindTransformFeedbackBuffersEXT accepts a size of type ↵MerryMage
VkDeviceSize
2020-06-18renderer_vulkan: Fix macOS GetBundleDirectory referenceMerryMage
2020-06-18vk_sampler_cache: Emulate GL_LINEAR/NEAREST minification filtersMorph
Emulate GL_LINEAR/NEAREST minification filters using minLod = 0 and maxLod = 0.25 during sampler creation
2020-06-18maxwell_to_vk: Reorder filter cases and correct mipmap_filter=NoneMorph
maxwell_to_vk: Reorder filtering modes to start with None, then Nearest, then Linear. maxwell_to_vk: Logs filter modes under UNREACHABLE_MSG instead of UNIMPLEMENTED_MSG, since any unknown filter modes are invalid and not unimplemented. maxwell_to_vk: Return VK_SAMPLER_MIPMAP_MODE_NEAREST instead of VK_SAMPLER_MIPMAP_MODE_LINEAR when mipmap_filter is None with the description from the VkSamplerCreateInfo(3) man page.
2020-06-15Merge pull request #4066 from ReinUsesLisp/shared-ptr-bufRodrigo Locatti
buffer_cache: Avoid passing references of shared pointers and misc style changes
2020-06-13Merge pull request #4049 from ReinUsesLisp/separate-samplersbunnei
shader/texture: Join separate image and sampler pairs offline
2020-06-12Merge pull request #3986 from ReinUsesLisp/shader-cachebunnei
shader_cache: Implement a generic runtime shader cache
2020-06-09buffer_cache: Avoid passing references of shared pointers and misc style changesReinUsesLisp
Instead of using as template argument a shared pointer, use the underlying type and manage shared pointers explicitly. This can make removing shared pointers from the cache more easy. While we are at it, make some misc style changes and general improvements (like insert_or_assign instead of operator[] + operator=).
2020-06-08texture_cache: Implement rendering to 3D texturesReinUsesLisp
This allows rendering to 3D textures with more than one slice. Applications are allowed to render to more than one slice of a texture using gl_Layer from a VTG shader. This also requires reworking how 3D texture collisions are handled, for now, this commit allows rendering to slices but not to miplevels. When a render target attempts to write to a mipmap, we fallback to the previous implementation (copying or flushing as needed). - Fixes color correction 3D textures on UE4 games (rainbow effects). - Allows Xenoblade games to render to 3D textures directly.
2020-06-07Merge pull request #4034 from ReinUsesLisp/storage-texelsRodrigo Locatti
vk_rasterizer: Implement storage texels and atomic image operations
2020-06-07rasterizer_cache: Remove files and includesReinUsesLisp
The rasterizer cache is no longer used. Each cache has its own generic implementation optimized for the cached data.
2020-06-07vk_pipeline_cache: Use generic shader cacheReinUsesLisp
Trivial port the generic shader cache to Vulkan.
2020-06-05Merge pull request #4013 from ReinUsesLisp/skip-no-xfbbunnei
vk_rasterizer: Skip transform feedbacks when extension is unavailable
2020-06-05shader/texture: Join separate image and sampler pairs offlineReinUsesLisp
Games using D3D idioms can join images and samplers when a shader executes, instead of baking them into a combined sampler image. This is also possible on Vulkan. One approach to this solution would be to use separate samplers on Vulkan and leave this unimplemented on OpenGL, but we can't do this because there's no consistent way of determining which constant buffer holds a sampler and which one an image. We could in theory find the first bit and if it's in the TIC area, it's an image; but this falls apart when an image or sampler handle use an index of zero. The used approach is to track for a LOP.OR operation (this is done at an IR level, not at an ISA level), track again the constant buffers used as source and store this pair. Then, outside of shader execution, join the sample and image pair with a bitwise or operation. This approach won't work on games that truly use separate samplers in a meaningful way. For example, pooling textures in a 2D array and determining at runtime what sampler to use. This invalidates OpenGL's disk shader cache :) - Used mostly by D3D ports to Switch
2020-06-02vk_shader_decompiler: Implement atomic image operationsReinUsesLisp
Implement atomic operations on images. On GLSL these are atomicImage* functions (e.g. atomicImageAdd).
2020-06-02vk_rasterizer: Implement storage texelsReinUsesLisp
This is the equivalent of an image buffer on OpenGL. - Used by Octopath Traveler
2020-06-02maxwell_to_vk: Add R16UI image formatReinUsesLisp
- Used by Octopath Traveler
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-29vk_rasterizer: Skip transform feedbacks when extension is unavailableReinUsesLisp
Avoids calling transform feedback procedures when VK_EXT_transform_feedback is not available.
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.