Blender V5.3
blender::GPUPass Struct Reference

Public Member Functions

 GPUPass (GPUCodegenCreateInfo *info, bool deferred_compilation, bool is_optimization_pass, bool should_optimize)
 ~GPUPass ()
CompilationPriority compilation_priority ()
void finalize_compilation ()
void update (double timestamp)
void update_compilation (double timestamp)
void update_gc_timestamp (double timestamp)
bool should_gc (int gc_collect_rate, double timestamp)

Public Attributes

GPUCodegenCreateInfo * create_info = nullptr
AsyncCompilationHandle compilation_handle = 0
std::atomic< gpu::Shader * > shader = nullptr
std::atomic< GPUPassStatus > status = GPU_PASS_QUEUED
std::atomic< int > refcount = 1
double creation_timestamp = 0.0f
double gc_timestamp = 0.0f
uint64_t compilation_timestamp = 0
bool should_optimize = false
bool is_optimization_pass = false

Static Public Attributes

static std::atomic< uint64_t > compilation_counts = 0
static constexpr float optimization_delay = 10.0f

Detailed Description

Definition at line 37 of file gpu_pass.cc.

Constructor & Destructor Documentation

◆ GPUPass()

◆ ~GPUPass()

Member Function Documentation

◆ compilation_priority()

CompilationPriority blender::GPUPass::compilation_priority ( )
inline

Definition at line 100 of file gpu_pass.cc.

References is_optimization_pass, blender::Low, and blender::Medium.

Referenced by GPUPass(), and update_compilation().

◆ finalize_compilation()

◆ should_gc()

bool blender::GPUPass::should_gc ( int gc_collect_rate,
double timestamp )
inline

◆ update()

void blender::GPUPass::update ( double timestamp)
inline

Definition at line 125 of file gpu_pass.cc.

References update_compilation(), and update_gc_timestamp().

◆ update_compilation()

◆ update_gc_timestamp()

void blender::GPUPass::update_gc_timestamp ( double timestamp)
inline

Definition at line 147 of file gpu_pass.cc.

References gc_timestamp, and refcount.

Referenced by update().

Member Data Documentation

◆ compilation_counts

std::atomic<uint64_t> blender::GPUPass::compilation_counts = 0
inlinestatic

Definition at line 38 of file gpu_pass.cc.

Referenced by finalize_compilation(), and blender::GPU_pass_global_compilation_count().

◆ compilation_handle

AsyncCompilationHandle blender::GPUPass::compilation_handle = 0

Definition at line 41 of file gpu_pass.cc.

Referenced by finalize_compilation(), GPUPass(), should_gc(), update_compilation(), and ~GPUPass().

◆ compilation_timestamp

uint64_t blender::GPUPass::compilation_timestamp = 0

Definition at line 50 of file gpu_pass.cc.

Referenced by finalize_compilation(), and blender::GPU_pass_compilation_timestamp().

◆ create_info

GPUCodegenCreateInfo* blender::GPUPass::create_info = nullptr

Definition at line 40 of file gpu_pass.cc.

Referenced by finalize_compilation(), GPUPass(), update_compilation(), and ~GPUPass().

◆ creation_timestamp

double blender::GPUPass::creation_timestamp = 0.0f

Definition at line 46 of file gpu_pass.cc.

Referenced by GPUPass(), and update_compilation().

◆ gc_timestamp

double blender::GPUPass::gc_timestamp = 0.0f

Definition at line 48 of file gpu_pass.cc.

Referenced by should_gc(), and update_gc_timestamp().

◆ is_optimization_pass

bool blender::GPUPass::is_optimization_pass = false

Definition at line 57 of file gpu_pass.cc.

Referenced by compilation_priority(), GPUPass(), update_compilation(), and ~GPUPass().

◆ optimization_delay

float blender::GPUPass::optimization_delay = 10.0f
staticconstexpr

Definition at line 60 of file gpu_pass.cc.

Referenced by update_compilation().

◆ refcount

std::atomic<int> blender::GPUPass::refcount = 1

◆ shader

std::atomic<gpu::Shader *> blender::GPUPass::shader = nullptr

Definition at line 42 of file gpu_pass.cc.

Referenced by finalize_compilation(), blender::GPU_pass_shader_get(), GPUPass(), and ~GPUPass().

◆ should_optimize

bool blender::GPUPass::should_optimize = false

Hint that an optimized variant of this pass should be created. Based on a complexity heuristic from pass code generation.

Definition at line 56 of file gpu_pass.cc.

Referenced by blender::GPU_pass_should_optimize(), and GPUPass().

◆ status


The documentation for this struct was generated from the following file: