refactor(shader): centralize opcode metadata and lookup paths

This commit is contained in:
nmzik committed 2026-08-05 02:59:28 +02:00
1 parent e6b4707a5d
commit 0a2f4814ac
16 files changed
+689 -964

No files matched your search

@@ -434,22 +434,13 @@ void SetError(std::string* error, const char* message) {
}
}
Opcode LookupIrOpcode(Decoder::Opcode opcode) {
std::optional<Opcode> LookupIrOpcode(Decoder::Opcode opcode) {
for (const auto& op: LOWER_OPS) {
if (op.decoded == opcode) {
return op.ir;
}
}
return Opcode::MoveU32;
}
bool IsImplemented(Decoder::Opcode opcode) {
for (const auto& op: LOWER_OPS) {
if (op.decoded == opcode) {
return true;
}
}
return false;
return std::nullopt;
}
bool IsReversedBinary(Decoder::Opcode opcode) {