Nebula
Loading...
Searching...
No Matches
graphicsdevice.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
9//------------------------------------------------------------------------------
10#include "pass.h"
11#include "profiling/profiling.h"
12#include "frame/framescript.h"
13#include "primitivegroup.h"
14#include "buffer.h"
15#include "imagefileformat.h"
16#include "io/stream.h"
17#include "fence.h"
18#include "debug/debugcounter.h"
22#include "memory.h"
23#include "util/set.h"
24
25namespace CoreGraphics
26{
27
28extern bool RayTracingSupported;
31extern bool MeshShadersSupported;
33
36extern uint64_t MaxConstantBufferSize;
38extern uint64_t SparseAddressSize;
39
46
55
56extern size_t MemoryRangeGranularity; // Set to the smallest amount of bytes allowed for a non-coherent memory write
58
61extern size_t ShaderGroupAlignment;
62extern size_t ShaderGroupSize;
64
83
85bool CreateGraphicsDevice(const GraphicsDeviceCreateInfo& info);
88
93
95{
97 Threading::Event* event;
98};
99
101{
102 // Constructor
104 // Comparison operator with nullptr
105 const bool operator==(const std::nullptr_t) const;
106 // Comparison operator with nullptr
107 const bool operator!=(const std::nullptr_t) const;
108 // Invalidate
109 void operator=(const std::nullptr_t);
110
111#if __VULKAN__
112 uint64_t timelineIndex;
113#endif
115};
116
118{
120
126
130
135
137
140
143
145 //CoreGraphics::BufferId uploadBuffer;
146
149
150 bool isOpen : 1;
155 bool resizing : 1;
157
158 _declare_counter(NumImageBytesAllocated);
159 _declare_counter(NumBufferBytesAllocated);
160 _declare_counter(NumBytesAllocated);
161 _declare_counter(GraphicsDeviceNumComputes);
162 _declare_counter(GraphicsDeviceNumPrimitives);
163 _declare_counter(GraphicsDeviceNumDrawCalls);
164
165#ifdef NEBULA_ENABLE_PROFILING
167#endif //NEBULA_ENABLE_PROFILING
168};
169
185
192
197
203const CoreGraphics::CmdBufferId LockGraphicsSetupCommandBuffer(const char* name = nullptr);
210
212bool PollSubmissionIndex(const CoreGraphics::QueueType queue, uint64_t index);
213
220 , const char* name = nullptr
221#endif
222);
227 , CoreGraphics::FenceId event = CoreGraphics::InvalidFenceId
228);
229
232
236template<class TYPE> uint64_t SetConstants(const TYPE& data);
238template<class TYPE> uint64_t SetConstants(const TYPE* data, SizeT elements);
240template<class TYPE> void SetConstants(ConstantBufferOffset offset, const TYPE& data);
242template<class TYPE> void SetConstants(ConstantBufferOffset offset, const TYPE* data, SizeT numElements);
245
247void SetConstantsInternal(ConstantBufferOffset offset, const void* data, SizeT size);
250
253
255const VertexAlloc AllocateVertices(const size_t numVertices, const size_t vertexSize);
257const VertexAlloc AllocateVertices(const size_t bytes);
259void DeallocateVertices(const VertexAlloc& alloc);
262
264const VertexAlloc AllocateIndices(const SizeT numIndices, const IndexType::Code indexType);
266const VertexAlloc AllocateIndices(const SizeT bytes);
268void DeallocateIndices(const VertexAlloc& alloc);
271
273Util::Pair<Memory::RangeAllocation, CoreGraphics::BufferId> AllocateUpload(const size_t numBytes, const size_t alignment = 1);
275template<class TYPE> Util::Pair<Memory::RangeAllocation, CoreGraphics::BufferId> Upload(const TYPE& data, const SizeT alignment = 1);
277template<class TYPE> Util::Pair<Memory::RangeAllocation, CoreGraphics::BufferId> UploadArray(const TYPE* data, SizeT elements, const SizeT alignment = 1);
279template<class TYPE> void Upload(const CoreGraphics::BufferId buffer, size_t offset, const TYPE& data);
281template<class TYPE> void Upload(const CoreGraphics::BufferId buffer, size_t offset, const TYPE* data, SizeT elements);
283void UploadInternal(const CoreGraphics::BufferId buffer, size_t offset, const void* data, size_t size);
284
291
294
296void ReloadShaderProgram(const CoreGraphics::ShaderProgramId& pro);
297
302
314void DelayedFreeMemory(const CoreGraphics::Alloc alloc);
329
331uint AllocateQueries(const CoreGraphics::QueryType type, uint numQueries);
333void FinishQueries(const CoreGraphics::CmdBufferId cmdBuf, const CoreGraphics::QueryType type, IndexT* starts, SizeT* counts, SizeT numCopies);
334
336IndexT GetQueueIndex(const QueueType queue);
339
341void FinishFrame(IndexT frameIndex, const Util::Array<CoreGraphics::SemaphoreId>& backbufferSemaphores, const Util::Array<CoreGraphics::SemaphoreId>& renderingSemaphores);
343void NewFrame();
344
352void SetVisualizeMipMaps(bool val);
354bool GetRenderWireframe();
356void SetRenderWireframe(bool b);
357
358#if NEBULA_ENABLE_PROFILING
360IndexT Timestamp(CoreGraphics::QueueType queue, const CoreGraphics::PipelineStage stage, const char* name);
362const Util::Array<FrameProfilingMarker>& GetProfilingMarkers(CoreGraphics::QueueType queue);
364SizeT GetNumDrawCalls();
365#endif
366
367#if NEBULA_GRAPHICS_DEBUG
369template<typename OBJECT_ID_TYPE> void ObjectSetName(const OBJECT_ID_TYPE id, const char* name);
371void QueueBeginMarker(const CoreGraphics::QueueType queue, const Math::vec4& color, const char* name);
373void QueueEndMarker(const CoreGraphics::QueueType queue);
375void QueueInsertMarker(const CoreGraphics::QueueType queue, const Math::vec4& color, const char* name);
376#endif
377
378//------------------------------------------------------------------------------
381template<class TYPE>
383SetConstants(const TYPE& data)
384{
385 const uint uploadSize = sizeof(TYPE);
387 SetConstantsInternal(ret, &data, uploadSize);
388 return ret;
389}
390
391//------------------------------------------------------------------------------
394template<class TYPE>
396SetConstants(const TYPE* data, SizeT numElements)
397{
398 const uint uploadSize = sizeof(TYPE) * numElements;
400 SetConstantsInternal(ret, data, uploadSize);
401 return ret;
402}
403
404//------------------------------------------------------------------------------
407template<class TYPE>
408inline void
409SetConstants(ConstantBufferOffset offset, const TYPE& data)
410{
411 SetConstantsInternal(offset, &data, sizeof(TYPE));
412}
413
414//------------------------------------------------------------------------------
417template<class TYPE>
418inline void
419SetConstants(ConstantBufferOffset offset, const TYPE* data, SizeT numElements)
420{
421 SetConstantsInternal(offset, data, sizeof(TYPE) * numElements);
422}
423
424//------------------------------------------------------------------------------
427template<class TYPE>
429Upload(const TYPE& data, const SizeT alignment)
430{
431 const size_t uploadSize = sizeof(TYPE);
432 auto [alloc, buffer] = AllocateUpload(uploadSize, alignment);
433 if (buffer != CoreGraphics::InvalidBufferId)
434 UploadInternal(buffer, alloc.offset, &data, uploadSize);
435 return Util::MakePair(alloc, buffer);
436}
437
438//------------------------------------------------------------------------------
441template<class TYPE>
443UploadArray(const TYPE* data, SizeT numElements, const SizeT alignment)
444{
445 const size_t uploadSize = sizeof(TYPE) * numElements;
446 auto [alloc, buffer] = AllocateUpload(uploadSize, alignment);
447 if (buffer != CoreGraphics::InvalidBufferId)
448 UploadInternal(buffer, alloc.offset, data, uploadSize);
449 return Util::MakePair(alloc, buffer);
450}
451
452//------------------------------------------------------------------------------
455template<class TYPE>
456inline void
457Upload(const CoreGraphics::BufferId buffer, const size_t offset, const TYPE& data)
458{
459 const size_t uploadSize = sizeof(TYPE);
460 UploadInternal(buffer, offset, &data, uploadSize);
461}
462
463//------------------------------------------------------------------------------
466template<class TYPE>
467inline void
468Upload(const CoreGraphics::BufferId buffer, const size_t offset, const TYPE* data, SizeT numElements)
469{
470 const size_t uploadSize = sizeof(TYPE) * numElements;
471 UploadInternal(buffer, offset, data, uploadSize);
472}
473
474//------------------------------------------------------------------------------
477template<>
479UploadArray(const void* data, SizeT numBytes, SizeT alignment)
480{
481 auto [alloc, buffer] = AllocateUpload(numBytes, alignment);
482 if (buffer != CoreGraphics::InvalidBufferId)
483 UploadInternal(buffer, alloc.offset, data, numBytes);
484 return Util::MakePair(alloc, buffer);
485}
486
487} // namespace CoreGraphics
Code
image file formats
Definition imagefileformat.h:24
Code
index types enum
Definition indextype.h:22
Defines a group of primitives as a subset of a vertex buffer and index buffer plus the primitive topo...
Definition primitivegroup.h:20
Code
enumeration
Definition primitivetopology.h:23
Render events are sent by the RenderDevice to registered render event handlers.
Definition renderevent.h:19
A 2d rectangle class.
Definition rectangle.h:20
Allocates memory ranges using the TLSF method, with extended handling of padding to better suit GPUs.
Definition rangeallocator.h:46
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Nebula's dynamic array class.
Definition array.h:60
Implements a fixed size one-dimensional array.
Definition fixedarray.h:20
A collection of unique values with quick lookup.
Definition set.h:34
Acceleration structures are used to enable ray tracing on the GPU by dividing the scene into a BVH.
Definition accelerationstructure.h:24
uint MaxResourceTableReadWriteBuffers
Definition vkgraphicsdevice.cc:806
uint MaxPushConstantSize
Definition vkgraphicsdevice.cc:794
void DelayedDeleteSwapchain(const CoreGraphics::SwapchainId id)
Add a swapchain for late deletion.
Definition vkgraphicsdevice.cc:2160
void DelayedDeleteBuffer(const CoreGraphics::BufferId id)
Add buffer to delete queue.
Definition vkgraphicsdevice.cc:2016
CoreGraphics::ImageFileFormat::Code SaveScreenshot(CoreGraphics::ImageFileFormat::Code fmt, const Ptr< IO::Stream > &outStream)
save a screenshot to the provided stream
Definition vkgraphicsdevice.cc:2527
uint64_t ConstantBufferOffset
Definition config.h:21
void DelayedDeletePass(const CoreGraphics::PassId id)
Add a pass to delayed delete.
Definition vkgraphicsdevice.cc:2111
Util::Pair< Memory::RangeAllocation, CoreGraphics::BufferId > AllocateUpload(const size_t numBytes, const size_t alignment=1)
Allocate upload memory.
Definition vkgraphicsdevice.cc:2335
bool GetRenderWireframe()
get the render as wireframe flag
Definition vkgraphicsdevice.cc:2563
void DelayedDeleteCommandBuffer(const CoreGraphics::CmdBufferId id)
Add command buffer to late deletion.
Definition vkgraphicsdevice.cc:2056
void UnlockGraphicsSetupCommandBuffer(CoreGraphics::CmdBufferId cmdBuf)
Release lock on immediate graphics command buffer.
Definition vkgraphicsdevice.cc:1647
void SubmitImmediateCommandBuffers()
Submit immediate command buffers.
Definition vkgraphicsdevice.cc:1769
IndexT GetQueueIndex(const QueueType queue)
Get queue index.
Definition vkgraphicsdevice.cc:2219
uint TimestampPeriod
Definition vkgraphicsdevice.cc:814
void WaitAndClearPendingCommands()
wait for all queues to finish
Definition vkgraphicsdevice.cc:1987
uint64_t SetConstants(const TYPE &data)
Allocate range of memory and set data, return offset (thread safe).
Definition graphicsdevice.h:383
const Util::Set< uint32_t > & GetQueueIndices()
Get queue indices.
Definition vkgraphicsdevice.cc:2228
uint ReadWriteBufferAlignment
Definition vkgraphicsdevice.cc:791
const CoreGraphics::BufferId GetVertexBuffer()
Get vertex buffer.
Definition vkgraphicsdevice.cc:2277
bool VariableRateShadingSupported
Definition vkgraphicsdevice.cc:788
QueryType
Definition config.h:52
void RemoveBackBufferTexture(const CoreGraphics::TextureId tex)
remove a render texture
Definition vkgraphicsdevice.cc:1585
const CoreGraphics::CmdBufferId LockGraphicsSetupCommandBuffer(const char *name=nullptr)
Lock immediate graphics command buffer.
Definition vkgraphicsdevice.cc:1628
bool NotifyEventHandlers(const CoreGraphics::RenderEvent &e)
notify event handlers about an event
Definition vkgraphicsdevice.cc:1558
size_t ShaderGroupSize
Definition vkgraphicsdevice.cc:818
void DelayedDeleteCommandBufferPool(const CoreGraphics::CmdBufferPoolId id)
Add command buffer pool to late deletion.
Definition vkgraphicsdevice.cc:2072
void ReloadShaderProgram(const CoreGraphics::ShaderProgramId &pro)
trigger reloading a shader
Definition vkgraphicsdevice.cc:1914
void DelayedDeleteTextureView(const CoreGraphics::TextureViewId id)
Add texture view to delete queue.
Definition vkgraphicsdevice.cc:2044
Util::Pair< Memory::RangeAllocation, CoreGraphics::BufferId > Upload(const TYPE &data, const SizeT alignment=1)
Upload single item to GPU source buffer.
Definition graphicsdevice.h:429
bool DynamicVertexInputSupported
Definition vkgraphicsdevice.cc:786
void AddBackBufferTexture(const CoreGraphics::TextureId tex)
add a render texture used by the back buffer
Definition vkgraphicsdevice.cc:1576
QueueType
Definition config.h:40
void RemoveEventHandler(const Ptr< CoreGraphics::RenderEventHandler > &h)
remove a render event handler
Definition vkgraphicsdevice.cc:1544
bool MeshShadersSupported
Definition vkgraphicsdevice.cc:787
uint AccelerationStructureScratchAlignment
Raytracing properties.
Definition vkgraphicsdevice.cc:816
void FreeUploads(const Util::Array< Memory::RangeAllocation > &allocations)
Free upload allocations directly.
Definition vkgraphicsdevice.cc:2366
void DelayedDeleteSemaphore(const CoreGraphics::SemaphoreId id)
Add a semaphore for late deletion.
Definition vkgraphicsdevice.cc:2148
void FlushUploads(const Util::Array< Memory::RangeAllocation > &allocations)
Flush upload allocations directly.
Definition vkgraphicsdevice.cc:2379
size_t ShaderGroupAlignment
Definition vkgraphicsdevice.cc:817
IndexT GetBufferedFrameIndex()
get current frame index, which is between 0 and GetNumBufferedFrames
Definition vkgraphicsdevice.cc:1522
CoreGraphics::BufferId GetConstantBuffer(IndexT i)
return id to global graphics constant buffer
Definition vkgraphicsdevice.cc:1905
uint MaxResourceTableSamplers
Definition vkgraphicsdevice.cc:810
@ NumMemoryPoolTypes
Memory which is visible on both device and host side.
Definition memory.h:37
ConstantBufferOffset AllocateConstantBufferMemory(size_t size)
Reserve range of constant buffer memory and return offset.
Definition vkgraphicsdevice.cc:1878
void DelayedDeleteBlas(const CoreGraphics::BlasId id)
Add a blas for delayed delete.
Definition vkgraphicsdevice.cc:2124
const VertexAlloc AllocateVertices(const size_t numVertices, const size_t vertexSize)
Allocate vertices from the global vertex pool.
Definition vkgraphicsdevice.cc:2239
void SubmitCommandBufferImmediate(CoreGraphics::CmdBufferId cmdBuf, CoreGraphics::QueueType type, CoreGraphics::FenceId event=CoreGraphics::InvalidFenceId)
Submits a command buffer immediately.
Definition vkgraphicsdevice.cc:1759
void DelayedDeletePipeline(const CoreGraphics::PipelineId id)
Add a pipeline for late deletion.
Definition vkgraphicsdevice.cc:2173
uint MaxResourceTableConstantBuffers
Definition vkgraphicsdevice.cc:804
CmdPipelineBuildBits
Definition commandbuffer.h:54
bool NvidiaCheckpointsSupported
Definition vkgraphicsdevice.cc:789
void FinishQueries(const CoreGraphics::CmdBufferId cmdBuf, const CoreGraphics::QueryType type, IndexT *starts, SizeT *counts, SizeT numCopies)
Copy query results to buffer.
Definition vkgraphicsdevice.cc:2201
void EnqueueUploadsFlushAndFree(const Util::Array< Memory::RangeAllocation > &allocations)
Queue uploads to flush and free at immediate submit.
Definition vkgraphicsdevice.cc:2406
SizeT GetNumBufferedFrames()
get number of buffered frames
Definition vkgraphicsdevice.cc:1513
const CoreGraphics::BufferId GetIndexBuffer()
Get index buffer.
Definition vkgraphicsdevice.cc:2325
void DelayedDeleteTexture(const CoreGraphics::TextureId id)
Add texture to delete queue.
Definition vkgraphicsdevice.cc:2030
uint MaxPerStageConstantBuffers
Definition vkgraphicsdevice.cc:797
void UnlockTransferHandoverSetupCommandBuffer(CoreGraphics::CmdBufferId cmdBuf)
Release lock on handover command buffer.
Definition vkgraphicsdevice.cc:1679
uint64_t SparseAddressSize
Definition vkgraphicsdevice.cc:795
void SetVisualizeMipMaps(bool val)
set visualization of mipmaps flag
Definition vkgraphicsdevice.cc:2554
uint64_t MaxConstantBufferSize
Definition vkgraphicsdevice.cc:793
const CoreGraphics::CmdBufferId LockTransferSetupCommandBuffer()
Lock resource command buffer.
Definition vkgraphicsdevice.cc:1596
uint AllocateQueries(const CoreGraphics::QueryType type, uint numQueries)
Allocate a range of queries.
Definition vkgraphicsdevice.cc:2185
void DestroyGraphicsDevice()
destroy graphics device
Definition vkgraphicsdevice.cc:1443
uint MaxPerStageInputAttachments
Definition vkgraphicsdevice.cc:802
SubmissionWaitEvent SubmitCommandBuffers(const Util::Array< CoreGraphics::CmdBufferId, 8 > &cmds, CoreGraphics::QueueType type, Util::Array< CoreGraphics::SubmissionWaitEvent, 8 > waitEvents=nullptr)
Submit a command buffer, but doesn't necessarily execute it immediately.
Definition vkgraphicsdevice.cc:1710
uint MaxPerStageReadWriteBuffers
Definition vkgraphicsdevice.cc:798
uint MaxResourceTableSampledImages
Definition vkgraphicsdevice.cc:808
void UnlockConstantUpdates()
Unlock constants.
Definition vkgraphicsdevice.cc:1848
void DeallocateIndices(const VertexAlloc &alloc)
Deallocate indices.
Definition vkgraphicsdevice.cc:2314
void DeallocateVertices(const VertexAlloc &alloc)
Deallocate vertices.
Definition vkgraphicsdevice.cc:2266
void SetConstantsInternal(ConstantBufferOffset offset, const void *data, SizeT size)
Use pre-allocated range of memory to update graphics constants.
Definition vkgraphicsdevice.cc:1869
void DelayedDeleteTlas(const CoreGraphics::TlasId id)
Add a tlas for delayed delete.
Definition vkgraphicsdevice.cc:2136
void AttachEventHandler(const Ptr< CoreGraphics::RenderEventHandler > &h)
attach a render event handler
Definition vkgraphicsdevice.cc:1531
bool GetVisualizeMipMaps()
get visualization of mipmaps flag
Definition vkgraphicsdevice.cc:2545
uint MaxPerStageReadWriteImages
Definition vkgraphicsdevice.cc:800
void UploadInternal(const CoreGraphics::BufferId buffer, size_t offset, const void *data, size_t size)
Upload memory to upload buffer with given offset, return offset.
Definition vkgraphicsdevice.cc:2356
bool RayTracingSupported
Definition vkgraphicsdevice.cc:785
void DelayedDeleteDescriptorSet(const CoreGraphics::ResourceTableId id)
Add a descriptor set to delete queue.
Definition vkgraphicsdevice.cc:2095
uint MaxResourceTableInputAttachments
Definition vkgraphicsdevice.cc:811
uint MaxResourceTableDynamicOffsetConstantBuffers
Definition vkgraphicsdevice.cc:805
const CoreGraphics::CmdBufferId LockTransferHandoverSetupCommandBuffer()
Lock handover transfer command buffer.
Definition vkgraphicsdevice.cc:1660
void DelayedFreeMemory(const CoreGraphics::Alloc alloc)
Add memory allocation to delete queue.
Definition vkgraphicsdevice.cc:2085
uint MaxRecursionDepth
Definition vkgraphicsdevice.cc:819
void FinishFrame(IndexT frameIndex, const Util::Array< CoreGraphics::SemaphoreId > &backbufferSemaphores, const Util::Array< CoreGraphics::SemaphoreId > &renderingSemaphores)
Finish current frame.
Definition vkgraphicsdevice.cc:1923
bool CreateGraphicsDevice(const GraphicsDeviceCreateInfo &info)
create graphics device
Definition vkgraphicsdevice.cc:836
void NewFrame()
Progress to next frame.
Definition vkgraphicsdevice.cc:2443
bool PollSubmissionIndex(const CoreGraphics::QueueType queue, uint64_t index)
Poll a submission for completion.
Definition vkgraphicsdevice.cc:1692
void SetRenderWireframe(bool b)
set the render as wireframe flag
Definition vkgraphicsdevice.cc:2572
Util::Pair< Memory::RangeAllocation, CoreGraphics::BufferId > UploadArray(const TYPE *data, SizeT elements, const SizeT alignment=1)
Upload array of items to GPU source buffer.
Definition graphicsdevice.h:443
uint MaxResourceTableReadWriteImages
Definition vkgraphicsdevice.cc:809
uint MaxPerStageSamplers
Definition vkgraphicsdevice.cc:801
PipelineStage
Definition config.h:192
void WaitForQueue(CoreGraphics::QueueType queue)
wait for an individual queue to finish
Definition vkgraphicsdevice.cc:1978
void LockConstantUpdates()
Lock constant updates.
Definition vkgraphicsdevice.cc:1858
const VertexAlloc AllocateIndices(const SizeT numIndices, const IndexType::Code indexType)
Allocate indices from the global index pool.
Definition vkgraphicsdevice.cc:2286
uint ConstantBufferAlignment
Definition vkgraphicsdevice.cc:792
uint MaxPerStageSampledImages
Definition vkgraphicsdevice.cc:799
void InvalidateGraphicsPipelineCache()
Invoke a flush of all graphics pipelines.
Definition vkgraphicsdevice.cc:2416
uint MaxResourceTableDynamicOffsetReadWriteBuffers
Definition vkgraphicsdevice.cc:807
void UnlockTransferSetupCommandBuffer(CoreGraphics::CmdBufferId cmdBuf)
Release lock on resource command buffer.
Definition vkgraphicsdevice.cc:1615
size_t MemoryRangeGranularity
Definition vkgraphicsdevice.cc:813
constexpr Pair< A, B > MakePair(const A &a, const B &b)
Definition tupleutility.h:54
std::pair< A, B > Pair
Wrap std::pair.
Definition tupleutility.h:47
#define NEBULA_GRAPHICS_DEBUG
Definition config.h:398
Graphics memory interface.
A resource table declares a list of resources (ResourceTable in DX12, DescriptorSet in Vulkan).
Definition memory.h:41
Definition accelerationstructure.h:48
Definition buffer.h:23
Definition commandbuffer.h:175
Definition commandbuffer.h:102
Definition graphicsdevice.h:95
CoreGraphics::CmdBufferId buf
Definition graphicsdevice.h:96
Threading::Event * event
Definition graphicsdevice.h:97
Definition fence.h:18
bool enableRayTracing
Definition graphicsdevice.h:77
bool enableGPUCrashAnalytics
Definition graphicsdevice.h:80
bool enableVariableRateShading
Definition graphicsdevice.h:79
bool enableMeshShaders
Definition graphicsdevice.h:78
Definition graphicsdevice.h:66
size_t globalUploadMemorySize
Definition graphicsdevice.h:70
uint64_t maxStatisticsQueries
Definition graphicsdevice.h:72
size_t globalVertexBufferMemorySize
Definition graphicsdevice.h:68
uint64_t memoryHeaps[NumMemoryPoolTypes]
Definition graphicsdevice.h:71
struct CoreGraphics::GraphicsDeviceCreateInfo::Features features
uint64_t maxTimestampQueries
Definition graphicsdevice.h:72
uint64_t maxOcclusionQueries
Definition graphicsdevice.h:72
bool enableValidation
Definition graphicsdevice.h:74
size_t globalConstantBufferMemorySize
Definition graphicsdevice.h:67
size_t globalIndexBufferMemorySize
Definition graphicsdevice.h:69
byte numBufferedFrames
Definition graphicsdevice.h:73
Definition graphicsdevice.h:118
Util::Array< Ptr< CoreGraphics::RenderEventHandler > > eventHandlers
Definition graphicsdevice.h:136
bool enableValidation
Definition graphicsdevice.h:154
Util::FixedArray< CoreGraphics::BufferId > globalConstantBuffer
Definition graphicsdevice.h:128
Util::FixedArray< bool > inflightFrames
Definition graphicsdevice.h:129
Util::Array< CoreGraphics::CmdBufferId > setupGraphicsCommandBuffers
Definition graphicsdevice.h:125
Util::Array< CoreGraphics::CmdBufferId > setupTransferCommandBuffers
Definition graphicsdevice.h:122
bool isOpen
Definition graphicsdevice.h:150
uint maxNumBufferedFrames
Definition graphicsdevice.h:147
Util::Array< CoreGraphics::TextureId > backBuffers
Definition graphicsdevice.h:119
_declare_counter(NumBufferBytesAllocated)
CoreGraphics::ResourceTableId tickResourceTableCompute
Definition graphicsdevice.h:132
CoreGraphics::CmdBufferPoolId setupGraphicsCommandBufferPool
Definition graphicsdevice.h:124
CoreGraphics::ResourceTableId tickResourceTableGraphics
Definition graphicsdevice.h:131
bool resizing
Definition graphicsdevice.h:155
Memory::RangeAllocator uploadAllocator
Definition graphicsdevice.h:144
bool renderWireframe
Definition graphicsdevice.h:152
bool visualizeMipMaps
Definition graphicsdevice.h:153
CoreGraphics::BufferId vertexBuffer
Definition graphicsdevice.h:139
CoreGraphics::ResourceTableId frameResourceTableGraphics
Definition graphicsdevice.h:133
_declare_counter(NumImageBytesAllocated)
uint32_t currentBufferedFrameIndex
Definition graphicsdevice.h:148
bool inNotifyEventHandlers
Definition graphicsdevice.h:151
_declare_counter(GraphicsDeviceNumDrawCalls)
CoreGraphics::BufferId indexBuffer
Definition graphicsdevice.h:142
_declare_counter(GraphicsDeviceNumComputes)
Memory::RangeAllocator indexAllocator
Definition graphicsdevice.h:141
Util::Array< CoreGraphics::CmdBufferId > handoverTransferCommandBuffers
Definition graphicsdevice.h:123
Memory::RangeAllocator vertexAllocator
Definition graphicsdevice.h:138
CoreGraphics::ResourceTableId frameResourceTableCompute
Definition graphicsdevice.h:134
IndexT currentFrameIndex
Definition graphicsdevice.h:156
CoreGraphics::CmdBufferPoolId setupTransferCommandBufferPool
Definition graphicsdevice.h:121
_declare_counter(GraphicsDeviceNumPrimitives)
size_t globalConstantBufferMaxValue
Definition graphicsdevice.h:127
_declare_counter(NumBytesAllocated)
Definition graphicsdevice.h:171
CoreGraphics::CmdBufferId graphicsCommandBuffer
Definition graphicsdevice.h:172
CmdPipelineBuildBits currentPipelineBits
Definition graphicsdevice.h:174
bool usePatches
Definition graphicsdevice.h:182
bool renderWireframe
Definition graphicsdevice.h:180
bool isOpen
Definition graphicsdevice.h:178
CoreGraphics::PassId pass
Definition graphicsdevice.h:177
bool enableValidation
Definition graphicsdevice.h:183
CoreGraphics::PrimitiveTopology::Code primitiveTopology
Definition graphicsdevice.h:175
bool visualizeMipMaps
Definition graphicsdevice.h:181
bool inNotifyEventHandlers
Definition graphicsdevice.h:179
CoreGraphics::PrimitiveGroup primitiveGroup
Definition graphicsdevice.h:176
CoreGraphics::CmdBufferId computeCommandBuffer
Definition graphicsdevice.h:172
Definition pass.h:28
Definition pipeline.h:16
Definition resourcetable.h:95
Definition semaphore.h:23
Definition graphicsdevice.h:101
const bool operator==(const std::nullptr_t) const
Definition vkgraphicsdevice.cc:2889
SubmissionWaitEvent()
Definition vkgraphicsdevice.cc:2880
void operator=(const std::nullptr_t)
Definition vkgraphicsdevice.cc:2907
CoreGraphics::QueueType queue
Definition graphicsdevice.h:114
const bool operator!=(const std::nullptr_t) const
Definition vkgraphicsdevice.cc:2898
Definition swapchain.h:19
texture type
Definition texture.h:25
Definition textureview.h:16
Definition accelerationstructure.h:98
Definition mesh.h:23
A 4D vector.
Definition vec4.h:24
int SizeT
Definition types.h:42
unsigned int uint
Definition types.h:33
int IndexT
Definition types.h:41