Updated python and cpp with working gslslangvalidator
This commit is contained in:
parent
71b08d9f58
commit
b7fd1b4d79
10 changed files with 32 additions and 20 deletions
|
|
@ -9,7 +9,8 @@ std::vector<uint32_t>
|
|||
Shader::compileSource(
|
||||
const std::string& source)
|
||||
{
|
||||
system(std::string("glslc -fshader-stage=compute -o tmp_kp_shader.comp.spv - << END\n" + source + "\nEND").c_str());
|
||||
if (system(std::string("glslangValidator --stdin -S comp -V -o tmp_kp_shader.comp.spv << END\n" + source + "\nEND").c_str()))
|
||||
throw std::runtime_error("Error running glslangValidator command");
|
||||
std::ifstream fileStream("tmp_kp_shader.comp.spv", std::ios::binary);
|
||||
std::vector<char> buffer;
|
||||
buffer.insert(buffer.begin(), std::istreambuf_iterator<char>(fileStream), {});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue