The goal is to reduce the startup time cost of all of these parsing and string replacement. All comments are now stripped at compile time. This comment check added noticeable slowdown at startup in debug builds and during preprocessing. Put all metadatas between start and end token. Use very simple parsing using `StringRef` and hash all identifiers. Move all the complexity to the preprocessor that massagess the metadata into a well expected input to the runtime parser. All identifiers are compile time hashed so that no string comparison is made at runtime. Speed up the source loading: - from 10ms to 1.6ms (6.25x speedup) in release - from 194ms to 6ms (32.3x speedup) in debug Follow up #129009 Pull Request: https://projects.blender.org/blender/blender/pulls/128927
29 lines
685 B
C++
29 lines
685 B
C++
/* SPDX-FileCopyrightText: 2021 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup draw
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "draw_curves_private.hh"
|
|
#include "draw_hair_private.hh"
|
|
|
|
struct GPUShader;
|
|
|
|
/* draw_shader.cc */
|
|
|
|
GPUShader *DRW_shader_hair_refine_get(ParticleRefineShader refinement);
|
|
|
|
GPUShader *DRW_shader_curves_refine_get(blender::draw::CurvesEvalShader type);
|
|
|
|
GPUShader *DRW_shader_debug_draw_display_get();
|
|
GPUShader *DRW_shader_draw_visibility_compute_get();
|
|
GPUShader *DRW_shader_draw_view_finalize_get();
|
|
GPUShader *DRW_shader_draw_resource_finalize_get();
|
|
GPUShader *DRW_shader_draw_command_generate_get();
|
|
|
|
void DRW_shaders_free();
|