Skip to content

Engine → Renderer → gpu_ids.h

detail::gpu_id

Syntax

template <typename Tag> struct gpu_id

Variables

AccessNameTypeDefaultDescription
publicgenerationu160
publicindexu320

Functions

Public

from_u64

[[nodiscard]] static constexpr gpu_id from_u64(
    u64 packed) noexcept;

Inverse of to_u64().

is_valid

[[nodiscard]] constexpr bool is_valid() const noexcept;

True for an id a renderer handed out (whether or not it is still live).

to_u64

[[nodiscard]] constexpr u64 to_u64() const noexcept;

Packs the id into one integer (generation in the high 32 bits). Used for ImTextureID style opaque handles and for hashing.

Operator Overloads

Public

operator<=>

[[nodiscard]] constexpr auto operator<=>(
    const gpu_id &) const noexcept = default;

operator==

[[nodiscard]] constexpr bool operator==(
    const gpu_id &) const noexcept = default;