mirror of
https://github.com/yuzu-emu/sirit.git
synced 2024-11-22 13:15:43 +01:00
Add OpConstantNull
This commit is contained in:
parent
42c456f24f
commit
a582641b99
@ -141,6 +141,9 @@ public:
|
||||
Ref ConstantSampler(Ref result_type, spv::SamplerAddressingMode addressing_mode,
|
||||
bool normalized, spv::SamplerFilterMode filter_mode);
|
||||
|
||||
/// Returns a null constant value.
|
||||
Ref ConstantNull(Ref result_type);
|
||||
|
||||
// Function
|
||||
|
||||
/// Declares a function.
|
||||
|
@ -41,4 +41,8 @@ Ref Module::ConstantSampler(Ref result_type, spv::SamplerAddressingMode addressi
|
||||
return AddDeclaration(op);
|
||||
}
|
||||
|
||||
Ref Module::ConstantNull(Ref result_type) {
|
||||
return AddDeclaration(new Op(spv::Op::OpConstantNull, bound, result_type));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
@ -40,7 +40,6 @@ public:
|
||||
ConstantTrue(TypeBool());
|
||||
ConstantTrue(TypeBool());
|
||||
ConstantFalse(TypeBool());
|
||||
Constant(TypeFloat(64), Literal(6342.2));
|
||||
Constant(TypeFloat(64), Literal(6342.21));
|
||||
Constant(TypeFloat(32), Literal(6342.21f));
|
||||
Constant(TypeFloat(16), Literal(30u));
|
||||
@ -50,6 +49,7 @@ public:
|
||||
ConstantComposite(TypeVector(TypeFloat(32), 2),
|
||||
{Constant(TypeFloat(32), Literal(50.0f)),
|
||||
Constant(TypeFloat(32), Literal(50.0f))});
|
||||
ConstantNull(TypeVector(TypeInt(64, false), 4));
|
||||
|
||||
auto main_type{TypeFunction(TypeVoid())};
|
||||
auto main_func{Emit(Function(TypeVoid(), spv::FunctionControlMask::MaskNone, main_type))};
|
||||
|
Loading…
Reference in New Issue
Block a user