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

Classes

struct  WarpModule

Typedefs

using DeviceResult = std::expected<ComPtr<ID3D12Device5>, std::string>

Functions

std::string FindMissingFeatures (ID3D12Device *device)
ComPtr< ID3D12Device5 > TryCreateHardwareDevice (IDXGIAdapter1 *adapter)
bool AdapterOwnsMonitor (IDXGIAdapter1 *adapter, HMONITOR monitor)
ComPtr< ID3D12Device5 > CreateFirstHardwareDevice (IDXGIFactory6 *factory, HMONITOR monitor)
DeviceResult CreateHardwareDevice (IDXGIFactory6 *factory, HMONITOR presentMonitor)
WarpModule DescribeWarpModule ()
DeviceResult CreateWarpDevice (IDXGIFactory6 *factory)
void EnableDebugFeatures (const DeviceOptions &options)
Level LevelOfSeverity (D3D12_MESSAGE_SEVERITY severity)
std::string BreadcrumbOpName (D3D12_AUTO_BREADCRUMB_OP op)
std::string DebugNameOf (const wchar_t *name)
void LogBreadcrumbNode (const D3D12_AUTO_BREADCRUMB_NODE1 &node)
void LogAllocations (std::string_view title, const D3D12_DRED_ALLOCATION_NODE1 *node)

Variables

constexpr D3D_FEATURE_LEVEL HARDWARE_FEATURE_LEVEL = D3D_FEATURE_LEVEL_12_2
constexpr D3D_FEATURE_LEVEL WARP_FEATURE_LEVEL = D3D_FEATURE_LEVEL_11_0
constexpr uint32_t BREADCRUMB_CONTEXT_BEFORE = 3
constexpr uint32_t BREADCRUMB_CONTEXT_AFTER = 3
constexpr int MAX_LOGGED_ALLOCATIONS = 8

Typedef Documentation

◆ DeviceResult

using bicameral::gpu::anonymous_namespace{device.cpp}::DeviceResult = std::expected<ComPtr<ID3D12Device5>, std::string>

Definition at line 17 of file device.cpp.

Function Documentation

◆ AdapterOwnsMonitor()

bool bicameral::gpu::anonymous_namespace{device.cpp}::AdapterOwnsMonitor ( IDXGIAdapter1 * adapter,
HMONITOR monitor )

Definition at line 80 of file device.cpp.

References AdapterOwnsMonitor().

Referenced by AdapterOwnsMonitor(), and CreateFirstHardwareDevice().

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

◆ BreadcrumbOpName()

std::string bicameral::gpu::anonymous_namespace{device.cpp}::BreadcrumbOpName ( D3D12_AUTO_BREADCRUMB_OP op)

Definition at line 236 of file device.cpp.

References BreadcrumbOpName().

Referenced by BreadcrumbOpName(), and LogBreadcrumbNode().

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

◆ CreateFirstHardwareDevice()

ComPtr< ID3D12Device5 > bicameral::gpu::anonymous_namespace{device.cpp}::CreateFirstHardwareDevice ( IDXGIFactory6 * factory,
HMONITOR monitor )

Definition at line 93 of file device.cpp.

References AdapterOwnsMonitor(), CreateFirstHardwareDevice(), and TryCreateHardwareDevice().

Referenced by CreateFirstHardwareDevice(), and CreateHardwareDevice().

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

◆ CreateHardwareDevice()

DeviceResult bicameral::gpu::anonymous_namespace{device.cpp}::CreateHardwareDevice ( IDXGIFactory6 * factory,
HMONITOR presentMonitor )

Definition at line 110 of file device.cpp.

References CreateFirstHardwareDevice(), CreateHardwareDevice(), bicameral::Gpu, bicameral::Log(), and bicameral::Warning.

Referenced by CreateHardwareDevice().

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

◆ CreateWarpDevice()

DeviceResult bicameral::gpu::anonymous_namespace{device.cpp}::CreateWarpDevice ( IDXGIFactory6 * factory)

Definition at line 167 of file device.cpp.

References bicameral::gpu::anonymous_namespace{device.cpp}::WarpModule::besideExecutable, CreateWarpDevice(), bicameral::DescribeHresult(), DescribeWarpModule(), bicameral::gpu::anonymous_namespace{device.cpp}::WarpModule::description, FindMissingFeatures(), bicameral::Gpu, bicameral::Info, bicameral::Log(), bicameral::Warning, and WARP_FEATURE_LEVEL.

Referenced by CreateWarpDevice().

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

◆ DebugNameOf()

std::string bicameral::gpu::anonymous_namespace{device.cpp}::DebugNameOf ( const wchar_t * name)

Definition at line 263 of file device.cpp.

References DebugNameOf(), and bicameral::ToUtf8().

Referenced by DebugNameOf(), LogAllocations(), and LogBreadcrumbNode().

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

◆ DescribeWarpModule()

WarpModule bicameral::gpu::anonymous_namespace{device.cpp}::DescribeWarpModule ( )

Definition at line 130 of file device.cpp.

References DescribeWarpModule(), bicameral::gpu::anonymous_namespace{device.cpp}::WarpModule::description, and bicameral::ToUtf8().

Referenced by CreateWarpDevice(), and DescribeWarpModule().

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

◆ EnableDebugFeatures()

void bicameral::gpu::anonymous_namespace{device.cpp}::EnableDebugFeatures ( const DeviceOptions & options)

Definition at line 199 of file device.cpp.

References bicameral::gpu::DeviceOptions::debugLayer, bicameral::gpu::DeviceOptions::dred, EnableDebugFeatures(), bicameral::Gpu, bicameral::gpu::DeviceOptions::gpuBasedValidation, bicameral::Info, bicameral::Log(), and bicameral::Warning.

Referenced by EnableDebugFeatures().

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

◆ FindMissingFeatures()

std::string bicameral::gpu::anonymous_namespace{device.cpp}::FindMissingFeatures ( ID3D12Device * device)

Definition at line 32 of file device.cpp.

References FindMissingFeatures().

Referenced by CreateWarpDevice(), FindMissingFeatures(), and TryCreateHardwareDevice().

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

◆ LevelOfSeverity()

Level bicameral::gpu::anonymous_namespace{device.cpp}::LevelOfSeverity ( D3D12_MESSAGE_SEVERITY severity)

Definition at line 224 of file device.cpp.

References bicameral::Debug, bicameral::Error, LevelOfSeverity(), bicameral::Trace, and bicameral::Warning.

Referenced by LevelOfSeverity().

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

◆ LogAllocations()

void bicameral::gpu::anonymous_namespace{device.cpp}::LogAllocations ( std::string_view title,
const D3D12_DRED_ALLOCATION_NODE1 * node )

Definition at line 290 of file device.cpp.

References DebugNameOf(), bicameral::Error, bicameral::Gpu, bicameral::Log(), LogAllocations(), and MAX_LOGGED_ALLOCATIONS.

Referenced by LogAllocations().

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

◆ LogBreadcrumbNode()

void bicameral::gpu::anonymous_namespace{device.cpp}::LogBreadcrumbNode ( const D3D12_AUTO_BREADCRUMB_NODE1 & node)

Definition at line 268 of file device.cpp.

References BREADCRUMB_CONTEXT_AFTER, BREADCRUMB_CONTEXT_BEFORE, BreadcrumbOpName(), DebugNameOf(), bicameral::Error, bicameral::Gpu, bicameral::Info, bicameral::Log(), and LogBreadcrumbNode().

Referenced by LogBreadcrumbNode().

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

◆ TryCreateHardwareDevice()

ComPtr< ID3D12Device5 > bicameral::gpu::anonymous_namespace{device.cpp}::TryCreateHardwareDevice ( IDXGIAdapter1 * adapter)

Definition at line 57 of file device.cpp.

References FindMissingFeatures(), bicameral::Gpu, HARDWARE_FEATURE_LEVEL, bicameral::Info, bicameral::Log(), bicameral::ToUtf8(), TryCreateHardwareDevice(), and bicameral::Warning.

Referenced by CreateFirstHardwareDevice(), and TryCreateHardwareDevice().

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

Variable Documentation

◆ BREADCRUMB_CONTEXT_AFTER

uint32_t bicameral::gpu::anonymous_namespace{device.cpp}::BREADCRUMB_CONTEXT_AFTER = 3
constexpr

Definition at line 26 of file device.cpp.

Referenced by LogBreadcrumbNode().

◆ BREADCRUMB_CONTEXT_BEFORE

uint32_t bicameral::gpu::anonymous_namespace{device.cpp}::BREADCRUMB_CONTEXT_BEFORE = 3
constexpr

Definition at line 25 of file device.cpp.

Referenced by LogBreadcrumbNode().

◆ HARDWARE_FEATURE_LEVEL

D3D_FEATURE_LEVEL bicameral::gpu::anonymous_namespace{device.cpp}::HARDWARE_FEATURE_LEVEL = D3D_FEATURE_LEVEL_12_2
constexpr

Definition at line 21 of file device.cpp.

Referenced by TryCreateHardwareDevice().

◆ MAX_LOGGED_ALLOCATIONS

int bicameral::gpu::anonymous_namespace{device.cpp}::MAX_LOGGED_ALLOCATIONS = 8
constexpr

Definition at line 27 of file device.cpp.

Referenced by LogAllocations().

◆ WARP_FEATURE_LEVEL

D3D_FEATURE_LEVEL bicameral::gpu::anonymous_namespace{device.cpp}::WARP_FEATURE_LEVEL = D3D_FEATURE_LEVEL_11_0
constexpr

Definition at line 22 of file device.cpp.

Referenced by CreateWarpDevice().