Bicameral Engine
GPU-resident engine for a magic-research open-world game
Loading...
Searching...
No Matches
bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp} Namespace Reference

Enumerations

enum  Pass : uint8_t {
  PassClear , PassCells , PassCellLinks , PassNodeHash ,
  PassNodeFirst , PassParentScanLocal , PassParentScanGroups , PassParents ,
  PassLinkHash , PassCount , PassRowScanLocal , PassRowScanGroups ,
  PassPlace , PassSort , PassAddCoefficients , PassCoarseNodes ,
  PassFinish , PassRoundEnd , PassTail , PassTotal
}

Functions

uint32_t Groups (uint64_t threads)
uint32_t ScanGroups (uint64_t count)
void GlobalUavBarrier (ID3D12GraphicsCommandList *list)
void CopyToReadback (ID3D12GraphicsCommandList *list, ID3D12Resource *source, ID3D12Resource *readback, uint64_t bytes)
template<typename T>
std::vector< T > Slice (const std::vector< std::byte > &bytes, uint32_t count)
uint32_t DepthWord (uint32_t kind, uint32_t depth)

Variables

constexpr uint32_t THREADS = 64
constexpr uint32_t SCAN_THREADS = 1024
constexpr uint32_t UAV_COUNT = 7
constexpr uint32_t ROOT_CONSTANT_COUNT = 13
constexpr gpu::RootSignatureLayout ROOT_LAYOUT
constexpr uint32_t DEPTH_BASE = 16
constexpr uint32_t DEPTH_STRIDE = 72
constexpr uint32_t HEADER_WORDS = DEPTH_BASE + (8 * DEPTH_STRIDE)
constexpr uint32_t LEVEL_COUNT = 0
constexpr uint32_t OVERFLOW_WORD = 1
constexpr uint32_t NODE_OFFSET = 0
constexpr uint32_t NODE_COUNT = 1
constexpr uint32_t LINK_OFFSET = 2
constexpr uint32_t LINK_COUNT = 3
constexpr uint32_t NODE_WORDS = 16 + 10
constexpr uint32_t LINK_WORDS = 10
constexpr uint32_t MAX_LEVELS = 64
constexpr std::array< std::string_view, PassTotal > PASS_NAMES
constexpr std::array< Pass, 14 > ROUND_PASSES

Enumeration Type Documentation

◆ Pass

enum bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::Pass : uint8_t
Enumerator
PassClear 
PassCells 
PassCellLinks 
PassNodeHash 
PassNodeFirst 
PassParentScanLocal 
PassParentScanGroups 
PassParents 
PassLinkHash 
PassCount 
PassRowScanLocal 
PassRowScanGroups 
PassPlace 
PassSort 
PassAddCoefficients 
PassCoarseNodes 
PassFinish 
PassRoundEnd 
PassTail 
PassTotal 

Definition at line 51 of file gpu_implicit_levels.cpp.

Function Documentation

◆ CopyToReadback()

void bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::CopyToReadback ( ID3D12GraphicsCommandList * list,
ID3D12Resource * source,
ID3D12Resource * readback,
uint64_t bytes )

Definition at line 125 of file gpu_implicit_levels.cpp.

References CopyToReadback(), and bicameral::gpu::Transition().

Referenced by CopyToReadback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DepthWord()

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::DepthWord ( uint32_t kind,
uint32_t depth )

Definition at line 144 of file gpu_implicit_levels.cpp.

References DEPTH_BASE, DEPTH_STRIDE, and DepthWord().

Referenced by DepthWord().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GlobalUavBarrier()

void bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::GlobalUavBarrier ( ID3D12GraphicsCommandList * list)

Definition at line 118 of file gpu_implicit_levels.cpp.

References GlobalUavBarrier().

Referenced by GlobalUavBarrier().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Groups()

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::Groups ( uint64_t threads)

Definition at line 110 of file gpu_implicit_levels.cpp.

References Groups(), and THREADS.

Referenced by Groups().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScanGroups()

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::ScanGroups ( uint64_t count)

Definition at line 114 of file gpu_implicit_levels.cpp.

References SCAN_THREADS, and ScanGroups().

Referenced by ScanGroups().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Slice()

template<typename T>
std::vector< T > bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::Slice ( const std::vector< std::byte > & bytes,
uint32_t count )

Definition at line 136 of file gpu_implicit_levels.cpp.

References Slice().

Referenced by Slice().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ DEPTH_BASE

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::DEPTH_BASE = 16
constexpr

Definition at line 30 of file gpu_implicit_levels.cpp.

Referenced by DepthWord().

◆ DEPTH_STRIDE

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::DEPTH_STRIDE = 72
constexpr

Definition at line 31 of file gpu_implicit_levels.cpp.

Referenced by DepthWord().

◆ HEADER_WORDS

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::HEADER_WORDS = DEPTH_BASE + (8 * DEPTH_STRIDE)
constexpr

Definition at line 32 of file gpu_implicit_levels.cpp.

◆ LEVEL_COUNT

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::LEVEL_COUNT = 0
constexpr

Definition at line 33 of file gpu_implicit_levels.cpp.

◆ LINK_COUNT

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::LINK_COUNT = 3
constexpr

Definition at line 38 of file gpu_implicit_levels.cpp.

◆ LINK_OFFSET

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::LINK_OFFSET = 2
constexpr

Definition at line 37 of file gpu_implicit_levels.cpp.

◆ LINK_WORDS

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::LINK_WORDS = 10
constexpr

Definition at line 40 of file gpu_implicit_levels.cpp.

◆ MAX_LEVELS

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::MAX_LEVELS = 64
constexpr

Definition at line 41 of file gpu_implicit_levels.cpp.

◆ NODE_COUNT

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::NODE_COUNT = 1
constexpr

Definition at line 36 of file gpu_implicit_levels.cpp.

◆ NODE_OFFSET

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::NODE_OFFSET = 0
constexpr

Definition at line 35 of file gpu_implicit_levels.cpp.

◆ NODE_WORDS

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::NODE_WORDS = 16 + 10
constexpr

Definition at line 39 of file gpu_implicit_levels.cpp.

◆ OVERFLOW_WORD

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::OVERFLOW_WORD = 1
constexpr

Definition at line 34 of file gpu_implicit_levels.cpp.

◆ PASS_NAMES

std::array<std::string_view, PassTotal> bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::PASS_NAMES
constexpr
Initial value:
= {"clear",
"cells",
"cell_links",
"node_hash",
"node_first",
"parent_scan_local",
"parent_scan_groups",
"parents",
"link_hash",
"count",
"row_scan_local",
"row_scan_groups",
"place",
"sort",
"add_coefficients",
"coarse_nodes",
"finish",
"round_end",
"tail"}

Definition at line 74 of file gpu_implicit_levels.cpp.

◆ ROOT_CONSTANT_COUNT

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::ROOT_CONSTANT_COUNT = 13
constexpr

Definition at line 25 of file gpu_implicit_levels.cpp.

◆ ROOT_LAYOUT

gpu::RootSignatureLayout bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::ROOT_LAYOUT
constexpr
Initial value:

Definition at line 26 of file gpu_implicit_levels.cpp.

◆ ROUND_PASSES

std::array<Pass, 14> bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::ROUND_PASSES
constexpr
Initial value:

Definition at line 95 of file gpu_implicit_levels.cpp.

◆ SCAN_THREADS

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::SCAN_THREADS = 1024
constexpr

Definition at line 23 of file gpu_implicit_levels.cpp.

Referenced by ScanGroups().

◆ THREADS

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::THREADS = 64
constexpr

Definition at line 22 of file gpu_implicit_levels.cpp.

Referenced by Groups().

◆ UAV_COUNT

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit_levels.cpp}::UAV_COUNT = 7
constexpr

Definition at line 24 of file gpu_implicit_levels.cpp.