Dagor Documentation Logo

Contents:

  • Dagor Home
  • Getting Started with Dagor
  • Assets and Assets Management
  • Dagor Tools
  • Projects
  • Tutorials and Manuals
  • API References and Documentation
    • Dagor Engine Render
      • D3D API
        • Barriers
        • Bindless Resources API
        • Buffers
        • Compute Shader Dispatch API
        • Mesh Shader Dispatch API
        • Draw Calls API
        • Driver Code Matcher Templates
        • Driver Commands
        • Driver Info API
        • GPU Capture and Debug Tools
        • Heaps
        • Driver Info API
        • GPU Related Locks
          • d3d
            • d3d::GpuAutoLock
              • d3d::GpuAutoLock::GpuAutoLock()
              • d3d::GpuAutoLock::~GpuAutoLock()
            • d3d::GPUWorkloadSplit
              • d3d::GPUWorkloadSplit::GPUWorkloadSplit()
              • d3d::GPUWorkloadSplit::~GPUWorkloadSplit()
              • d3d::GPUWorkloadSplit::needSplitAtEnd
            • d3d::LoadingAutoLock
              • d3d::LoadingAutoLock::LoadingAutoLock()
              • d3d::LoadingAutoLock::~LoadingAutoLock()
        • D3D API for Working with Matrices and Perspective Object
        • Mesh Shader Dispatch API
        • Pipeline Compilation Helpers
        • Queries
        • Ray Tracing
        • Render Pass
        • Render State
        • Render Targets
        • Resource Update Buffers
        • Resources
        • Read/Write (UAV) Resources
        • Sampler
        • Shader Programs
        • Shader Constants and Const Buffers
        • Shader Model Versions
        • Stream Output API
        • Tiled Resource
        • Variable Rate Shading API
        • Vertex and Index Buffer API
        • View and Scissor D3D API
        • Constants, Structures and Enumerations
        • All Other Methods
        • Textures
      • Helper Classes for D3D API
      • daFrameGraph API
      • Managed Resources
      • Resource Slots
      • Resource and Execution Barriers
      • Shaders
    • Dagor Quirrel Modules Docs
    • Engine Libraries Docs
    • Dagor ECS
    • Dagor Shading Language (DSHL) docs
    • Dagor Tools
Dagor Documentation
  • API References and Documentation
  • Dagor Engine Render
  • D3D API
  • GPU Related Locks
  • View page source
  • GitHub

GPU Related Locks

namespace d3d
struct GpuAutoLock
#include <dag_lock.h>

The GpuAutoLock struct is a lock that automatically acquires and releases a GPU lock. It is used to protect critical sections of code that interact with the GPU.

Public Functions

GpuAutoLock()
~GpuAutoLock()
struct GPUWorkloadSplit
#include <dag_lock.h>

The GPUWorkloadSplit struct is used for scoped conditional GPU workload splitting. It allows splitting the GPU workload based on certain conditions.

Public Functions

inline GPUWorkloadSplit(bool do_split, bool split_at_end, const char *marker)

Constructs a GPUWorkloadSplit object.

Parameters:
  • do_split – Flag indicating whether to split the GPU workload.

  • split_at_end – Flag indicating whether to split at the end.

  • marker – A marker used for splitting the workload.

inline ~GPUWorkloadSplit()

Destructs the GPUWorkloadSplit object. If a split is needed at the end, it performs the split.

Public Members

bool needSplitAtEnd

Flag indicating whether a split is needed at the end.

struct LoadingAutoLock
#include <dag_lock.h>

The LoadingAutoLock struct is a non-exclusive lock that protects a thread from GPU reset. It is used to ensure that the GPU is not reset while a thread is performing loading operations.

Public Functions

inline LoadingAutoLock()
inline ~LoadingAutoLock()
Previous Next

© Copyright Gaijin Entertainment 2025. Last updated on Sep 05, 2025.