Blender V5.0
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

GPUCodegenCreateInfocreate_info = nullptr
BatchHandle compilation_handle = 0
std::atomic< blender::gpu::Shader * > shader = nullptr
std::atomic< GPUPassStatusstatus = 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_tcompilation_counts = 0
static constexpr float optimization_delay = 10.0f

Detailed Description

Definition at line 36 of file gpu_pass.cc.

Constructor & Destructor Documentation

◆ GPUPass()

GPUPass::GPUPass ( GPUCodegenCreateInfo * info,
bool deferred_compilation,
bool is_optimization_pass,
bool should_optimize )
inline

◆ ~GPUPass()

Member Function Documentation

◆ compilation_priority()

CompilationPriority GPUPass::compilation_priority ( )
inline

Definition at line 98 of file gpu_pass.cc.

References is_optimization_pass, Low, and Medium.

Referenced by GPUPass(), and update_compilation().

◆ finalize_compilation()

◆ should_gc()

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

Definition at line 153 of file gpu_pass.cc.

References BLI_assert, compilation_handle, gc_timestamp, GPU_PASS_FAILED, and status.

◆ update()

void GPUPass::update ( double timestamp)
inline

Definition at line 123 of file gpu_pass.cc.

References update_compilation(), and update_gc_timestamp().

◆ update_compilation()

◆ update_gc_timestamp()

void GPUPass::update_gc_timestamp ( double timestamp)
inline

Definition at line 146 of file gpu_pass.cc.

References gc_timestamp, and refcount.

Referenced by update().

Member Data Documentation

◆ compilation_counts

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

Definition at line 37 of file gpu_pass.cc.

Referenced by finalize_compilation(), and GPU_pass_global_compilation_count().

◆ compilation_handle

BatchHandle GPUPass::compilation_handle = 0

Definition at line 40 of file gpu_pass.cc.

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

◆ compilation_timestamp

uint64_t GPUPass::compilation_timestamp = 0

Definition at line 49 of file gpu_pass.cc.

Referenced by finalize_compilation(), and GPU_pass_compilation_timestamp().

◆ create_info

GPUCodegenCreateInfo* GPUPass::create_info = nullptr

Definition at line 39 of file gpu_pass.cc.

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

◆ creation_timestamp

double GPUPass::creation_timestamp = 0.0f

Definition at line 45 of file gpu_pass.cc.

Referenced by GPUPass(), and update_compilation().

◆ gc_timestamp

double GPUPass::gc_timestamp = 0.0f

Definition at line 47 of file gpu_pass.cc.

Referenced by should_gc(), and update_gc_timestamp().

◆ is_optimization_pass

bool GPUPass::is_optimization_pass = false

Definition at line 54 of file gpu_pass.cc.

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

◆ optimization_delay

float GPUPass::optimization_delay = 10.0f
staticconstexpr

Definition at line 57 of file gpu_pass.cc.

Referenced by update_compilation().

◆ refcount

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

◆ shader

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

Definition at line 41 of file gpu_pass.cc.

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

◆ should_optimize

bool 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 53 of file gpu_pass.cc.

Referenced by GPU_pass_should_optimize(), and GPUPass().

◆ status


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