3#include <litefx/rendering.hpp>
5#include "vulkan_api.hpp"
6#include "vulkan_formatters.hpp"
9#pragma warning(disable:4250)
23 LITEFX_BUILDER(VulkanVertexBufferLayoutBuilder);
66 static inline auto create(
size_t vertexSize,
UInt32 binding = 0) {
98 size_t elementSize() const noexcept override;
101 UInt32 binding() const noexcept override;
162 IndexType indexType() const noexcept override;
167 size_t elementSize() const noexcept override;
170 UInt32 binding() const noexcept override;
253 virtual VkImageAspectFlags aspectMask() const noexcept = 0;
260 virtual VkImageAspectFlags aspectMask(
UInt32 plane) const = 0;
356 UInt64 offset() const noexcept override;
359 UInt64 size() const noexcept override;
367 void addTriangleMesh(const
TriangleMesh& mesh) override;
376 void clear() noexcept override;
379 bool remove(const
TriangleMesh& mesh) noexcept override;
385 Array<std::pair<
UInt32, VkAccelerationStructureGeometryKHR>> buildInfo() const;
386 void updateState(const
VulkanDevice* device, VkAccelerationStructureKHR handle) noexcept;
451 UInt64 offset() const noexcept override;
454 UInt64 size() const noexcept override;
462 void addInstance(const
Instance& instance) override;
465 void clear() noexcept override;
468 bool remove(const
Instance& mesh) noexcept override;
471 Array<VkAccelerationStructureInstanceKHR> buildInfo() const;
472 void updateState(const
VulkanDevice* device, VkAccelerationStructureKHR handle) noexcept;
490 LITEFX_BUILDER(VulkanBarrierBuilder);
494 using base_type::transition;
611 const
String& fileName() const noexcept override;
614 const
String& entryPoint() const noexcept override;
627 virtual const
String& bytecode() const noexcept;
633 virtual VkPipelineShaderStageCreateInfo shaderStageDefinition() const;
644 LITEFX_BUILDER(VulkanShaderProgramBuilder);
704 virtual
SharedPtr<VulkanPipelineLayout> reflectPipelineLayout() const;
708 return std::static_pointer_cast<IPipelineLayout>(this->reflectPipelineLayout());
721 using base_type::update;
824 UInt32 descriptors() const noexcept override;
832 size_t elementSize() const noexcept override;
835 UInt32 binding() const noexcept override;
850 UInt32 inputAttachmentIndex() const noexcept;
860 LITEFX_BUILDER(VulkanDescriptorSetLayoutBuilder);
865 using base_type::free;
866 using base_type::allocate;
938 const VulkanDevice& device() const noexcept;
942 const
Array<VulkanDescriptorLayout>& descriptors() const noexcept override;
945 const VulkanDescriptorLayout& descriptor(
UInt32 binding) const override;
948 UInt32 space() const noexcept override;
951 ShaderStage shaderStages() const noexcept override;
954 UInt32 uniforms() const noexcept override;
957 UInt32 storages() const noexcept override;
960 UInt32 images() const noexcept override;
963 UInt32 buffers() const noexcept override;
966 UInt32 samplers() const noexcept override;
969 UInt32 staticSamplers() const noexcept override;
972 UInt32 inputAttachments() const noexcept override;
987#ifdef __cpp_lib_mdspan
996 void free(
const VulkanDescriptorSet& descriptorSet)
const override;
1005 virtual size_t pools() const noexcept;
1043 UInt32 space() const noexcept override;
1046 UInt32 binding() const noexcept override;
1049 UInt32 offset() const noexcept override;
1052 UInt32 size() const noexcept override;
1066 LITEFX_BUILDER(VulkanPushConstantsLayoutBuilder);
1101 UInt32 size() const noexcept override;
1116 LITEFX_BUILDER(VulkanPipelineLayoutBuilder);
1169 static inline auto create(
const VulkanDevice& device) {
1176 const VulkanDevice& device() const noexcept ;
1179 const VulkanDescriptorSetLayout& descriptorSet(
UInt32 space) const override;
1182 const
Array<
SharedPtr<const VulkanDescriptorSetLayout>>& descriptorSets() const override;
1185 const VulkanPushConstantsLayout* pushConstants() const noexcept override;
1194 LITEFX_BUILDER(VulkanInputAssemblerBuilder);
1254 static inline auto create() {
1263 const VulkanVertexBufferLayout& vertexBufferLayout(
UInt32 binding)
const override;
1266 const VulkanIndexBufferLayout* indexBufferLayout() const noexcept override;
1277 LITEFX_BUILDER(VulkanRasterizerBuilder);
1341 static inline auto create() {
1358 virtual void updateLineWidth(
Float lineWidth)
noexcept;
1403 using base_type::dispatch;
1404 using base_type::dispatchIndirect;
1405 using base_type::dispatchMesh;
1406 using base_type::draw;
1407 using base_type::drawIndirect;
1408 using base_type::drawIndexed;
1409 using base_type::drawIndexedIndirect;
1410 using base_type::barrier;
1411 using base_type::transfer;
1412 using base_type::bind;
1413 using base_type::use;
1414 using base_type::pushConstants;
1415 using base_type::buildAccelerationStructure;
1416 using base_type::updateAccelerationStructure;
1417 using base_type::copyAccelerationStructure;
1471 void begin() const override;
1474 void end() const override;
1486 bool isSecondary() const noexcept override;
1489 void setViewports(
Span<const
IViewport*> viewports) const override;
1492 void setViewports(const
IViewport* viewport) const override;
1495 void setScissors(
Span<const
IScissor*> scissors) const override;
1498 void setScissors(const
IScissor* scissor) const override;
1501 void setBlendFactors(const
Vector4f& blendFactors) const noexcept override;
1504 void setStencilRef(
UInt32 stencilRef) const noexcept override;
1507 UInt64 submit() const override;
1513 void barrier(const
VulkanBarrier& barrier) const noexcept override;
1519 void transfer(const
void* const data,
size_t size, const
IVulkanBuffer& target,
UInt32 targetElement = 0,
UInt32 elements = 1) const override;
1522 void transfer(
Span<const
void* const> data,
size_t elementSize, const
IVulkanBuffer& target,
UInt32 firstElement = 0) const override;
1528 void transfer(const
void* const data,
size_t size, const
IVulkanImage& target,
UInt32 subresource = 0) const override;
1531 void transfer(
Span<const
void* const> data,
size_t elementSize, const
IVulkanImage& target,
UInt32 firstSubresource = 0,
UInt32 subresources = 1) const override;
1573 void dispatch(const
Vector3u& threadCount) const noexcept override;
1579 void dispatchMesh(const
Vector3u& threadCount) const noexcept override;
1582 void dispatchMeshIndirect(const
IVulkanBuffer& batchBuffer,
UInt32 batchCount,
UInt64 offset = 0) const noexcept override;
1588 void draw(
UInt32 vertices,
UInt32 instances = 1,
UInt32 firstVertex = 0,
UInt32 firstInstance = 0) const noexcept override;
1597 void drawIndexed(
UInt32 indices,
UInt32 instances = 1,
UInt32 firstIndex = 0,
Int32 vertexOffset = 0,
UInt32 firstInstance = 0) const noexcept override;
1600 void drawIndexedIndirect(const
IVulkanBuffer& batchBuffer,
UInt32 batchCount,
UInt64 offset = 0) const noexcept override;
1640 return std::static_pointer_cast<const ICommandQueue>(this->queue());
1643 void releaseSharedState()
const override;
1656 using base_type::submit;
1712 UInt32 familyId() const noexcept;
1718 UInt32 queueId() const noexcept;
1724 const VkSemaphore& timelineSemaphore() const noexcept;
1732 QueueType type() const noexcept override;
1734#ifdef LITEFX_BUILD_SUPPORT_DEBUG_MARKERS
1740 void endDebugRegion() const noexcept override;
1743 void setDebugMarker(const
String& label, const Vectors::ByteVector3& color = DEFAULT_DEBUG_COLOR) const noexcept override;
1757 void waitFor(
UInt64 fence)
const override;
1763 UInt64 currentFence() const noexcept override;
1767 auto vkQueue =
dynamic_cast<const VulkanQueue*
>(&queue);
1769 if (vkQueue ==
nullptr) [[unlikely]]
1772 this->waitFor(*vkQueue, fence);
1783 LITEFX_BUILDER(VulkanRenderPipelineBuilder);
1839 bool alphaToCoverage() const noexcept override;
1863 LITEFX_BUILDER(VulkanComputePipelineBuilder);
1921 LITEFX_BUILDER(VulkanRayTracingPipelineBuilder);
1974 UInt32 maxRecursionDepth() const noexcept override;
1977 UInt32 maxPayloadSize() const noexcept override;
1980 UInt32 maxAttributeSize() const noexcept override;
2003 using FrameBuffer::addImage;
2004 using FrameBuffer::mapRenderTarget;
2005 using FrameBuffer::mapRenderTargets;
2053 VkImageView imageView(
UInt32 imageIndex)
const;
2061 VkImageView imageView(
StringView imageName)
const;
2069 VkImageView imageView(
const RenderTarget& renderTarget)
const;
2074 const Size2d& size() const noexcept override;
2077 size_t getWidth() const noexcept override;
2080 size_t getHeight() const noexcept override;
2089 void unmapRenderTarget(const
RenderTarget& renderTarget) noexcept override;
2096 return this->image(index);
2104 return this->image(renderTarget);
2112 return this->resolveImage(hash(renderTargetName));
2117 return this->resolveImage(hash(renderTargetName));
2130 void resize(
const Size2d& renderArea)
override;
2139 LITEFX_BUILDER(VulkanRenderPassBuilder);
2192 VulkanRenderPass(VulkanRenderPass&&) noexcept = delete;
2195 VulkanRenderPass(const VulkanRenderPass&) = delete;
2198 VulkanRenderPass& operator=(VulkanRenderPass&&) noexcept = delete;
2201 VulkanRenderPass& operator=(const VulkanRenderPass&) = delete;
2270 explicit VulkanRenderPass(
const VulkanDevice& device,
const String& name =
"");
2292 const VulkanDevice& device() const noexcept ;
2295 SharedPtr<const VulkanFrameBuffer> activeFrameBuffer() const noexcept override;
2298 const VulkanQueue& commandQueue() const noexcept override;
2304 SharedPtr<const VulkanCommandBuffer> commandBuffer(
UInt32 index) const override;
2307 UInt32 secondaryCommandBuffers() const noexcept override;
2316 bool hasPresentTarget() const noexcept override;
2328 void begin(const VulkanFrameBuffer& frameBuffer) const override;
2331 UInt64 end() const override;
2378 virtual const VkQueryPool& timestampQueryPool() const noexcept;
2398 Format surfaceFormat() const noexcept override;
2401 UInt32 buffers() const noexcept override;
2404 const
Size2d& renderArea() const noexcept override;
2407 bool verticalSynchronization() const noexcept override;
2419 void present(
UInt64 fence) const override;
2429 void reset(
Format surfaceFormat, const
Size2d& renderArea,
UInt32 buffers,
bool enableVsync = false) override;
2432 [[nodiscard]]
UInt32 swapBackBuffer() const override;
2448 using base_type::createBuffer;
2449 using base_type::createVertexBuffer;
2450 using base_type::createIndexBuffer;
2451 using base_type::createTexture;
2452 using base_type::createTextures;
2453 using base_type::createSampler;
2454 using base_type::createSamplers;
2521 SharedPtr<IVulkanSampler> createSampler(
const String& name,
FilterMode magFilter = FilterMode::Nearest,
FilterMode minFilter = FilterMode::Nearest,
BorderMode borderU = BorderMode::Repeat,
BorderMode borderV = BorderMode::Repeat,
BorderMode borderW = BorderMode::Repeat,
MipMapMode mipMapMode = MipMapMode::Nearest,
Float mipMapBias = 0.f,
Float maxLod = std::numeric_limits<Float>::max(),
Float minLod = 0.f,
Float anisotropy = 0.f)
const override;
2536 class LITEFX_VULKAN_API
VulkanDevice final :
public GraphicsDevice<VulkanGraphicsFactory, VulkanSurface, VulkanGraphicsAdapter, VulkanSwapChain, VulkanQueue, VulkanRenderPass, VulkanRenderPipeline, VulkanComputePipeline, VulkanRayTracingPipeline, VulkanBarrier>,
public Resource<VkDevice> {
2554 VulkanDevice(VulkanDevice&&) noexcept = delete;
2557 VulkanDevice(const VulkanDevice&) = delete;
2560 VulkanDevice& operator=(VulkanDevice&&) noexcept = delete;
2563 VulkanDevice& operator=(const VulkanDevice&) = delete;
2616 void release() noexcept;
2630 void setDebugName(VkDebugReportObjectTypeEXT objectType,
UInt64 objectHandle,
StringView name) const noexcept;
2637 Span<const
String> enabledExtensions() const noexcept;
2650 template <typename THandle>
2651 inline
void setDebugName(THandle objectHandle, VkDebugReportObjectTypeEXT objectType,
StringView name) const noexcept {
2652 this->setDebugName(objectType, Vk::handleAddress(objectHandle), name);
2698 double ticksPerMillisecond() const noexcept override;
2701 void wait() const override;
2709#if defined(LITEFX_BUILD_DEFINE_BUILDERS)
2712 [[nodiscard]] VulkanRenderPassBuilder buildRenderPass(
UInt32 commandBuffers = 1)
const override;
2715 [[nodiscard]] VulkanRenderPassBuilder buildRenderPass(
const String& name,
UInt32 commandBuffers = 1)
const override;
2721 [[nodiscard]] VulkanRenderPipelineBuilder buildRenderPipeline(
const VulkanRenderPass& renderPass,
const String& name)
const override;
2724 [[nodiscard]] VulkanComputePipelineBuilder buildComputePipeline(
const String& name)
const override;
2727 [[nodiscard]] VulkanRayTracingPipelineBuilder buildRayTracingPipeline(
ShaderRecordCollection&& shaderRecords)
const override;
2730 [[nodiscard]] VulkanRayTracingPipelineBuilder buildRayTracingPipeline(
const String& name,
ShaderRecordCollection&& shaderRecords)
const override;
2733 [[nodiscard]] VulkanPipelineLayoutBuilder buildPipelineLayout()
const override;
2736 [[nodiscard]] VulkanInputAssemblerBuilder buildInputAssembler()
const override;
2739 [[nodiscard]] VulkanRasterizerBuilder buildRasterizer()
const override;
2742 [[nodiscard]] VulkanShaderProgramBuilder buildShaderProgram()
const override;
2745 [[nodiscard]] VulkanBarrierBuilder buildBarrier()
const override;
2784 virtual
Span<const
String> getEnabledValidationLayers() const noexcept;
2786#ifdef VK_USE_PLATFORM_WIN32_KHR
2847 void activate() override;
2850 void deactivate() override;
2864 void releaseDevice(const
String& name) override;
The base class for an application.
Definition app.hpp:402
Provides access to a resource managed by the class.
Definition containers.hpp:792
An exception that is thrown, if a provided argument is not valid.
Definition exceptions.hpp:60
Represents the base interface for a Vulkan acceleration structure implementation.
Definition vulkan.hpp:288
IVulkanAccelerationStructure() noexcept=default
Represents the base interface for a Vulkan buffer implementation.
Definition vulkan.hpp:183
IVulkanBuffer() noexcept=default
Represents a Vulkan sampled image or the base interface for a texture.
Definition vulkan.hpp:237
IVulkanImage() noexcept=default
Represents a Vulkan index buffer.
Definition vulkan.hpp:217
IVulkanIndexBuffer() noexcept=default
Represents a Vulkan sampler.
Definition vulkan.hpp:270
IVulkanSampler() noexcept=default
Represents a Vulkan vertex buffer.
Definition vulkan.hpp:200
IVulkanVertexBuffer() noexcept=default
Defines a rendering backend that creates a Vulkan device.
Definition vulkan.hpp:2752
std::function< VkSurfaceKHR(const VkInstance &)> surface_callback
A callback that creates a surface from a Vulkan instance.
Definition vulkan.hpp:2797
VulkanBackend(VulkanBackend &&) noexcept
Implements a Vulkan resource barrier.
Definition vulkan.hpp:488
VulkanBarrier(VulkanBarrier &&) noexcept
Implements a Vulkan bottom-level acceleration structure (BLAS).
Definition vulkan.hpp:304
VulkanBottomLevelAccelerationStructure(VulkanBottomLevelAccelerationStructure &&) noexcept
Records commands for a VulkanQueue
Definition vulkan.hpp:1397
Implements a Vulkan ComputePipeline.
Definition vulkan.hpp:1861
VulkanComputePipeline(VulkanComputePipeline &&) noexcept
Implements a Vulkan IDescriptorLayout
Definition vulkan.hpp:775
VulkanDescriptorLayout(VulkanDescriptorLayout &&) noexcept
Implements a Vulkan DescriptorSet.
Definition vulkan.hpp:716
VulkanDescriptorSet(VulkanDescriptorSet &&) noexcept=delete
Implements a Vulkan DescriptorSetLayout.
Definition vulkan.hpp:858
static auto create(const VulkanDescriptorSetLayout &other)
Creates a copy of a Vulkan descriptor set layout.
Definition vulkan.hpp:919
Implements a Vulkan graphics device.
Definition vulkan.hpp:2536
static SharedPtr< VulkanDevice > create(const VulkanBackend &backend, const VulkanGraphicsAdapter &adapter, UniquePtr< VulkanSurface > &&surface, Format format, const Size2d &renderArea, UInt32 backBuffers, bool enableVsync=false, GraphicsDeviceFeatures features={ }, Span< String > extensions={ })
Initializes the device instance.
Definition vulkan.hpp:2597
Implements a Vulkan frame buffer.
Definition vulkan.hpp:1998
const IVulkanImage & operator[](StringView renderTargetName) const override
Resolves a render target name and returns the image mapped to it.The image mapped to the render targe...
Definition vulkan.hpp:2111
const IVulkanImage & operator[](const RenderTarget &renderTarget) const override
Resolves a render target and returns the image mapped to it.The image mapped to the render target.
Definition vulkan.hpp:2103
const IVulkanImage & image(StringView renderTargetName) const override
Resolves a render target name and returns the image mapped to it.The image mapped to the render targe...
Definition vulkan.hpp:2116
Represents a Vulkan IGraphicsAdapter.
Definition vulkan_api.hpp:232
A graphics factory that produces objects for a VulkanDevice.
Definition vulkan.hpp:2441
Implements a Vulkan IImage.
Definition image.h:16
Implements a Vulkan index buffer layout.
Definition vulkan.hpp:112
static auto create(const VulkanIndexBufferLayout &other)
Creates a copy of an index buffer layout.
Definition vulkan.hpp:155
Implements a Vulkan PipelineLayout.
Definition vulkan.hpp:1114
Defines the base class for Vulkan pipeline state objects.
Definition vulkan.hpp:1366
VulkanPipelineState(VulkanPipelineState &&) noexcept=default
Implements the Vulkan PushConstantsLayout.
Definition vulkan.hpp:1064
VulkanPushConstantsLayout(VulkanPushConstantsLayout &&) noexcept
Implements the Vulkan IPushConstantsRange.
Definition vulkan.hpp:1012
VulkanPushConstantsRange(VulkanPushConstantsRange &&) noexcept
Implements a Vulkan command queue.
Definition vulkan.hpp:1650
Implements a Vulkan IRasterizer.
Definition vulkan.hpp:1276
static auto create(const VulkanRasterizer &other)
Creates a new Vulkan rasterizer state by copying an existing one.
Definition vulkan.hpp:1332
Implements a Vulkan RayTracingPipeline.
Definition vulkan.hpp:1919
VulkanRayTracingPipeline(VulkanRayTracingPipeline &&) noexcept
Implements a Vulkan render pass.
Definition vulkan.hpp:2137
static SharedPtr< VulkanRenderPass > create(const VulkanDevice &device, const String &name, Span< RenderTarget > renderTargets, Span< RenderPassDependency > inputAttachments={ }, Optional< DescriptorBindingPoint > inputAttachmentSamplerBinding=std::nullopt, UInt32 secondaryCommandBuffers=1u)
Creates and initializes a new Vulkan render pass instance that executes on the default graphics queue...
Definition vulkan.hpp:2231
static SharedPtr< VulkanRenderPass > create(const VulkanDevice &device, const String &name, const VulkanQueue &queue, Span< RenderTarget > renderTargets, Span< RenderPassDependency > inputAttachments={ }, Optional< DescriptorBindingPoint > inputAttachmentSamplerBinding=std::nullopt, UInt32 secondaryCommandBuffers=1u)
Creates and initializes a new Vulkan render pass instance.
Definition vulkan.hpp:2260
static SharedPtr< VulkanRenderPass > create(const VulkanDevice &device, const VulkanQueue &queue, Span< RenderTarget > renderTargets, Span< RenderPassDependency > inputAttachments={ }, Optional< DescriptorBindingPoint > inputAttachmentSamplerBinding=std::nullopt, UInt32 secondaryCommandBuffers=1u)
Creates and initializes a new Vulkan render pass instance.
Definition vulkan.hpp:2245
Implements a Vulkan RenderPipeline.
Definition vulkan.hpp:1781
VulkanRenderPipeline(VulkanRenderPipeline &&) noexcept=delete
Implements a Vulkan IShaderModule.
Definition vulkan.hpp:568
VulkanShaderModule(VulkanShaderModule &&) noexcept
Implements a Vulkan ShaderProgram.
Definition vulkan.hpp:642
VulkanShaderProgram(VulkanShaderProgram &&) noexcept=delete
Represents a Vulkan ISurface.
Definition vulkan_api.hpp:334
Implements a Vulkan swap chain.
Definition vulkan.hpp:2337
VulkanSwapChain(VulkanSwapChain &&) noexcept=delete
Implements a Vulkan top-level acceleration structure (TLAS).
Definition vulkan.hpp:399
VulkanTopLevelAccelerationStructure(VulkanTopLevelAccelerationStructure &&) noexcept
Implements a Vulkan vertex buffer layout.
Definition vulkan.hpp:21
static auto create(size_t vertexSize, const Enumerable< BufferAttribute > &attributes, UInt32 binding=0)
Creates a new vertex buffer layout.
Definition vulkan.hpp:77
static auto create(const VulkanVertexBufferLayout &other)
Creates a copy of a vertex buffer layout.
Definition vulkan.hpp:86
A barrier used for GPU resource synchronization.
Definition rendering.hpp:17
Represents a command buffer, that buffers commands that should be submitted to a CommandQueue.
Definition rendering.hpp:597
Represents a command queue.
Definition rendering.hpp:1090
Represents a compute Pipeline.
Definition rendering.hpp:1001
Stores the depth/stencil state of a see IRasterizer.
Definition rendering_api.hpp:3143
Defines a set of descriptors.
Definition rendering.hpp:150
Describes the layout of a descriptor set.
Definition rendering.hpp:215
A class that can be used to manage the state of a IGraphicsDevice.
Definition rendering_api.hpp:2312
Stores the images used by a RenderPass to either read from using input attachments or write to using ...
Definition rendering.hpp:1057
Represents the graphics device that a rendering back-end is doing work on.
Definition rendering.hpp:1431
Describes a factory that creates objects for a GraphicsDevice.
Definition rendering.hpp:1254
Base interface for a ray tracing acceleration structure.
Definition rendering_api.hpp:4449
void update(const ICommandBuffer &commandBuffer, const SharedPtr< const IBuffer > &scratchBuffer=nullptr, const SharedPtr< const IBuffer > &buffer=nullptr, UInt64 offset=0, UInt64 maxSize=0)
Performs an update on the acceleration structure.
Definition rendering_api.hpp:4530
void build(const ICommandBuffer &commandBuffer, const SharedPtr< const IBuffer > &scratchBuffer=nullptr, const SharedPtr< const IBuffer > &buffer=nullptr, UInt64 offset=0, UInt64 maxSize=0)
Performs a complete build of the acceleration structure.
Definition rendering_api.hpp:4494
A structure that holds a singular entity of geometry for hardware ray-tracing.
Definition rendering_api.hpp:4588
void copy(const ICommandBuffer &commandBuffer, IBottomLevelAccelerationStructure &destination, bool compress=false, const SharedPtr< const IBuffer > &buffer=nullptr, UInt64 offset=0, bool copyBuildInfo=true) const
Copies the acceleration structure into the acceleration structure provided by destination .
Definition rendering_api.hpp:4807
Base interface for buffer objects.
Definition rendering_api.hpp:4186
The interface for a command buffer.
Definition rendering_api.hpp:6517
The interface for a command queue.
Definition rendering_api.hpp:8481
Describes a the layout of a single descriptor within a DescriptorSet.
Definition rendering_api.hpp:3993
The interface for a graphics device that.
Definition rendering_api.hpp:9164
Describes a generic image.
Definition rendering_api.hpp:4208
Describes a index buffer layout.
Definition rendering_api.hpp:3952
The interface for a pipeline layout.
Definition rendering_api.hpp:6385
Describes a range within a IPushConstantsLayout.
Definition rendering_api.hpp:5645
Describes a texture sampler.
Definition rendering_api.hpp:4324
The interface of a scissor.
Definition rendering_api.hpp:3562
Represents a single shader module, i.e. a part of a IShaderProgram.
Definition rendering_api.hpp:2755
A structure that stores the instance data for a IBottomLevelAccelerationStructure.
Definition rendering_api.hpp:4870
void copy(const ICommandBuffer &commandBuffer, ITopLevelAccelerationStructure &destination, bool compress=false, const SharedPtr< const IBuffer > &buffer=nullptr, UInt64 offset=0, bool copyBuildInfo=true) const
Copies the acceleration structure into the acceleration structure provided by destination .
Definition rendering_api.hpp:5016
Describes a vertex buffer layout.
Definition rendering_api.hpp:3929
Interface for a viewport.
Definition rendering_api.hpp:3444
Describes an index buffer.
Definition rendering.hpp:479
Represents a pipeline state.
Definition rendering.hpp:547
Represents a the layout of a RenderPipeline, ComputePipeline or RayTracingPipeline.
Definition rendering.hpp:418
Describes the layout of the pipelines push constant ranges.
Definition rendering.hpp:355
Implements a IRasterizer.
Definition rendering_api.hpp:3371
Represents a ray-tracing Pipeline.
Definition rendering.hpp:1020
Defines a back-end, that provides a device instance for a certain surface and graphics adapter.
Definition rendering.hpp:1642
Represents a mapping between a set of RenderTarget instances and the input attachments of a IRenderPa...
Definition rendering_api.hpp:3076
Represents a render pass.
Definition rendering.hpp:1150
Represents a graphics Pipeline.
Definition rendering.hpp:962
Implements a render target.
Definition rendering_api.hpp:2976
Represents a shader program, consisting of multiple IShaderModules.
Definition rendering.hpp:386
Stores a set of IShaderRecords in that later form a shader binding table used for ray-tracing.
Definition rendering_api.hpp:6007
Base class for a resource that can be identified by a name string within a DeviceState.
Definition rendering_api.hpp:2265
Represents a swap chain, i.e. a chain of multiple IImage instances, that can be presented to a ISurfa...
Definition rendering.hpp:1210
An event that is used to measure timestamps in a command queue.
Definition rendering_api.hpp:3726
Describes a vertex buffer.
Definition rendering.hpp:455
Implements the IResource interface.
Definition containers.hpp:823
static auto create(TArgs &&... args) -> SharedPtr< T >
Generic factory method used to create instances of the shared object.
Definition containers.hpp:1114
Definition backend.cpp:18
Definition barrier.cpp:14
Definition command_buffer.cpp:20
Definition compute_pipeline.cpp:10
Definition descriptor_layout.cpp:10
Definition descriptor_set.cpp:8
Definition descriptor_set_layout.cpp:11
Definition frame_buffer.cpp:9
Definition factory.cpp:11
Definition index_buffer_layout.cpp:9
Definition pipeline_layout.cpp:10
Definition push_constants_layout.cpp:10
Definition push_constants_range.cpp:9
Definition ray_tracing_pipeline.cpp:15
Definition render_pass.cpp:10
Definition render_pipeline.cpp:10
Definition shader_module.cpp:10
Definition shader_program.cpp:52
Definition swapchain.cpp:18
Definition vertex_buffer_layout.cpp:10
Concept that can be used to refer to backend implementations.
Definition app.hpp:80
uint64_t UInt64
A type for an unsigned 64 bit integer.
Definition math.hpp:66
float_t Float
A type for a floating point value with single precision.
Definition math.hpp:71
uint32_t UInt32
A type for an unsigned 32 bit integer.
Definition math.hpp:56
int32_t Int32
A type for a signed 32 bit integer.
Definition math.hpp:51
BorderMode
Describes how to treat texture coordinates that are outside the domain [0..1].
Definition rendering_api.hpp:1184
CullOrder
Describes the order or vertex winding, that is used to determine, whether a polygon is facing towards...
Definition rendering_api.hpp:1018
ImageLayout
Specifies the layout of an IImage resource.
Definition rendering_api.hpp:1686
MipMapMode
Describes the filter operation between two mip-map levels.
Definition rendering_api.hpp:1169
CullMode
Describes which faces are culled by the Rasterizer stage.
Definition rendering_api.hpp:991
ShaderStage
Describes the valid shader stages of a graphics pipeline.
Definition rendering_api.hpp:799
IndexType
Describes the element type of an index buffer.
Definition rendering_api.hpp:750
PrimitiveTopology
Describes the topology of a mesh primitive.
Definition rendering_api.hpp:765
@ TriangleList
A list of triangles, where each triplet of vertices refers to a whole triangle.
ShaderBindingGroup
Describes a group or combination of groups of a shader binding table.
Definition rendering_api.hpp:939
@ All
Refers to a combination of all possible groups that can be stored in a shader binding table.
PolygonMode
Describes the draw mode for polygons.
Definition rendering_api.hpp:970
BufferType
Describes the type of a IBuffer.
Definition rendering_api.hpp:540
ResourceUsage
Describes the intended usage for a resource.
Definition rendering_api.hpp:690
ImageDimensions
Describes the dimensions of a image resource, i.e. the dimensions that are required to access a texel...
Definition rendering_api.hpp:1086
DescriptorType
Describes the type of a IDescriptor.
Definition rendering_api.hpp:436
QueuePriority
Specifies the priority with which a queue is scheduled on the GPU.
Definition rendering_api.hpp:159
@ Normal
The default queue priority.
QueueType
Represents the type of a CommandQueue.
Definition rendering_api.hpp:113
ResourceHeap
Defines where a resource (buffer or image) memory is located and from where it can be accessed.
Definition rendering_api.hpp:649
@ Resource
Creates a resource that can be read by the GPU.
AccelerationStructureFlags
Controls how an acceleration structure should be built.
Definition rendering_api.hpp:1816
FilterMode
Describes the filter operation when accessing a pixel from a texture coordinate.
Definition rendering_api.hpp:1152
PipelineStage
Defines pipeline stages as points where synchronization may occur.
Definition rendering_api.hpp:1373
ResourceAccess
Defines how a IBuffer or IImage resource is accessed.
Definition rendering_api.hpp:1537
Format
Describes a texel format.
Definition rendering_api.hpp:182
MultiSamplingLevel
Describes the number of samples with which a IImage is sampled.
Definition rendering_api.hpp:1111
std::generator< T, TVal > Generator
Describes an intermediate container for elements of type T .
Definition containers.hpp:206
std::vector< T > Array
Represents a dynamic array.
Definition containers.hpp:73
std::optional< T > Optional
Represents an optional value.
Definition containers.hpp:94
std::shared_ptr< T > SharedPtr
Represents a shared pointer, that expresses non-exclusive ownership.
Definition containers.hpp:109
std::unique_ptr< T, TDeleter > UniquePtr
Represents a unique pointer, that expresses exclusive ownership.
Definition containers.hpp:102
std::string String
Definition string.hpp:24
std::string_view StringView
Definition string.hpp:26
BackendType
Definition app_api.hpp:35
std::span< T > Span
Represents a view of an array.
Definition containers.hpp:87
An input range over another range, where the returned values of type T are covariants of the values ...
Definition containers.hpp:529
An algebraic vector type.
Definition vector.hpp:23
Describes a resource binding to a descriptor or descriptor set.
Definition rendering_api.hpp:5334
Describes a single descriptor binding point within a IShaderModule.
Definition rendering_api.hpp:2735
Describes optional features that can be supported by a device.
Definition rendering_api.hpp:9138
Stores a buffer that contains axis-aligned bounding boxes.
Definition rendering_api.hpp:4670
Represents a triangle mesh.
Definition rendering_api.hpp:4593
Represents an instance of an IBottomLevelAccelerationStructure.
Definition rendering_api.hpp:4877
Describes the offsets and sizes of a shader group within a shader binding table buffer.
Definition rendering_api.hpp:3646
An allocator used to allocate the shared object.
Definition containers.hpp:1098