mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2025-12-31 19:54:53 +01:00
Add support for GLSLstd450 and OpFAbs
This commit is contained in:
parent
44043bca56
commit
6742afd6dd
4 changed files with 51 additions and 8 deletions
|
|
@ -43,7 +43,9 @@ std::vector<u8> Module::Assemble() const {
|
|||
for (const auto capability : capabilities) {
|
||||
WriteEnum(stream, spv::Op::OpCapability, capability);
|
||||
}
|
||||
// TODO write extensions
|
||||
if (glsl_std_450) {
|
||||
glsl_std_450->Write(stream);
|
||||
}
|
||||
// TODO write ext inst imports
|
||||
|
||||
Op memory_model_ref{spv::Op::OpMemoryModel};
|
||||
|
|
@ -123,4 +125,11 @@ Id Module::AddAnnotation(std::unique_ptr<Op> op) {
|
|||
return id;
|
||||
}
|
||||
|
||||
Id Module::GetGLSLstd450() {
|
||||
if (!glsl_std_450) {
|
||||
glsl_std_450 = std::make_unique<Op>(spv::Op::OpExtInstImport, bound++);
|
||||
}
|
||||
return glsl_std_450.get();
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue