27struct ResourceTableId;
30struct ShaderProgramId;
38struct TextureBarrierInfo;
39struct BufferBarrierInfo;
40struct AccelerationStructureBarrierInfo;
84#ifdef NEBULA_ENABLE_PROFILING
85struct FrameProfilingMarker
122#if NEBULA_GRAPHICS_DEBUG
128 ,
pool(InvalidCmdBufferPoolId)
205 const char* name =
nullptr
216 const char* name =
nullptr
227 const char* name =
nullptr
238 const char* name =
nullptr
251 const char* name =
nullptr
264 const char* name =
nullptr
399#if NEBULA_GRAPHICS_DEBUG
411#if NEBULA_ENABLE_PROFILING
420#if NEBULA_GRAPHICS_DEBUG
428 CoreGraphics::CmdBeginMarker(
id, color, name);
432 CoreGraphics::CmdEndMarker(this->
id);
438#if NEBULA_GRAPHICS_DEBUG
439 #define N_CMD_SCOPE(buf, color, name) CoreGraphics::CmdMarkerScope __##cmdscope(buf, color, name)
441 #define N_CMD_SCOPE(x, y, z)
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
A 2d rectangle class.
Definition rectangle.h:20
Nebula's dynamic array class.
Definition array.h:60
Implements a fixed size one-dimensional array.
Definition fixedarray.h:20
Nebula's stack class (a FILO container).
Definition stack.h:19
#define _DECL_ACQUIRE_RELEASE(ty)
Definition idallocator.h:88
#define ID_24_8_TYPE(x)
Definition id.h:132
Acceleration structures are used to enable ray tracing on the GPU by dividing the scene into a BVH.
Definition accelerationstructure.h:24
void CmdStartPipelineQueries(const CmdBufferId id)
Start pipeline statistics.
Definition vkcommandbuffer.cc:1541
const CmdBufferId CreateCmdBuffer(const CmdBufferCreateInfo &info)
create new command buffer
Definition vkcommandbuffer.cc:143
void CmdUpdateBuffer(const CmdBufferId id, const CoreGraphics::BufferId buffer, uint offset, uint size, const void *data)
Update buffer using memory pointer in command buffer.
Definition vkcommandbuffer.cc:1503
void CmdSetStencilRef(const CmdBufferId id, const uint frontRef, const uint backRef)
Set the stencil reference values.
Definition vkcommandbuffer.cc:1465
void CmdDispatch(const CmdBufferId id, int dimX, int dimY, int dimZ)
Perform computation.
Definition vkcommandbuffer.cc:1112
void CmdSetViewport(const CmdBufferId id, const Math::rectangle< int > &rect, int index)
Sets a viewport for a certain index.
Definition vkcommandbuffer.cc:1433
void CmdSetShaderProgram(const CmdBufferId id, const CoreGraphics::ShaderProgramId pro, bool bindGlobals=true)
Set shader program.
Definition vkcommandbuffer.cc:440
void CmdBuildTlas(const CmdBufferId id, const CoreGraphics::TlasId tlas)
Build TLAS.
Definition vkcommandbuffer.cc:1165
void CmdDraw(const CmdBufferId id, const CoreGraphics::PrimitiveGroup &pg)
Draw primitives.
Definition vkcommandbuffer.cc:1053
void CmdDrawMeshlets(const CmdBufferId id, int dimX, int dimY, int dimZ)
Draw meshlets.
Definition vkcommandbuffer.cc:1214
void CmdPushConstants(const CmdBufferId id, ShaderPipeline pipeline, uint offset, uint size, const void *data)
Set push constants.
Definition vkcommandbuffer.cc:553
void CmdBeginPass(const CmdBufferId id, const CoreGraphics::PassId pass)
Begin pass.
Definition vkcommandbuffer.cc:1008
void CmdCopy(const CmdBufferId id, const CoreGraphics::TextureId fromTexture, const Util::Array< CoreGraphics::TextureCopy, 4 > &from, const CoreGraphics::TextureId toTexture, const Util::Array< CoreGraphics::TextureCopy, 4 > &to)
Copy between textures.
Definition vkcommandbuffer.cc:1224
void CmdSetPrimitiveTopology(const CmdBufferId id, const CoreGraphics::PrimitiveTopology::Code topo)
Set the type of topology used.
Definition vkcommandbuffer.cc:420
QueueType
Definition config.h:40
@ GraphicsQueueType
Definition config.h:41
void CmdSetStencilWriteMask(const CmdBufferId id, const uint writeMask)
Set the stencil write mask.
Definition vkcommandbuffer.cc:1493
void CmdEndOcclusionQueries(const CmdBufferId id)
End occlusion queries.
Definition vkcommandbuffer.cc:1527
void CmdWaitEvent(const CmdBufferId id, const EventId ev, const CoreGraphics::PipelineStage waitStage, const CoreGraphics::PipelineStage signalStage)
Signals an event.
Definition vkcommandbuffer.cc:974
void CmdSetStencilReadMask(const CmdBufferId id, const uint readMask)
Set the stencil read mask (compare mask(.
Definition vkcommandbuffer.cc:1483
void CmdBlit(const CmdBufferId id, const CoreGraphics::TextureId fromTexture, const CoreGraphics::TextureCopy &from, const CoreGraphics::TextureId toTexture, const CoreGraphics::TextureCopy &to)
Blit textures.
Definition vkcommandbuffer.cc:1358
void CmdBuildBlas(const CmdBufferId id, const CoreGraphics::BlasId blas)
Build BLAS.
Definition vkcommandbuffer.cc:1152
void CmdSetViewports(const CmdBufferId id, const Util::FixedArray< Math::rectangle< int > > &viewports)
Set viewport array.
Definition vkcommandbuffer.cc:1393
void CmdSetScissorRect(const CmdBufferId id, const Math::rectangle< int > &rect, int index)
Sets a scissor rect for a certain index.
Definition vkcommandbuffer.cc:1450
void CmdDrawIndirect(const CmdBufferId id, const CoreGraphics::BufferId buffer, IndexT bufferOffset, SizeT numDraws, SizeT stride)
Draw indirect, draws is the amount of draws in the buffer, and stride is the byte offset between each...
Definition vkcommandbuffer.cc:1092
void CmdSetResourceTable(const CmdBufferId id, const CoreGraphics::ResourceTableId table, const IndexT slot, CoreGraphics::ShaderPipeline pipeline, const Util::FixedArray< uint > &offsets)
Set resource table.
Definition vkcommandbuffer.cc:517
CmdPipelineBuildBits
Definition commandbuffer.h:54
@ FramebufferLayoutInfoSet
void CmdBeginRecord(const CmdBufferId id, const CmdBufferBeginInfo &info)
begin recording to command buffer
Definition vkcommandbuffer.cc:298
const CmdBufferPoolId CreateCmdBufferPool(const CmdBufferPoolCreateInfo &info)
create new command buffer pool
Definition vkcommandbuffer.cc:104
void CmdReset(const CmdBufferId id, const CmdBufferClearInfo &info)
clear the command buffer to be empty
Definition vkcommandbuffer.cc:340
void CmdEndRecord(const CmdBufferId id)
end recording command buffer, it may be submitted after this is done
Definition vkcommandbuffer.cc:330
void CmdHandover(const CmdBufferId from, const CmdBufferId to, CoreGraphics::PipelineStage fromStage, CoreGraphics::PipelineStage toStage, const Util::FixedArray< TextureBarrierInfo, true > &textures, const Util::FixedArray< BufferBarrierInfo, true > &buffers, const IndexT fromQueue=InvalidIndex, const IndexT toQueue=InvalidIndex, const char *name=nullptr)
Handover.
Definition vkcommandbuffer.cc:810
void DeferredDestroyCmdBuffer(const CmdBufferId id)
Issue command buffer for deletion (happens when GPU is finished with it)
Definition vkcommandbuffer.cc:269
void CmdSetScissors(const CmdBufferId id, const Util::FixedArray< Math::rectangle< int > > &rects)
Set scissor array.
Definition vkcommandbuffer.cc:1414
void CmdResolve(const CmdBufferId id, const CoreGraphics::TextureId source, const CoreGraphics::TextureCopy sourceCopy, const CoreGraphics::TextureId dest, const CoreGraphics::TextureCopy destCopy)
Resolve MSAA source to non-MSAA target.
Definition vkcommandbuffer.cc:1122
void CmdStartOcclusionQueries(const CmdBufferId id)
Start occlusion queries.
Definition vkcommandbuffer.cc:1513
ShaderPipeline
Definition config.h:111
void CmdNextSubpass(const CmdBufferId id)
Progress to next subpass.
Definition vkcommandbuffer.cc:1031
void DestroyCmdBuffer(const CmdBufferId id)
Destroy the command buffer immediately (use with caution as buffer might be in use by GPU)
Definition vkcommandbuffer.cc:237
void CmdFinishQueries(const CmdBufferId id)
Finish queries.
void CmdDrawIndirectIndexed(const CmdBufferId id, const CoreGraphics::BufferId buffer, IndexT bufferOffset, SizeT numDraws, SizeT stride)
Draw indirect, draws is the amount of draws in the buffer, and stride is the byte offset between each...
Definition vkcommandbuffer.cc:1102
void CmdSetGraphicsPipeline(const CmdBufferId id)
Create (if necessary) and bind pipeline based on state thus far.
Definition vkcommandbuffer.cc:598
void CmdResetEvent(const CmdBufferId id, const CoreGraphics::EventId ev, const CoreGraphics::PipelineStage stage)
Signals an event.
Definition vkcommandbuffer.cc:997
ImageBits
Definition config.h:82
void CmdSetVertexBuffer(const CmdBufferId id, IndexT streamIndex, const CoreGraphics::BufferId &buffer, SizeT bufferOffset)
Set vertex buffer.
Definition vkcommandbuffer.cc:352
CmdBufferQueryBits
Definition commandbuffer.h:43
@ Occlusion
Definition commandbuffer.h:45
@ NoQueries
Definition commandbuffer.h:44
@ Statistics
Definition commandbuffer.h:46
@ NumBits
Definition commandbuffer.h:48
@ Timestamps
Definition commandbuffer.h:47
void CmdRaysDispatch(const CmdBufferId id, const RayDispatchTable &table, int dimX, int dimY, int dimZ)
Fire rays.
Definition vkcommandbuffer.cc:1178
void CmdEndPipelineQueries(const CmdBufferId id)
End pipeline statistics.
Definition vkcommandbuffer.cc:1555
void CmdSignalEvent(const CmdBufferId id, const CoreGraphics::EventId ev, const CoreGraphics::PipelineStage stage)
Signals an event.
Definition vkcommandbuffer.cc:963
void CmdSetVertexLayout(const CmdBufferId id, const CoreGraphics::VertexLayoutId &vl)
Set vertex layout.
Definition vkcommandbuffer.cc:368
BarrierDomain
Definition config.h:185
PipelineStage
Definition config.h:191
void CmdSetIndexBuffer(const CmdBufferId id, const IndexType::Code indexType, const CoreGraphics::BufferId &buffer, SizeT bufferOffset)
Set index buffer.
Definition vkcommandbuffer.cc:386
void DestroyCmdBufferPool(const CmdBufferPoolId pool)
destroy command buffer pool
Definition vkcommandbuffer.cc:134
void CmdEndPass(const CmdBufferId id)
End pass.
Definition vkcommandbuffer.cc:1043
void CmdBarrier(const CmdBufferId id, CoreGraphics::PipelineStage fromStage, CoreGraphics::PipelineStage toStage, CoreGraphics::BarrierDomain domain, const Util::FixedArray< TextureBarrierInfo, true > &textures, const IndexT fromQueue, const IndexT toQueue, const char *name)
Insert pipeline barrier.
Definition commandbuffer.cc:14
void CmdSetRayTracingPipeline(const CmdBufferId buf, const PipelineId pipeline)
Set ray tracing pipeline.
Definition vkcommandbuffer.cc:667
id
Definition resourceid.h:37
Compile time configuration options for the CoreGraphics subsystem.
#define NEBULA_GRAPHICS_DEBUG
Definition config.h:322
Graphics memory interface.
#define __ImplementEnumComparisonOperators(type)
#define __ImplementEnumBitOperators(type)
Definition accelerationstructure.h:48
Definition commandbuffer.h:78
uint rowLength
Definition commandbuffer.h:80
uint offset
Definition commandbuffer.h:79
uint imageHeight
Definition commandbuffer.h:81
Definition commandbuffer.h:138
bool submitDuringPass
Definition commandbuffer.h:140
bool submitOnce
Definition commandbuffer.h:139
bool resubmittable
Definition commandbuffer.h:141
Definition commandbuffer.h:145
bool allowRelease
Definition commandbuffer.h:146
Definition commandbuffer.h:116
CmdBufferQueryBits queryTypes
Definition commandbuffer.h:120
bool subBuffer
Definition commandbuffer.h:117
CmdBufferPoolId pool
Definition commandbuffer.h:118
CmdBufferCreateInfo()
Definition commandbuffer.h:126
QueueType usage
Definition commandbuffer.h:119
Definition commandbuffer.h:155
Definition commandbuffer.h:150
Util::Stack< CoreGraphics::FrameProfilingMarker > markerStack
Definition commandbuffer.h:151
Util::Array< CoreGraphics::FrameProfilingMarker > finishedMarkers
Definition commandbuffer.h:152
Definition commandbuffer.h:104
CoreGraphics::QueueType queue
Definition commandbuffer.h:105
bool resetable
Definition commandbuffer.h:106
bool shortlived
Definition commandbuffer.h:107
Definition commandbuffer.h:101
Definition commandbuffer.h:310
ubyte numEntries
Definition commandbuffer.h:313
CoreGraphics::DeviceAddress baseAddress
Definition commandbuffer.h:311
CoreGraphics::DeviceSize entrySize
Definition commandbuffer.h:312
Definition commandbuffer.h:308
Entry missEntry
Definition commandbuffer.h:316
Entry hitEntry
Definition commandbuffer.h:316
Entry genEntry
Definition commandbuffer.h:316
Entry callableEntry
Definition commandbuffer.h:316
Definition resourcetable.h:95
struct for texture copies
Definition commandbuffer.h:70
ImageBits bits
Definition commandbuffer.h:74
uint mip
Definition commandbuffer.h:72
Math::rectangle< SizeT > region
Definition commandbuffer.h:71
uint layer
Definition commandbuffer.h:73
texture type
Definition texture.h:25
Definition accelerationstructure.h:98
Definition vertexlayout.h:16
A 4D vector.
Definition vec4.h:24
Nebula's universal string class.
Definition string.h:50
static const int InvalidIndex
Definition types.h:54
#define N_BIT(x)
Definition types.h:59
unsigned char ubyte
Definition types.h:34
int SizeT
Definition types.h:49
unsigned int uint
Definition types.h:31
uint32_t uint32
Definition types.h:38
int IndexT
Definition types.h:48