yuzu/src/video_core/renderer_opengl
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
..
gl_arb_decompiler.cpp gl_arb_decompiler: Avoid several string copies 2020-06-19 23:09:16 -04:00
gl_arb_decompiler.h gl_arb_decompiler: Implement an assembly shader decompiler 2020-06-11 22:12:07 -03:00
gl_buffer_cache.cpp gl_buffer_cache: Mark buffers as resident 2020-06-24 02:36:14 -03:00
gl_buffer_cache.h gl_buffer_cache: Mark buffers as resident 2020-06-24 02:36:14 -03:00
gl_device.cpp gl_device: Expose NV_vertex_buffer_unified_memory except on Turing 2020-06-24 02:36:14 -03:00
gl_device.h gl_device: Expose NV_vertex_buffer_unified_memory except on Turing 2020-06-24 02:36:14 -03:00
gl_fence_manager.cpp buffer_cache: Use boost::intrusive::set for caching 2020-05-21 16:44:00 -03:00
gl_fence_manager.h Address Feedback. 2020-04-22 11:36:24 -04:00
gl_framebuffer_cache.cpp gl_state: Remove completely 2020-02-28 17:56:35 -03:00
gl_framebuffer_cache.h gl_state: Remove completely 2020-02-28 17:56:35 -03:00
gl_query_cache.cpp gl_query_cache: Resolve use-after-move in CachedQuery move assignment operator 2020-04-15 22:20:06 -04:00
gl_query_cache.h query_cache: Address feedback 2020-02-14 17:38:27 -03:00
gl_rasterizer.cpp gl_rasterizer: Use NV_vertex_buffer_unified_memory for vertex buffer robustness 2020-06-24 02:36:14 -03:00
gl_rasterizer.h Merge pull request #3986 from ReinUsesLisp/shader-cache 2020-06-12 23:14:48 -04:00
gl_resource_manager.cpp renderer_opengl: Add assembly program code paths 2020-05-19 18:00:04 -03:00
gl_resource_manager.h renderer_opengl: Add assembly program code paths 2020-05-19 18:00:04 -03:00
gl_sampler_cache.cpp Create an "Advanced" tab in the graphics configuration tab and add anisotropic filtering levels. 2020-02-27 21:34:00 -05:00
gl_sampler_cache.h video_core: Add missing override specifiers 2019-07-07 13:38:39 -04:00
gl_shader_cache.cpp Merge pull request #4041 from ReinUsesLisp/arb-decomp 2020-06-16 14:56:23 -04:00
gl_shader_cache.h gl_shader_cache: Use generic shader cache 2020-06-07 04:32:57 -03:00
gl_shader_decompiler.cpp gl_shader_decompiler: Enable GL_EXT_texture_shadow_lod if available 2020-06-20 23:02:29 -04:00
gl_shader_decompiler.h glsl: Squash constant buffers into a single SSBO when we hit the limit 2020-05-31 21:33:49 -03:00
gl_shader_disk_cache.cpp shader/texture: Join separate image and sampler pairs offline 2020-06-05 00:24:51 -03:00
gl_shader_disk_cache.h shader/texture: Join separate image and sampler pairs offline 2020-06-05 00:24:51 -03:00
gl_shader_manager.cpp gl_shader_manager: Unbind GLSL program when binding a host pipeline 2020-05-26 04:20:39 -03:00
gl_shader_manager.h renderer_opengl: Add assembly program code paths 2020-05-19 18:00:04 -03:00
gl_shader_util.cpp gl_shader_cache: Address review commentaries 2019-07-15 17:38:25 -03:00
gl_shader_util.h gl_shader_util: Add parameter to handle retrievable programs 2019-02-06 22:20:57 -03:00
gl_state_tracker.cpp gl_rasterizer: Implement line widths and smooth lines 2020-04-13 01:30:34 -03:00
gl_state_tracker.h gl_rasterizer: Implement line widths and smooth lines 2020-04-13 01:30:34 -03:00
gl_stream_buffer.cpp gl_buffer_cache: Mark buffers as resident 2020-06-24 02:36:14 -03:00
gl_stream_buffer.h gl_buffer_cache: Mark buffers as resident 2020-06-24 02:36:14 -03:00
gl_texture_cache.cpp texture_cache: Handle 3D texture blits with one layer 2020-06-08 05:01:00 -03:00
gl_texture_cache.h texture_cache: Implement rendering to 3D textures 2020-06-08 05:01:00 -03:00
maxwell_to_gl.h maxwell_to_gl: Miscellaneous changes 2020-06-18 04:56:31 -04:00
renderer_opengl.cpp gl_rasterizer: Use NV_vertex_buffer_unified_memory for vertex buffer robustness 2020-06-24 02:36:14 -03:00
renderer_opengl.h gl_rasterizer: Use NV_vertex_buffer_unified_memory for vertex buffer robustness 2020-06-24 02:36:14 -03:00
utils.cpp buffer_cache: Return handles instead of pointer to handles 2020-04-16 02:33:34 -03:00
utils.h buffer_cache: Return handles instead of pointer to handles 2020-04-16 02:33:34 -03:00