nCine::RHI::Vulkan::VulkanShader class

Shader-object stub of the Vulkan backend.

The offline emitter already produces VkVsSpirv/VkFsSpirv per program-variant, and the program object creates the VkShaderModule objects and pipelines from them. This class therefore carries no source and every operation succeeds trivially, only to satisfy the RHI::Shader contract alias.

Public types

enum class Status { NotCompiled, CompilationFailed, Compiled, CompiledWithDeferredChecks }
Compilation status of the shader (always Status::Compiled for this stub).
enum class ErrorChecking { Immediate, Deferred }
When the compilation status is checked (irrelevant for this stub).

Constructors, destructors, conversion operators

VulkanShader(std::uint32_t type) explicit
VulkanShader(std::uint32_t type, StringView filename)

Public functions

auto GetGLHandle() const -> std::uint32_t
auto GetStatus() const -> Status
auto LoadFromString(StringView string) -> bool
auto LoadFromStrings(ArrayView<const StringView> strings) -> bool
auto LoadFromFile(StringView filename) -> bool
auto Compile(ErrorChecking errorChecking, bool logOnErrors) -> bool
auto CheckCompilation(bool logOnErrors) -> bool
void SetObjectLabel(StringView label)