Browse Source
gl_rasterizer: Upload constant buffers with glNamedBufferSubData
gl_rasterizer: Upload constant buffers with glNamedBufferSubData
Nvidia's OpenGL driver maps gl(Named)BufferSubData with some requirements to a fast. This path has an extra memcpy but updates the buffer without orphaning or waiting for previous calls. It can be seen as a better model for "push constants" that can upload a whole UBO instead of 256 bytes. This path has some requirements established here: http://on-demand.gputechconf.com/gtc/2014/presentations/S4379-opengl-44-scene-rendering-techniques.pdf#page=24 Instead of using the stream buffer, this commits moves constant buffers uploads to calls of glNamedBufferSubData and from my testing it brings a performance improvement. This is disabled when the vendor is not Nvidia since it brings performance regressions.nce_cpp
6 changed files with 84 additions and 19 deletions
-
14src/video_core/buffer_cache/buffer_cache.h
-
31src/video_core/renderer_opengl/gl_buffer_cache.cpp
-
20src/video_core/renderer_opengl/gl_buffer_cache.h
-
4src/video_core/renderer_opengl/gl_device.cpp
-
5src/video_core/renderer_opengl/gl_device.h
-
29src/video_core/renderer_opengl/gl_rasterizer.cpp
Write
Preview
Loading…
Cancel
Save
Reference in new issue