Dagor Documentation Logo

Contents:

  • Dagor Home
  • Getting Started with Dagor
  • Assets and Assets Management
  • Dagor Tools
  • Projects
  • Samples
  • Tutorials and Manuals
  • API References and Documentation
    • Dagor Engine Render
      • D3D API
        • Barriers
        • Bindless resources API
        • Buffers
        • Driver commands
        • Compute shader dispatch API
        • Mesh shader dispatch API
        • Draw calls API
        • Heaps
        • Callable d3d:: methods
        • 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 work with matrices and perspective object
        • Queries
        • RenderPass
        • Render State
        • Render Targets
        • Resource update buffers
        • Resources
        • Read/Write (UAV) resources
        • Samplers
        • Shader programs
        • Shader constants and const buffers
        • 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
      • daBFG API
      • Managed Resources
      • Resource slots
    • Quirrel Modules Docs
    • Engine Libraries Docs
    • Dagor ECS
    • Dagor Shading Language (DSHL) docs
  • DaNetGame Framework
Dagor Documentation
  • API References and Documentation
  • Dagor Engine Render
  • D3D API
  • GPU related locks
  • View page source

GPU related locks

namespace d3d
struct GpuAutoLock

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

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

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 May 15, 2025.

Built with Sphinx using a theme provided by Read the Docs.