godot/servers/rendering/renderer_rd/shader_rd.cpp

/**************************************************************************/
/*  shader_rd.cpp                                                         */
/**************************************************************************/
/*                         This file is part of:                          */
/*                             GODOT ENGINE                               */
/*                        https://godotengine.org                         */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
/*                                                                        */
/* Permission is hereby granted, free of charge, to any person obtaining  */
/* a copy of this software and associated documentation files (the        */
/* "Software"), to deal in the Software without restriction, including    */
/* without limitation the rights to use, copy, modify, merge, publish,    */
/* distribute, sublicense, and/or sell copies of the Software, and to     */
/* permit persons to whom the Software is furnished to do so, subject to  */
/* the following conditions:                                              */
/*                                                                        */
/* The above copyright notice and this permission notice shall be         */
/* included in all copies or substantial portions of the Software.        */
/*                                                                        */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
/**************************************************************************/

#include "shader_rd.h"

#include "core/io/compression.h"
#include "core/io/dir_access.h"
#include "core/io/file_access.h"
#include "core/object/worker_thread_pool.h"
#include "core/version.h"
#include "renderer_compositor_rd.h"
#include "servers/rendering/rendering_device.h"
#include "thirdparty/misc/smolv.h"

void ShaderRD::_add_stage(const char *p_code, StageType p_stage_type) {}

void ShaderRD::setup(const char *p_vertex_code, const char *p_fragment_code, const char *p_compute_code, const char *p_name) {}

RID ShaderRD::version_create() {}

void ShaderRD::_initialize_version(Version *p_version) {}

void ShaderRD::_clear_version(Version *p_version) {}

void ShaderRD::_build_variant_code(StringBuilder &builder, uint32_t p_variant, const Version *p_version, const StageTemplate &p_template) {}

void ShaderRD::_compile_variant(uint32_t p_variant, const CompileData *p_data) {}

RS::ShaderNativeSourceCode ShaderRD::version_get_native_source_code(RID p_version) {}

String ShaderRD::_version_get_sha1(Version *p_version) const {}

static const char *shader_file_header =;
static const uint32_t cache_file_version =;

String ShaderRD::_get_cache_file_path(Version *p_version, int p_group) {}

bool ShaderRD::_load_from_cache(Version *p_version, int p_group) {}

void ShaderRD::_save_to_cache(Version *p_version, int p_group) {}

void ShaderRD::_allocate_placeholders(Version *p_version, int p_group) {}

// Try to compile all variants for a given group.
// Will skip variants that are disabled.
void ShaderRD::_compile_version(Version *p_version, int p_group) {}

void ShaderRD::version_set_code(RID p_version, const HashMap<String, String> &p_code, const String &p_uniforms, const String &p_vertex_globals, const String &p_fragment_globals, const Vector<String> &p_custom_defines) {}

void ShaderRD::version_set_compute_code(RID p_version, const HashMap<String, String> &p_code, const String &p_uniforms, const String &p_compute_globals, const Vector<String> &p_custom_defines) {}

bool ShaderRD::version_is_valid(RID p_version) {}

bool ShaderRD::version_free(RID p_version) {}

void ShaderRD::set_variant_enabled(int p_variant, bool p_enabled) {}

bool ShaderRD::is_variant_enabled(int p_variant) const {}

void ShaderRD::enable_group(int p_group) {}

bool ShaderRD::is_group_enabled(int p_group) const {}

bool ShaderRD::shader_cache_cleanup_on_start =;

ShaderRD::ShaderRD() {}

void ShaderRD::initialize(const Vector<String> &p_variant_defines, const String &p_general_defines) {}

void ShaderRD::_initialize_cache() {}

// Same as above, but allows specifying shader compilation groups.
void ShaderRD::initialize(const Vector<VariantDefine> &p_variant_defines, const String &p_general_defines) {}

void ShaderRD::set_shader_cache_dir(const String &p_dir) {}

void ShaderRD::set_shader_cache_save_compressed(bool p_enable) {}

void ShaderRD::set_shader_cache_save_compressed_zstd(bool p_enable) {}

void ShaderRD::set_shader_cache_save_debug(bool p_enable) {}

String ShaderRD::shader_cache_dir;
bool ShaderRD::shader_cache_save_compressed =;
bool ShaderRD::shader_cache_save_compressed_zstd =;
bool ShaderRD::shader_cache_save_debug =;

ShaderRD::~ShaderRD() {}