Renderer: Implement and use debug names
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Renderer/Config.hpp>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
@@ -28,6 +29,8 @@ namespace Nz
|
||||
CommandBuffer(CommandBuffer&&) = delete;
|
||||
virtual ~CommandBuffer();
|
||||
|
||||
virtual void UpdateDebugName(std::string_view name) = 0;
|
||||
|
||||
CommandBuffer& operator=(const CommandBuffer&) = delete;
|
||||
CommandBuffer& operator=(CommandBuffer&&) = delete;
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ namespace Nz
|
||||
|
||||
virtual CommandBufferPtr BuildCommandBuffer(const std::function<void(CommandBufferBuilder& builder)>& callback) = 0;
|
||||
|
||||
virtual void UpdateDebugName(std::string_view name) = 0;
|
||||
|
||||
CommandPool& operator=(const CommandPool&) = delete;
|
||||
CommandPool& operator=(CommandPool&&) = default;
|
||||
};
|
||||
|
||||
@@ -23,6 +23,8 @@ namespace Nz
|
||||
|
||||
inline FramebufferType GetType() const;
|
||||
|
||||
virtual void UpdateDebugName(std::string_view name) = 0;
|
||||
|
||||
Framebuffer& operator=(const Framebuffer&) = delete;
|
||||
Framebuffer& operator=(Framebuffer&&) noexcept = default;
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@ namespace Nz
|
||||
inline RenderDevice& GetRenderDevice();
|
||||
inline const RenderDevice& GetRenderDevice() const;
|
||||
|
||||
virtual void UpdateDebugName(std::string_view name) = 0;
|
||||
|
||||
RenderBuffer& operator=(const RenderBuffer&) = delete;
|
||||
RenderBuffer& operator=(RenderBuffer&&) = delete;
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace Nz
|
||||
inline const std::vector<SubpassDescription>& GetSubpassDescriptions() const;
|
||||
inline const std::vector<SubpassDependency>& GetSubpassDependencies() const;
|
||||
|
||||
virtual void UpdateDebugName(std::string_view name) = 0;
|
||||
|
||||
RenderPass& operator=(const RenderPass&) = delete;
|
||||
RenderPass& operator=(RenderPass&&) noexcept = default;
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@ namespace Nz
|
||||
|
||||
virtual const RenderPipelineInfo& GetPipelineInfo() const = 0;
|
||||
|
||||
virtual void UpdateDebugName(std::string_view name) = 0;
|
||||
|
||||
protected:
|
||||
static void ValidatePipelineInfo(const RenderDevice& device, RenderPipelineInfo& pipelineInfo);
|
||||
};
|
||||
|
||||
@@ -37,6 +37,8 @@ namespace Nz
|
||||
virtual ~RenderPipelineLayout();
|
||||
|
||||
virtual ShaderBindingPtr AllocateShaderBinding(UInt32 setIndex) = 0;
|
||||
|
||||
virtual void UpdateDebugName(std::string_view name) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Renderer/Config.hpp>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
#include <variant>
|
||||
|
||||
namespace Nz
|
||||
@@ -37,6 +38,8 @@ namespace Nz
|
||||
virtual void Update(const Binding* bindings, std::size_t bindingCount) = 0;
|
||||
inline void Update(std::initializer_list<Binding> bindings);
|
||||
|
||||
virtual void UpdateDebugName(std::string_view name) = 0;
|
||||
|
||||
ShaderBinding& operator=(const ShaderBinding&) = delete;
|
||||
ShaderBinding& operator=(ShaderBinding&&) = delete;
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@ namespace Nz
|
||||
public:
|
||||
ShaderModule() = default;
|
||||
virtual ~ShaderModule();
|
||||
|
||||
virtual void UpdateDebugName(std::string_view name) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,11 @@ namespace Nz
|
||||
virtual Vector3ui GetSize(UInt8 level = 0) const = 0;
|
||||
virtual ImageType GetType() const = 0;
|
||||
|
||||
virtual void UpdateDebugName(std::string_view name) = 0;
|
||||
|
||||
Texture& operator=(const Texture&) = delete;
|
||||
Texture& operator=(Texture&&) = delete;
|
||||
|
||||
static inline unsigned int GetLevelSize(unsigned int size, unsigned int level);
|
||||
|
||||
static std::shared_ptr<Texture> CreateFromImage(const Image& image, const TextureParams& params);
|
||||
@@ -79,9 +84,6 @@ namespace Nz
|
||||
static std::shared_ptr<Texture> LoadCubemapFromFile(const std::filesystem::path& filePath, const TextureParams& textureParams, const CubemapParams& cubemapParams = CubemapParams());
|
||||
static std::shared_ptr<Texture> LoadCubemapFromMemory(const void* data, std::size_t size, const TextureParams& textureParams, const CubemapParams& cubemapParams = CubemapParams());
|
||||
static std::shared_ptr<Texture> LoadCubemapFromStream(Stream& stream, const TextureParams& textureParams, const CubemapParams& cubemapParams = CubemapParams());
|
||||
|
||||
Texture& operator=(const Texture&) = delete;
|
||||
Texture& operator=(Texture&&) = delete;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ namespace Nz
|
||||
TextureSampler(TextureSampler&&) = delete;
|
||||
virtual ~TextureSampler();
|
||||
|
||||
virtual void UpdateDebugName(std::string_view name) = 0;
|
||||
|
||||
TextureSampler& operator=(const TextureSampler&) = delete;
|
||||
TextureSampler& operator=(TextureSampler&&) = delete;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user