Renderer/CommandBuffer: Add support for InsertDebugLabel

This commit is contained in:
SirLynix
2023-09-06 13:24:31 +02:00
parent 07d3ccd75d
commit 5f8b7b361e
10 changed files with 51 additions and 1 deletions

View File

@@ -64,6 +64,8 @@ namespace Nz
void Execute();
inline void InsertDebugLabel(std::string_view label, const Color& color);
inline std::size_t GetBindingIndex() const;
inline std::size_t GetPoolIndex() const;
inline const OpenGLCommandPool& GetOwner() const;
@@ -94,6 +96,7 @@ namespace Nz
cb(DrawCommand) \
cb(DrawIndexedCommand) \
cb(EndDebugRegionCommand) \
cb(InsertDebugLabelCommand) \
cb(MemoryBarrier) \
lastCb(SetFrameBufferCommand) \
@@ -124,6 +127,7 @@ namespace Nz
inline void Execute(const GL::Context* context, const DrawCommand& command);
inline void Execute(const GL::Context* context, const DrawIndexedCommand& command);
inline void Execute(const GL::Context* context, const EndDebugRegionCommand& command);
inline void Execute(const GL::Context* context, const InsertDebugLabelCommand& command);
inline void Execute(const GL::Context* context, const MemoryBarrier& command);
inline void Execute(const GL::Context*& context, const SetFrameBufferCommand& command);
@@ -237,6 +241,12 @@ namespace Nz
{
};
struct InsertDebugLabelCommand
{
std::string label;
Color color;
};
struct MemoryBarrier
{
GLbitfield barriers;