shader: Refactor PTP and other minor changes

This commit is contained in:
ReinUsesLisp 2021-03-26 16:46:07 -03:00 committed by ameerj
parent b5db38f50e
commit d9c5bd9509
14 changed files with 67 additions and 123 deletions

View file

@ -44,20 +44,6 @@ 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();