SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
spark::render::vk::VulkanPushConstantsRange Class Referencefinal

Vulkan implementation of IPushConstantsRange. More...

#include <VulkanPushConstantsRange.h>

Inheritance diagram for spark::render::vk::VulkanPushConstantsRange:
spark::render::IPushConstantsRange

Classes

struct  Impl
 

Public Member Functions

 VulkanPushConstantsRange (ShaderStage shader_stage, unsigned int offset, unsigned int size, unsigned int space, unsigned int binding)
 Initializes a new VulkanPushConstantsRange.
 
 VulkanPushConstantsRange (const VulkanPushConstantsRange &other)=delete
 
 VulkanPushConstantsRange (VulkanPushConstantsRange &&other) noexcept=delete
 
VulkanPushConstantsRangeoperator= (const VulkanPushConstantsRange &other)=delete
 
VulkanPushConstantsRangeoperator= (VulkanPushConstantsRange &&other) noexcept=delete
 
unsigned space () const noexcept override
 Gets the shader space the push constants can be accessed from.
 
unsigned binding () const noexcept override
 Gets the binding point or register, the push constants are made available at.
 
unsigned offset () const noexcept override
 Gets the offset from the push constants backing memory block, the range starts at.
 
unsigned size () const noexcept override
 Gets the size (in bytes) of the range.
 
ShaderStage stage () const noexcept override
 Gets the shader stage(s), the range is accessible from.
 

Detailed Description

Vulkan implementation of IPushConstantsRange.

Constructor & Destructor Documentation

◆ VulkanPushConstantsRange()

spark::render::vk::VulkanPushConstantsRange::VulkanPushConstantsRange ( ShaderStage shader_stage,
unsigned int offset,
unsigned int size,
unsigned int space,
unsigned int binding )
explicit

Initializes a new VulkanPushConstantsRange.

Parameters
shader_stageThe ShaderStage that accesses the push constants from the range.
offsetThe offset relative to the parent push constants backing memory that marks the beginning of the range.
sizeThe size of the push constants range.
spaceThe space from which the push constants of the range will be accessible in the shader.
bindingThe register from which the push constants of the range will be accessible in the shader.
Exceptions
base::BadArgumentExceptionif one of the following conditions is met:
  • offset is not a multiple of 4.
  • size is not a multiple of 4.
  • shader_stage is more than one bit set.

Member Function Documentation

◆ binding()

unsigned spark::render::vk::VulkanPushConstantsRange::binding ( ) const
nodiscardoverridevirtualnoexcept

Gets the binding point or register, the push constants are made available at.

Returns
The binding point or register, the push constants are made available at.

Implements spark::render::IPushConstantsRange.

◆ offset()

unsigned spark::render::vk::VulkanPushConstantsRange::offset ( ) const
nodiscardoverridevirtualnoexcept

Gets the offset from the push constants backing memory block, the range starts at.

Returns
The offset from the push constants backing memory block, the range starts at.

Implements spark::render::IPushConstantsRange.

◆ size()

unsigned spark::render::vk::VulkanPushConstantsRange::size ( ) const
nodiscardoverridevirtualnoexcept

Gets the size (in bytes) of the range.

Returns
The size (in bytes) of the range.

Implements spark::render::IPushConstantsRange.

◆ space()

unsigned spark::render::vk::VulkanPushConstantsRange::space ( ) const
nodiscardoverridevirtualnoexcept

Gets the shader space the push constants can be accessed from.

Returns
The shader space the push constants can be accessed from.

Implements spark::render::IPushConstantsRange.

◆ stage()

ShaderStage spark::render::vk::VulkanPushConstantsRange::stage ( ) const
nodiscardoverridevirtualnoexcept

Gets the shader stage(s), the range is accessible from.

Returns
The shader stage(s), the range is accessible from.

Implements spark::render::IPushConstantsRange.