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

Classes

struct  NodeImages

Functions

constexpr uint32_t PlanDepthWord (uint32_t kind, uint32_t depth)
constexpr uint32_t DepthSlot (uint32_t depth)
template<typename T>
std::vector< std::byte > ToBytes (const std::vector< T > &values)
bool WriteUpload (ID3D12Resource *upload, std::span< const std::byte > bytes)
void GlobalUavBarrier (ID3D12GraphicsCommandList *list)
std::vector< ImGpuCell > MakeCellImage (const ImplicitGrid &grid, const std::vector< uint32_t > &faceStarts)
std::pair< std::vector< uint32_t >, std::vector< uint32_t > > MakeCellFaces (const ImplicitGrid &grid)
void AppendChildren (const ImplicitGrid &grid, size_t depth, const std::vector< uint32_t > &levelOffsets, std::vector< ImGpuNode > &nodes, std::vector< uint32_t > &lists)
NodeImages MakeNodes (const ImplicitGrid &grid, const std::vector< uint32_t > &levelOffsets, std::vector< uint32_t > &lists)

Variables

constexpr uint32_t THREADS = 64
constexpr uint32_t STATE_WORDS = 8
constexpr uint32_t STATE_CYCLES = 2
constexpr uint32_t STATE_LIMIT_DONE = 3
constexpr uint32_t STATE_LIMIT_ROUNDS = 5
constexpr uint32_t STATE_LIMITED_CELLS = 6
constexpr uint32_t WIDE_WORDS = 3
constexpr uint32_t WIDE_WORST_EXCESS = 2
constexpr uint32_t COLOR_COUNT = 2
constexpr uint32_t PREDICATE_CYCLES = 0
constexpr uint32_t PREDICATE_LIMIT = 1
constexpr uint32_t PREDICATE_WORDS = 2
constexpr uint32_t SWEEP_BITS = 8
constexpr uint32_t UAV_COUNT = 11
constexpr uint32_t ARGS_BYTES = 3 * sizeof(uint32_t)
constexpr uint32_t ROOT_CONSTANT_COUNT = 16
constexpr gpu::RootSignatureLayout ROOT_LAYOUT
constexpr std::array< const char *, 15 > SHADERS
constexpr std::array< bool, 11 > UPLOADED

Function Documentation

◆ AppendChildren()

void bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::AppendChildren ( const ImplicitGrid & grid,
size_t depth,
const std::vector< uint32_t > & levelOffsets,
std::vector< ImGpuNode > & nodes,
std::vector< uint32_t > & lists )

Definition at line 139 of file gpu_implicit.cpp.

References AppendChildren(), bicameral::sim::ImplicitGrid::levels, and bicameral::sim::ImplicitGridLevel::parents.

Referenced by AppendChildren(), and MakeNodes().

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

◆ DepthSlot()

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::DepthSlot ( uint32_t depth)
constexpr

Definition at line 68 of file gpu_implicit.cpp.

References DepthSlot().

Referenced by DepthSlot().

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

◆ GlobalUavBarrier()

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

Definition at line 93 of file gpu_implicit.cpp.

References GlobalUavBarrier().

Referenced by GlobalUavBarrier().

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

◆ MakeCellFaces()

std::pair< std::vector< uint32_t >, std::vector< uint32_t > > bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::MakeCellFaces ( const ImplicitGrid & grid)

Definition at line 115 of file gpu_implicit.cpp.

References bicameral::sim::ImplicitGrid::cells, bicameral::sim::ImplicitGrid::faces, and MakeCellFaces().

Referenced by MakeCellFaces().

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

◆ MakeCellImage()

std::vector< ImGpuCell > bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::MakeCellImage ( const ImplicitGrid & grid,
const std::vector< uint32_t > & faceStarts )

Definition at line 99 of file gpu_implicit.cpp.

References bicameral::sim::ImplicitGrid::cells, bicameral::sim::ImplicitCell::energy, bicameral::sim::ImplicitCell::fraction, bicameral::sim::ImplicitCell::heatCapacity, MakeCellImage(), and bicameral::sim::ImplicitCell::startTemperature.

Referenced by MakeCellImage().

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

◆ MakeNodes()

NodeImages bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::MakeNodes ( const ImplicitGrid & grid,
const std::vector< uint32_t > & levelOffsets,
std::vector< uint32_t > & lists )

Definition at line 154 of file gpu_implicit.cpp.

References AppendChildren(), bicameral::sim::ImplicitGridLevel::colors, bicameral::sim::ImplicitGrid::levels, bicameral::sim::ImplicitGridLevel::levels, MakeNodes(), bicameral::sim::ImplicitGridLevel::neighbors, bicameral::sim::ImplicitGridLevel::parents, bicameral::sim::ImplicitGridLevel::restrictWeights, bicameral::sim::ImplicitGridLevel::rowStarts, bicameral::sim::ImplicitGridLevel::selfWeights, and bicameral::sim::ImplicitGridLevel::weights.

Referenced by MakeNodes().

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

◆ PlanDepthWord()

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::PlanDepthWord ( uint32_t kind,
uint32_t depth )
constexpr

Definition at line 63 of file gpu_implicit.cpp.

References PlanDepthWord().

Referenced by PlanDepthWord().

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

◆ ToBytes()

template<typename T>
std::vector< std::byte > bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::ToBytes ( const std::vector< T > & values)

Definition at line 73 of file gpu_implicit.cpp.

References ToBytes().

Referenced by ToBytes().

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

◆ WriteUpload()

bool bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::WriteUpload ( ID3D12Resource * upload,
std::span< const std::byte > bytes )

Definition at line 81 of file gpu_implicit.cpp.

References WriteUpload().

Referenced by WriteUpload().

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

Variable Documentation

◆ ARGS_BYTES

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::ARGS_BYTES = 3 * sizeof(uint32_t)
constexpr

Definition at line 44 of file gpu_implicit.cpp.

◆ COLOR_COUNT

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::COLOR_COUNT = 2
constexpr

Definition at line 35 of file gpu_implicit.cpp.

◆ PREDICATE_CYCLES

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::PREDICATE_CYCLES = 0
constexpr

Definition at line 37 of file gpu_implicit.cpp.

◆ PREDICATE_LIMIT

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::PREDICATE_LIMIT = 1
constexpr

Definition at line 38 of file gpu_implicit.cpp.

◆ PREDICATE_WORDS

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::PREDICATE_WORDS = 2
constexpr

Definition at line 39 of file gpu_implicit.cpp.

◆ ROOT_CONSTANT_COUNT

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::ROOT_CONSTANT_COUNT = 16
constexpr

Definition at line 46 of file gpu_implicit.cpp.

◆ ROOT_LAYOUT

gpu::RootSignatureLayout bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::ROOT_LAYOUT
constexpr
Initial value:
{
.uavCount = UAV_COUNT, .rootConstantCount = ROOT_CONSTANT_COUNT, .debugRing = true}

Definition at line 47 of file gpu_implicit.cpp.

◆ SHADERS

std::array<const char*, 15> bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::SHADERS
constexpr
Initial value:
= {
"sim/implicit_begin.cso", "sim/implicit_start.cso", "sim/implicit_smooth.cso",
"sim/implicit_restrict.cso", "sim/implicit_prolong.cso", "sim/implicit_converged.cso",
"sim/implicit_cycle_end.cso", "sim/implicit_flows.cso", "sim/implicit_mark.cso",
"sim/implicit_limit_end.cso", "sim/implicit_limit_faces.cso", "sim/implicit_apply.cso",
"sim/implicit_tail.cso", "sim/implicit_plan_levels.cso", "sim/implicit_plan_args.cso"}

Definition at line 51 of file gpu_implicit.cpp.

◆ STATE_CYCLES

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::STATE_CYCLES = 2
constexpr

Definition at line 29 of file gpu_implicit.cpp.

◆ STATE_LIMIT_DONE

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::STATE_LIMIT_DONE = 3
constexpr

Definition at line 30 of file gpu_implicit.cpp.

◆ STATE_LIMIT_ROUNDS

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::STATE_LIMIT_ROUNDS = 5
constexpr

Definition at line 31 of file gpu_implicit.cpp.

◆ STATE_LIMITED_CELLS

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::STATE_LIMITED_CELLS = 6
constexpr

Definition at line 32 of file gpu_implicit.cpp.

◆ STATE_WORDS

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::STATE_WORDS = 8
constexpr

Definition at line 28 of file gpu_implicit.cpp.

◆ SWEEP_BITS

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::SWEEP_BITS = 8
constexpr

Definition at line 41 of file gpu_implicit.cpp.

◆ THREADS

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

Definition at line 27 of file gpu_implicit.cpp.

◆ UAV_COUNT

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::UAV_COUNT = 11
constexpr

Definition at line 43 of file gpu_implicit.cpp.

◆ UPLOADED

std::array<bool, 11> bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::UPLOADED
constexpr
Initial value:
= {true, true, true, true, true, false,
false, false, false, true, false}

Definition at line 59 of file gpu_implicit.cpp.

◆ WIDE_WORDS

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::WIDE_WORDS = 3
constexpr

Definition at line 33 of file gpu_implicit.cpp.

◆ WIDE_WORST_EXCESS

uint32_t bicameral::sim::anonymous_namespace{gpu_implicit.cpp}::WIDE_WORST_EXCESS = 2
constexpr

Definition at line 34 of file gpu_implicit.cpp.