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
dirty_flags.h
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_synch.h
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
guest_driver.h
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
query_cache.h Rename PAGE_SHIFT to PAGE_BITS 2020-06-18 15:47:43 +01:00
rasterizer_accelerated.cpp
rasterizer_accelerated.h
rasterizer_interface.h {maxwell_3d,buffer_cache}: Implement memory barriers using 3D registers 2020-04-28 02:18:12 -03:00
renderer_base.cpp
renderer_base.h
sampler_cache.cpp
sampler_cache.h
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
video_core.h