Add ShaderReflector

- Used to look at the shader files and find set/binding automatically
This commit is contained in:
Thraix
2023-03-14 22:56:11 +01:00
parent 6e463b3560
commit 4fe719858d
20 changed files with 382 additions and 151 deletions
+2 -3
View File
@@ -80,9 +80,8 @@ namespace Copium
if (FileSystem::DateModified(filename) < FileSystem::DateModified(spvFilename))
{
CP_DEBUG("InitializeShaderModuleFromGlslFile : Loading cached shader file: %s", filename.c_str());
std::vector<char> data = FileSystem::ReadFile(spvFilename);
CP_ASSERT(data.size() % 4 == 0, "Spv data size is not a factor of 4");
return InitializeShaderModule((const uint32_t*)data.data(), data.size());
std::vector<uint32_t> data = FileSystem::ReadFile32(spvFilename);
return InitializeShaderModule(data.data(), data.size() * sizeof(uint32_t));
}
}
}