yuzu/src/video_core
ReinUsesLisp 41a4090320 gl_rasterizer: Use NV_vertex_buffer_unified_memory for vertex buffer robustness
Switch games are allowed to bind less data than what they use in a
vertex buffer, the expected behavior here is that these values are read
as zero. At the moment of writing this only D3D12, OpenGL and NVN through
NV_vertex_buffer_unified_memory support vertex buffer with a size limit.

In theory this could be emulated on Vulkan creating a new VkBuffer for
each (handle, offset, length) tuple and binding the expected data to it.
This is likely going to be slow and memory expensive when used on the
vertex buffer and we have to do it on all draws because we can't know
without analyzing indices when a game is going to read vertex data out
of bounds.

This is not a problem on OpenGL's BufferAddressRangeNV because it takes
a length parameter, unlike Vulkan's CmdBindVertexBuffers that only takes
buffers and offsets (the length is implicit in VkBuffer). It isn't a
problem on D3D12 either, because D3D12_VERTEX_BUFFER_VIEW on
IASetVertexBuffers takes SizeInBytes as a parameter (although I am not
familiar with robustness on D3D12).

Currently this only implements buffer ranges for vertex buffers,
although indices can also be affected. A KHR_robustness profile is not
created, but Nvidia's driver reads out of bound vertex data as zero
anyway, this might have to be changed in the future.

- Fixes SMO random triangles when capturing an enemy, getting hit, or
looking at the environment on certain maps.
2020-06-24 02:36:14 -03:00
..
buffer_cache gl_buffer_cache: Mark buffers as resident 2020-06-24 02:36:14 -03:00
engines Merge pull request #4049 from ReinUsesLisp/separate-samplers 2020-06-13 13:48:27 -04:00
macro Merge pull request #4122 from lioncash/hide 2020-06-21 22:38:04 -04:00
renderer_opengl gl_rasterizer: Use NV_vertex_buffer_unified_memory for vertex buffer robustness 2020-06-24 02:36:14 -03:00
renderer_vulkan gl_buffer_cache: Mark buffers as resident 2020-06-24 02:36:14 -03:00
shader memory_util: boost hashes are size_t 2020-06-18 15:47:43 +01:00
texture_cache texture_cache: Fix incorrect address used in a DeduceSurface() call 2020-06-20 14:11:28 -04:00
textures Clang Format and Documentation. 2020-04-28 14:02:51 -04:00
CMakeLists.txt Merge pull request #4041 from ReinUsesLisp/arb-decomp 2020-06-16 14:56:23 -04:00
dirty_flags.cpp DirtyFlags: relax need to set render_targets as dirty 2020-03-14 11:47:33 -04:00
dirty_flags.h DirtyFlags: relax need to set render_targets as dirty 2020-03-14 11:47:33 -04:00
dma_pusher.cpp DmaPusher: Remove dead code in step 2020-05-16 12:42:27 +10:00
dma_pusher.h DmaPusher: Remove dead code in step 2020-05-16 12:42:27 +10:00
fence_manager.h fixed_pipeline_state: explicitly use template keyword after 1f345ebe3a 2020-05-01 23:38:23 +00:00
gpu_asynch.cpp OpenGL: Implement Fencing backend. 2020-04-22 11:36:10 -04:00
gpu_asynch.h OpenGL: Implement Fencing backend. 2020-04-22 11:36:10 -04:00
gpu_synch.cpp GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddr 2020-04-06 09:21:46 -04:00
gpu_synch.h GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddr 2020-04-06 09:21:46 -04:00
gpu_thread.cpp Async GPU: Correct flushing behavior to be similar to old async GPU behavior. 2020-04-22 11:36:26 -04:00
gpu_thread.h GPU: Implement Flush Requests for Async mode. 2020-04-22 11:36:17 -04:00
gpu.cpp Update src/video_core/gpu.cpp 2020-05-05 15:39:44 -04:00
gpu.h texture: Implement R8G8UI 2020-04-30 13:19:36 -04:00
guest_driver.cpp gl_shader_cache: Rework shader cache and remove post-specializations 2020-03-09 18:40:06 -03:00
guest_driver.h gl_shader_cache: Rework shader cache and remove post-specializations 2020-03-09 18:40:06 -03:00
memory_manager.cpp memory_manager: Eliminate variable shadowing 2020-06-19 22:02:58 -04:00
memory_manager.h memory_manager: Eliminate variable shadowing 2020-06-19 22:02:58 -04:00
morton.cpp texture: Implement R8G8UI 2020-04-30 13:19:36 -04:00
morton.h renderer_opengl: Use block linear swizzling for CPU framebuffers 2019-08-21 02:17:14 -03:00
query_cache.h Rename PAGE_SHIFT to PAGE_BITS 2020-06-18 15:47:43 +01:00
rasterizer_accelerated.cpp core: memory: Move to Core::Memory namespace. 2020-04-17 00:59:28 -04:00
rasterizer_accelerated.h core: memory: Move to Core::Memory namespace. 2020-04-17 00:59:28 -04:00
rasterizer_interface.h {maxwell_3d,buffer_cache}: Implement memory barriers using 3D registers 2020-04-28 02:18:12 -03:00
renderer_base.cpp video_core/engines: Remove unnecessary includes 2019-03-05 20:35:32 -05:00
renderer_base.h Frontend/GPU: Refactor context management 2020-03-24 21:03:42 -06:00
sampler_cache.cpp video_core: Abstract vk_sampler_cache into a templated class 2019-04-02 15:54:11 -03:00
sampler_cache.h video_core: Abstract vk_sampler_cache into a templated class 2019-04-02 15:54:11 -03:00
shader_cache.h Rename PAGE_SHIFT to PAGE_BITS 2020-06-18 15:47:43 +01:00
surface.cpp texture: Implement R8G8UI 2020-04-30 13:19:36 -04:00
surface.h texture: Implement R8G8UI 2020-04-30 13:19:36 -04:00
video_core.cpp Address review and fix broken yuzu-tester build 2020-03-25 23:32:42 -06:00
video_core.h Frontend/GPU: Refactor context management 2020-03-24 21:03:42 -06:00