9 Nov
2023
9 Nov
'23
12:46 p.m.
Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/spirv.c:
const struct vkd3d_shader_src_param *src = instruction->src; uint32_t src0_id, src1_id, type_id, result_id; unsigned int component_count; + SpvOp unordered_flag = 0; SpvOp op;
+ /* All unordered SpvOp variants equal (ordered_opcode | 1). */
This seems correct, but it's overall quite confusing. I'd rather use something like `toggle_ordered ? SpvOpFOrdEqual : SpvOpFUnordEqual`, which is hardly more code, but it's easier to understand. Thinking again, I'd even introduce opcodes with explicit orderedness rather than a flag. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/441#note_51686