mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2026-01-03 21:25:25 +01:00
Add some types
This commit is contained in:
parent
c2215fca0e
commit
131dbd053c
3 changed files with 183 additions and 1 deletions
|
|
@ -17,6 +17,25 @@ public:
|
|||
AddCapability(spv::Capability::Shader);
|
||||
SetMemoryModel(spv::AddressingModel::Logical, spv::MemoryModel::GLSL450);
|
||||
|
||||
// Type testing
|
||||
TypeBool();
|
||||
TypeBool();
|
||||
TypeInt(64, true);
|
||||
TypeInt(64, false);
|
||||
TypeInt(16, false);
|
||||
TypeFloat(16);
|
||||
TypeFloat(32);
|
||||
TypeFloat(64);
|
||||
TypeVector(TypeBool(), 4);
|
||||
TypeVector(TypeBool(), 3);
|
||||
TypeVector(TypeVector(TypeFloat(32), 4), 3);
|
||||
TypeVector(TypeVector(TypeFloat(32), 4), 3);
|
||||
TypeMatrix(TypeVector(TypeFloat(32), 4), 4);
|
||||
TypeImage(TypeFloat(32), spv::Dim::Dim2D, 0, false, false, 0,
|
||||
spv::ImageFormat::Rg32f, spv::AccessQualifier::ReadOnly);
|
||||
TypeSampledImage(TypeImage(TypeFloat(32), spv::Dim::Rect, 0, false, false, 0,
|
||||
spv::ImageFormat::Rg32f, spv::AccessQualifier::ReadOnly));
|
||||
|
||||
auto main_type{TypeFunction(TypeVoid())};
|
||||
auto main_func{Emit(Function(TypeVoid(), spv::FunctionControlMask::MaskNone, main_type))};
|
||||
Emit(Label());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue