Blender V4.5
gpu_pass.cc File Reference
#include "MEM_guardedalloc.h"
#include "BLI_map.hh"
#include "BLI_span.hh"
#include "BLI_time.h"
#include "BLI_vector.hh"
#include "GPU_capabilities.hh"
#include "GPU_context.hh"
#include "GPU_pass.hh"
#include "GPU_vertex_format.hh"
#include "gpu_codegen.hh"
#include <mutex>
#include <string>

Go to the source code of this file.

Classes

struct  GPUPass
class  GPUPassCache

Functions

Compilation
static bool gpu_pass_validate (GPUCodegenCreateInfo *create_info)
GPUPassGPU_generate_pass (GPUMaterial *material, GPUNodeGraph *graph, const char *debug_name, eGPUMaterialEngine engine, bool deferred_compilation, GPUCodegenCallbackFn finalize_source_cb, void *thunk, bool optimize_graph)
GPUPass
eGPUPassStatus GPU_pass_status (GPUPass *pass)
bool GPU_pass_should_optimize (GPUPass *pass)
GPUShader * 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)

GPUPass Cache

Internal shader cache: This prevent the shader recompilation / stall when using undo/redo AND also allows for GPUPass reuse if the Shader code is the same for 2 different Materials. Unused GPUPasses are free by Garbage collection.

static GPUPassCacheg_cache = nullptr
void GPU_pass_ensure_its_ready (GPUPass *pass)
void GPU_pass_cache_init ()
void GPU_pass_cache_update ()
void GPU_pass_cache_wait_for_all ()
void GPU_pass_cache_free ()

Detailed Description

Convert material node-trees to GLSL.

Definition in file gpu_pass.cc.

Function Documentation

◆ GPU_generate_pass()

◆ GPU_pass_acquire()

void GPU_pass_acquire ( GPUPass * pass)

◆ GPU_pass_cache_free()

void GPU_pass_cache_free ( )

Definition at line 337 of file gpu_pass.cc.

References g_cache, and GPU_pass_cache_free().

Referenced by GPU_exit(), and GPU_pass_cache_free().

◆ GPU_pass_cache_init()

void GPU_pass_cache_init ( )

Definition at line 321 of file gpu_pass.cc.

References g_cache, and GPU_pass_cache_init().

Referenced by GPU_init(), and GPU_pass_cache_init().

◆ GPU_pass_cache_update()

void GPU_pass_cache_update ( )

Definition at line 326 of file gpu_pass.cc.

References g_cache, GPU_pass_cache_update(), and GPUPassCache::update().

Referenced by GPU_pass_cache_update(), and GPU_render_step().

◆ GPU_pass_cache_wait_for_all()

◆ GPU_pass_compilation_timestamp()

uint64_t GPU_pass_compilation_timestamp ( GPUPass * pass)

◆ GPU_pass_ensure_its_ready()

◆ GPU_pass_global_compilation_count()

uint64_t GPU_pass_global_compilation_count ( )

◆ GPU_pass_release()

void GPU_pass_release ( GPUPass * pass)

◆ GPU_pass_shader_get()

◆ GPU_pass_should_optimize()

◆ GPU_pass_status()

eGPUPassStatus GPU_pass_status ( GPUPass * pass)

◆ gpu_pass_validate()

Variable Documentation

◆ g_cache