Foundation
Loading...
Searching...
No Matches
Shader.hpp
Go to the documentation of this file.
1#pragma once
2#include <RHICore/Common.hpp>
3#include <Core/Allocator.hpp>
5 using namespace Core;
9 class Shader {
21 void Sort();
22 public:
23 struct Entrypoint {
26 // Applies to Compute, Task and Mesh shaders
28 };
36 struct PushConstant {
38 // TODO: add size, offset, type info?
39 // This would require us to parse all OpType.. instructions however.
40 // Caller is also expected to know the layout of push constants - TODO for now.
41 };
50
52 };
53}
General Purpose Allocator (GPA) interface.
Definition Allocator.hpp:24
Runtime reflection data for a shader module.
Definition Shader.hpp:9
Vector< SpecializationConstant > mSpecializationConstants
Definition Shader.hpp:48
Vector< Binding > mBindings
Definition Shader.hpp:35
Allocator * mAllocator
Definition Shader.hpp:10
Vector< PushConstant > mPushConstants
Definition Shader.hpp:42
void ParseSPIRV(Span< const char > bytecode)
Parse SPIR-V shader code and populate reflection data.
Definition Shader.cpp:3
String DbgDumpShaderInfo() const
Definition Shader.cpp:187
Vector< Entrypoint > mEntrypoints
Definition Shader.hpp:29
void Sort()
Definition Shader.cpp:171
std::vector< T, StlAllocator< T > > Vector
std::vector with explicit Foundation::Core::StlAllocator constructor
Definition Container.hpp:130
std::basic_string< char > String
Alias for std::basic_string<char>, without an explicit allocator constructor.
Definition Container.hpp:112
std::tuple< Args... > Tuple
Alias for std::tuple
Definition Container.hpp:38
T * Construct(Allocator *resource, Args &&...args)
Convenience placement new with object of type T using a Foundation::Core::Allocator.
Definition Allocator.hpp:149
std::span< T > Span
Alias for std::span
Definition Container.hpp:60
Core functionalities for rendering, including the Frame Graph implementation.
Definition Bindless.cpp:2
uint32_t binding
Definition Shader.hpp:33
uint32_t descriptorSet
Definition Shader.hpp:32
String name
Definition Shader.hpp:31
Tuple< uint32_t, uint32_t, uint32_t > groupLocalSize
Definition Shader.hpp:27
RHIShaderStage stage
Definition Shader.hpp:25
String name
Definition Shader.hpp:24
String name
Definition Shader.hpp:37