class final
shadercontains extensions for meta data when loading shader files.
shaders need various metadata that can describe the binding points and types of resources a SPIR-V might be expecting, as well as the pipeline stage it is assigned to. This extension to psl::
base classes
types
classes
static variables
member-functions
Function documentation
gfx::shader_stage core:: meta:: shader:: stage() const noexcept
Returns | the shader stage of this SPIR-V module (i.e. vertex, fragment, compute, etc..) |
---|
void core:: meta:: shader:: stage(gfx::shader_stage value) noexcept
Brief
sets the stage of this SPIR-V module to the given value.
Details
Parameters | |
---|---|
value in | the stage to expect. |
const std::vector<vertex:: binding>& core:: meta:: shader:: vertex_bindings() const noexcept
Returns | the collection of vertex bindings that this shader might have. |
---|
void core:: meta:: shader:: vertex_bindings(const std::vector<vertex:: binding>& value)
Brief
sets the expected set of vertex bindings of this SPIR-V module.
Parameters | |
---|---|
value in | the expected sets of vertex bindings. |
const std::vector<descriptor>& core:: meta:: shader:: descriptors() const noexcept
Returns | the set of descriptors that are used by this shader. |
---|
void core:: meta:: shader:: descriptors(const std::vector<descriptor>& value)
Brief
sets the collection of descriptors that might be used by this shader.
Parameters | |
---|---|
value in | the new descriptors to expect bindings for. |
void core:: meta:: shader:: set(descriptor value)
Brief
tries to emplace, or overwrite (if sharing a binding location) a descriptor at the given binding slot.
Details
Parameters | |
---|---|
value in | the descriptor to try to emplace. |
void core:: meta:: shader:: set(vertex:: binding value)
Brief
tries to emplace, or overwrite (if sharing a binding location) a vertex binding at the given binding slot.
Details
Parameters | |
---|---|
value in | the vertex binding to try and emplace. |
bool core:: meta:: shader:: erase(descriptor value)
Brief
tries to find, and erase a descriptor
Details
Parameters | |
---|---|
value in | the descriptor to find and erase. |
Returns | true if the element has been found and erased. |
bool core:: meta:: shader:: erase(vertex:: binding element)
Brief
tries to find, and erase the vertex binding
Details
Parameters | |
---|---|
element in | the vertex binding to find and erase. |
Returns | true if the element has been found and erased. |
template<typename S>
void core:: meta:: shader:: serialize(S& s) private
Brief
method that will be invoked by the serialization system.
Template parameters | |
---|---|
S | the type of the serializer/deserializer |
Parameters | |
s in | instance of a serializer that you can read from, or write to. |