mirror of
https://github.com/blender/blender
synced 2026-11-22 03:45:13 +03:00
Previously only a subset of the code was in this namespace. This improves
consistency, and means common types like Vector, StringRef and float3
don't need blender:: prefixes anywhere.
This does not move code into sub-namespaces, but gets us a step closer to
the end goal.
* Add namespace blender {} to almost all files.
* Remove unnecessary blender:: prefixes and using namespace blender;.
* Freestyle was not not moved, it remains in top level namespace freestyle.
* Cycles integration code was modified to use blender:: prefixes.
* bUUID existed both in the top level and blender namespace. To resolve this
conflict, the wrapper class is now blender::UUID.
Some blender:: prefixes remain primarily because of ambiguous namespaces, for
example animrig:: could refer to both blender::animrig and blender::ed::animrig.
Pull Request: https://projects.blender.org/blender/blender/pulls/152329
52 lines
1.3 KiB
C++
52 lines
1.3 KiB
C++
/* SPDX-FileCopyrightText: 2025 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup gpu
|
|
*
|
|
* Generate and cache shaders generated from the intermediate node graph.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "GPU_material.hh"
|
|
#include "GPU_shader.hh"
|
|
|
|
namespace blender {
|
|
|
|
struct GPUNodeGraph;
|
|
|
|
struct GPUPass;
|
|
|
|
enum GPUPassStatus {
|
|
GPU_PASS_FAILED = 0,
|
|
GPU_PASS_QUEUED,
|
|
GPU_PASS_SUCCESS,
|
|
};
|
|
|
|
GPUPass *GPU_generate_pass(GPUMaterial *material,
|
|
GPUNodeGraph *graph,
|
|
const char *debug_name,
|
|
eGPUMaterialEngine engine,
|
|
bool deferred_compilation,
|
|
GPUCodegenCallbackFn finalize_source_cb,
|
|
void *thunk,
|
|
bool optimize_graph);
|
|
|
|
GPUPassStatus GPU_pass_status(GPUPass *pass);
|
|
bool GPU_pass_should_optimize(GPUPass *pass);
|
|
void GPU_pass_ensure_its_ready(GPUPass *pass);
|
|
gpu::Shader *GPU_pass_shader_get(GPUPass *pass);
|
|
void GPU_pass_acquire(GPUPass *pass);
|
|
void GPU_pass_release(GPUPass *pass);
|
|
|
|
uint64_t GPU_pass_global_compilation_count();
|
|
uint64_t GPU_pass_compilation_timestamp(GPUPass *pass);
|
|
|
|
void GPU_pass_cache_init();
|
|
void GPU_pass_cache_update();
|
|
void GPU_pass_cache_wait_for_all();
|
|
void GPU_pass_cache_free();
|
|
|
|
} // namespace blender
|