Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl_constant_ops.c:
}
+static bool fold_not(struct hlsl_ctx *ctx, struct hlsl_constant_value *dst,
const struct hlsl_type *dst_type, const struct hlsl_ir_constant *src)
+{
- enum hlsl_base_type type = dst_type->base_type;
- unsigned int k;
- assert(type == src->node.data_type->base_type);
- for (k = 0; k < dst_type->dimx; ++k)
- {
switch (type)
{
case HLSL_TYPE_BOOL:
dst->u[k].u = !src->value.u[k].u;
We follow the native compiler's convention of keeping `true` as `~0u`, not `1`.