Archived
1
Fork 0

Add placeholders for MSL, HLSL, and WGSL

This commit is contained in:
Joshua Goins 2022-02-15 09:21:56 -05:00
parent c9cac0f226
commit 5d335b0ed3
2 changed files with 13 additions and 1 deletions

View file

@ -18,7 +18,10 @@ enum class ShaderStage {
/// The shader language that the shader is written in.
enum class ShaderLanguage {
GLSL,
SPIRV
SPIRV,
MSL,
HLSL,
WGSL // lol how do we even convert to this
};
/// Compilation options when compiling shaders.

View file

@ -102,6 +102,15 @@ std::optional<ShaderSource> ShaderCompiler::compile(const ShaderLanguage from_la
switch(to_language) {
case ShaderLanguage::SPIRV:
return ShaderSource(spirv);
case ShaderLanguage::MSL:
prism::log("Unimplemented shader language: MSL");
return ShaderSource(spirv);
case ShaderLanguage::HLSL:
prism::log("Unimplemented shader language: HLSL");
return ShaderSource(spirv);
case ShaderLanguage::WGSL:
prism::log("Unimplemented shader language: WGSL");
return ShaderSource(spirv);
default:
return {};
}