From 7144fdf28568e195dc639bea8828e614d7eb6f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Thu, 29 Mar 2018 20:22:31 +0200 Subject: BLF: Perf: Divide by 6 the amount of verts sent to the GPU. This means smaller imm buffer usage. This does not reduce the number of drawcalls. This uses geometry shader which is slow for the GPU but given we are really CPU bound on this case, it should not matter. A perfect implementation would: - Set the glyph coord in a bufferTexture and just send the glyph ID to the GPU to read the bufferTexture. - Use GWN_draw_primitive and draw 2*strllen triangle and just retrieve the glyph ID and color based on gl_VertexID / 6. - Stream fixed size buffer that the Driver can discard quickly but this is the same as improving IMM directly. --- source/blender/gpu/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/gpu/CMakeLists.txt') diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt index 48724cb0d40..c754a21b427 100644 --- a/source/blender/gpu/CMakeLists.txt +++ b/source/blender/gpu/CMakeLists.txt @@ -203,6 +203,7 @@ data_to_c_simple(shaders/gpu_shader_edges_overlay_geom.glsl SRC) data_to_c_simple(shaders/gpu_shader_edges_overlay_simple_geom.glsl SRC) data_to_c_simple(shaders/gpu_shader_edges_overlay_frag.glsl SRC) data_to_c_simple(shaders/gpu_shader_text_vert.glsl SRC) +data_to_c_simple(shaders/gpu_shader_text_geom.glsl SRC) data_to_c_simple(shaders/gpu_shader_text_frag.glsl SRC) data_to_c_simple(shaders/gpu_shader_keyframe_diamond_vert.glsl SRC) data_to_c_simple(shaders/gpu_shader_keyframe_diamond_frag.glsl SRC) -- cgit v1.2.3