It's not obvious that this is correct.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15999>
use_vop2 = false;
}
if (use_vop2) {
+ static_assert(sizeof(VOP2_instruction) <= sizeof(VOP3_instruction),
+ "Invalid direct instruction cast.");
+ static_assert(sizeof(VOP2_instruction) <= sizeof(VOP3P_instruction),
+ "Invalid direct instruction cast.");
instr->format = Format::VOP2;
switch (instr->opcode) {
case aco_opcode::v_mad_f32: instr->opcode = aco_opcode::v_mac_f32; break;