On Thu May 18 20:22:26 2023 +0000, Francisco Casas wrote:
Indeed, I didn't have the big picture in mind. returning false keeps the original instruction. However, I also think that we should go for the change in case we ever call hlsl_fold_constant_exprs() from somewhere else. This change seems like it would break the result - do we want it to be more like
``` bool success = true; ... case HLSL_TYPE_INT: /* Always evaluate this expression... */ dst->value.u[k].i = abs(src->value.u[k].i); /* ... but if we try abs(INT_MIN), mark this fold as invalid */ if (src->value.u[k].i == INT_MIN) { success = false; } break; ... return success; ``` -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/203#note_33141