Raven Engine v0.1
Loading...
Searching...
No Matches
Raven::VulkanShaderCompiler Class Reference

Manages compilation and reflection of Vulkan-compatible SPIR-V shaders from HLSL sources. More...

#include <VulkanShaderCompiler.h>

Public Member Functions

 VulkanShaderCompiler (VulkanShader *shader, bool forceCompile)
 Constructs a VulkanShaderCompiler for a given VulkanShader instance.
const std::unordered_map< ShaderStage, std::string > & GetEntryPoints ()
 Retrieves the entry points per shader stage.
const std::unordered_map< ShaderStage, std::vector< u32 > > & GetData ()
 Retrieves compiled SPIR-V binary data per shader stage.

Detailed Description

Manages compilation and reflection of Vulkan-compatible SPIR-V shaders from HLSL sources.

Reads shader source files, preprocesses multi-stage source, compiles to SPIR-V, and performs reflection to extract shader resource information.

Constructor & Destructor Documentation

◆ VulkanShaderCompiler()

Raven::VulkanShaderCompiler::VulkanShaderCompiler ( VulkanShader * shader,
bool forceCompile )

Constructs a VulkanShaderCompiler for a given VulkanShader instance.

Parameters
shaderPointer to the owning VulkanShader.
forceCompileFlag used to recompile shaders.

Member Function Documentation

◆ GetData()

const std::unordered_map< ShaderStage, std::vector< u32 > > & Raven::VulkanShaderCompiler::GetData ( )
inline

Retrieves compiled SPIR-V binary data per shader stage.

Returns
const std::unordered_map<ShaderStage, std::vector<u32>>& Map of shader stages to SPIR-V bytecode.

◆ GetEntryPoints()

const std::unordered_map< ShaderStage, std::string > & Raven::VulkanShaderCompiler::GetEntryPoints ( )
inline

Retrieves the entry points per shader stage.

Returns
const std::unordered_map<ShaderStage, std::string>& Map of shader stages to entry point names.

The documentation for this class was generated from the following files: