Blender V5.0
gpu_shader_dependency_private.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2021 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
11
12#pragma once
13
14#include "BLI_string_ref.hh"
15#include "BLI_vector.hh"
16
18
20
22
23namespace blender::gpu::shader {
24
25BuiltinBits gpu_shader_dependency_get_builtins(const StringRefNull source_name);
26
27/* Returns true is any shader code has a printf statement. */
29
31
33 struct Block {
40 std::string fmt;
41 };
42
44 std::string format_str;
45};
46
47const PrintfFormat &gpu_shader_dependency_get_printf_format(uint32_t format_hash);
48
50 StringRefNull source_name,
51 const GeneratedSourceList &generated_sources,
52 StringRefNull shader_name = "");
54
61
62} // namespace blender::gpu::shader
void gpu_shader_dependency_init()
void gpu_shader_dependency_exit()
Vector< shader::GeneratedSource, 0 > GeneratedSourceList
Vector< StringRefNull > gpu_shader_dependency_get_resolved_source(const StringRefNull shader_source_name, const shader::GeneratedSourceList &generated_sources, const StringRefNull shader_name)
const PrintfFormat & gpu_shader_dependency_get_printf_format(uint32_t format_hash)
BuiltinBits gpu_shader_dependency_get_builtins(const StringRefNull shader_source_name)
bool gpu_shader_dependency_force_gpu_print_injection()
StringRefNull gpu_shader_dependency_get_filename_from_source_string(const StringRef source_string)
Find the name of the file from which the given string was generated.
StringRefNull gpu_shader_dependency_get_source(const StringRefNull shader_source_name)
enum blender::gpu::shader::PrintfFormat::Block::ArgumentType type