Custom include handler for HLSL shader source files used with shaderc compiler.
More...
#include <VulkanShaderCompiler.h>
|
| shaderc_include_result * | GetInclude (const char *requested_source, shaderc_include_type type, const char *requesting_source, size_t include_depth) override |
| | Called by shaderc to resolve an include file.
|
| void | ReleaseInclude (shaderc_include_result *result) override |
| | Called by shaderc to release memory allocated for an include result.
|
| void | SetIncludeRoot (const std::filesystem::path &root) |
| | Sets the root directory to use when resolving system includes.
|
Custom include handler for HLSL shader source files used with shaderc compiler.
Implements shaderc::CompileOptions::IncluderInterface to resolve include directives by searching relative and system paths, reading included files, and returning their contents to the shader compiler.
◆ GetInclude()
| shaderc_include_result * Raven::HLSLIncluder::GetInclude |
( |
const char * | requested_source, |
|
|
shaderc_include_type | type, |
|
|
const char * | requesting_source, |
|
|
size_t | include_depth ) |
|
inlineoverride |
Called by shaderc to resolve an include file.
- Parameters
-
| requested_source | Name/path of the include file requested. |
| type | Whether the include is relative or system. |
| requesting_source | Path of the file requesting the include. |
| include_depth | Depth of recursive include (unused). |
- Returns
- shaderc_include_result* Pointer to allocated include result containing content or error.
◆ ReleaseInclude()
| void Raven::HLSLIncluder::ReleaseInclude |
( |
shaderc_include_result * | result | ) |
|
|
inlineoverride |
Called by shaderc to release memory allocated for an include result.
- Parameters
-
| result | Pointer to the include result to be freed. |
◆ SetIncludeRoot()
| void Raven::HLSLIncluder::SetIncludeRoot |
( |
const std::filesystem::path & | root | ) |
|
|
inline |
Sets the root directory to use when resolving system includes.
- Parameters
-
| root | Filesystem path to the include root directory. |
The documentation for this class was generated from the following file: