KiCad PCB EDA Suite
Loading...
Searching...
No Matches
RHI_HANDLE< Tag > Struct Template Reference

Opaque GPU resource handle, typed by a tag struct so handles of different kinds cannot be mixed. More...

#include <rhi_handle.h>

Public Member Functions

bool operator== (const RHI_HANDLE &other) const =default
 
 operator bool () const
 

Public Attributes

uint32_t value = 0
 

Detailed Description

template<typename Tag>
struct RHI_HANDLE< Tag >

Opaque GPU resource handle, typed by a tag struct so handles of different kinds cannot be mixed.

The low 20 bits index the backend's resource table and the high 12 bits hold a generation that changes each time the slot is reused, so a stale handle is detected instead of aliasing a new resource.

Definition at line 33 of file rhi_handle.h.

Member Function Documentation

◆ operator bool()

template<typename Tag>
RHI_HANDLE< Tag >::operator bool ( ) const
inlineexplicit

Definition at line 39 of file rhi_handle.h.

◆ operator==()

template<typename Tag>
bool RHI_HANDLE< Tag >::operator== ( const RHI_HANDLE< Tag > & other) const
default

Member Data Documentation

◆ value

template<typename Tag>
uint32_t RHI_HANDLE< Tag >::value = 0

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