Blender Git Commit Log
Git Commits -> Revision 6b03621
Revision 6b03621 by Jeroen Bakker (master) May 28, 2021, 06:16 (GMT) |
DrawManager: Use Compute Shader to Update Hair. This patch will use compute shaders to create the VBO for hair. The previous implementation uses transform feedback. Timings before: between 0.000069s and 0.000362s. Timings after: between 0.000032s and 0.000092s. Speedup isn't noticeable by end-users. The patch is used to test the new compute shader pipeline and integrate it with the draw manager. Allowing EEVEE, Workbench and other draw engines to use compute shaders with the introduction of `DRW_shgroup_call_compute` and `DRW_shgroup_vertex_buffer`. Future improvements are possible by generating the index buffer of hair directly on the GPU. NOTE: that compute shaders aren't supported by Apple and still use the transform feedback workaround. Reviewed By: fclem Differential Revision: https://developer.blender.org/D11057 |
Commit Details:
Full Hash: 6b03621c018acc3b343caa1d8d2aad746fcffc08
Parent Commit: 4a1ba15
Lines Changed: +344, -95
1 Added Path:
/source/blender/draw/intern/shaders/common_hair_refine_comp.glsl (+24, -0) (View)
13 Modified Paths:
/source/blender/draw/CMakeLists.txt (+1, -0) (Diff)
/source/blender/draw/intern/draw_cache_impl_hair.c (+2, -1) (Diff)
/source/blender/draw/intern/draw_hair.c (+153, -47) (Diff)
/source/blender/draw/intern/draw_manager.h (+13, -0) (Diff)
/source/blender/draw/intern/draw_manager_data.c (+36, -0) (Diff)
/source/blender/draw/intern/draw_manager_exec.c (+10, -0) (Diff)
/source/blender/draw/intern/DRW_render.h (+7, -0) (Diff)
/source/blender/draw/intern/shaders/common_hair_lib.glsl (+74, -4) (Diff)
/source/blender/draw/intern/shaders/common_hair_refine_vert.glsl (+2, -43) (Diff)
/source/blender/gpu/GPU_capabilities.h (+2, -0) (Diff)
/source/blender/gpu/intern/gpu_capabilities.cc (+10, -0) (Diff)
/source/blender/gpu/intern/gpu_capabilities_private.hh (+2, -0) (Diff)
/source/blender/gpu/opengl/gl_backend.cc (+8, -0) (Diff)
/source/blender/draw/intern/draw_cache_impl_hair.c (+2, -1) (Diff)
/source/blender/draw/intern/draw_hair.c (+153, -47) (Diff)
/source/blender/draw/intern/draw_manager.h (+13, -0) (Diff)
/source/blender/draw/intern/draw_manager_data.c (+36, -0) (Diff)
/source/blender/draw/intern/draw_manager_exec.c (+10, -0) (Diff)
/source/blender/draw/intern/DRW_render.h (+7, -0) (Diff)
/source/blender/draw/intern/shaders/common_hair_lib.glsl (+74, -4) (Diff)
/source/blender/draw/intern/shaders/common_hair_refine_vert.glsl (+2, -43) (Diff)
/source/blender/gpu/GPU_capabilities.h (+2, -0) (Diff)
/source/blender/gpu/intern/gpu_capabilities.cc (+10, -0) (Diff)
/source/blender/gpu/intern/gpu_capabilities_private.hh (+2, -0) (Diff)
/source/blender/gpu/opengl/gl_backend.cc (+8, -0) (Diff)