5 Oct
2023
5 Oct
'23
3:53 p.m.
Matteo Bruni (@Mystral) commented about dlls/d3d10/effect.c:
+ { + unsigned int v = arg1[instr->scalar ? 0 : i] >> (arg2[i] % 32); + retval[i] = *(float *)&v; + } +} + +static void pres_ushr(float **args, unsigned int n, const struct preshader_instr *instr) +{ + unsigned int *arg1 = (unsigned int *)args[0]; + unsigned int *arg2 = (unsigned int *)args[1]; + float *retval = args[2]; + unsigned int i; + + for (i = 0; i < instr->comp_count; ++i) + { + unsigned int v = arg1[instr->scalar ? 0 : i] >> (arg2[i] % 32); I guess this always does the right thing but wouldn't it be better to use a plain (signed) int here for 'v'?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/4017#note_47726