shader: Implement TLD4.PTP

This commit is contained in:
FernandoS27 2021-03-26 16:02:04 +01:00 committed by ameerj
parent 981eb6f43b
commit 742d11c2ad
15 changed files with 111 additions and 28 deletions

View file

@ -44,6 +44,20 @@ bool Value::IsEmpty() const noexcept {
return type == Type::Void;
}
bool Value::IsConstantContainer() const {
if (IsImmediate()) {
return true;
}
ValidateAccess(Type::Opaque);
auto num_args = inst->NumArgs();
for (size_t i = 0; i < num_args; i++) {
if (!inst->Arg(i).IsConstantContainer()) {
return false;
}
}
return true;
}
bool Value::IsImmediate() const noexcept {
if (IsIdentity()) {
return inst->Arg(0).IsImmediate();