Make ShaderStage an enum class

This commit is contained in:
Mathias Agopian
2022-09-12 15:54:07 -07:00
committed by Mathias Agopian
parent ba8abb9031
commit 441708ea12
11 changed files with 115 additions and 87 deletions
+4 -4
View File
@@ -33,7 +33,6 @@ using namespace filament;
using namespace backend;
using namespace filaflat;
using namespace filamat;
using namespace std;
using namespace utils;
namespace filament {
@@ -83,7 +82,8 @@ bool ShaderExtractor::getShader(ShaderModel shaderModel,
return false;
}
return mMaterialChunk.getShader(shader, blobDictionary, (uint8_t)shaderModel, variant, stage);
return mMaterialChunk.getShader(shader, blobDictionary,
uint8_t(shaderModel), variant, uint8_t(stage));
}
CString ShaderExtractor::spirvToGLSL(const uint32_t* data, size_t wordCount) {
@@ -94,8 +94,8 @@ CString ShaderExtractor::spirvToGLSL(const uint32_t* data, size_t wordCount) {
emitOptions.version = 410;
emitOptions.vulkan_semantics = true;
vector<uint32_t> spirv(data, data + wordCount);
CompilerGLSL glslCompiler(move(spirv));
std::vector<uint32_t> spirv(data, data + wordCount);
CompilerGLSL glslCompiler(std::move(spirv));
glslCompiler.set_common_options(emitOptions);
return CString(glslCompiler.compile().c_str());