On Thu May 18 20:19:08 2023 +0000, Zebediah Figura wrote:
> > I might have misread, but doesn't the return value apply to the full
> vector and not its components? I thought returning false made it so the
> whole abs op was left alone if any component was INT_MIN, like an
> all-or-nothing deal.
> That is the case, yes. That said, I believe we want to make that change anyway.
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.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/203#note_33140
> I might have misread, but doesn't the return value apply to the full vector and not its components? I thought returning false made it so the whole abs op was left alone if any component was INT_MIN, like an all-or-nothing deal.
That is the case, yes. That said, I believe we want to make that change anyway.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/203#note_33139
On Thu May 18 19:54:01 2023 +0000, Francisco Casas wrote:
> This won't get the absolute value of components that come after the
> component that is INT_MIN.
> Consider an int vector such as `(-1, INT_MIN, -1, -1)`; This would end
> up as `(1, INT_MIN, -1, -1)`.
> I think it would be better to guard the assignment:
> ```c
> case HLSL_TYPE_INT:
> /* abs(INT_MIN) is undefined, leave this expression
> alone */
> if (src->value.u[k].i != INT_MIN)
> dst->value.u[k].i = abs(src->value.u[k].i);
> break;
> ```
I might have misread, but doesn't the return value apply to the full vector and not its components? I thought returning false made it so the whole abs op was left alone if any component was INT_MIN, like an all-or-nothing deal.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/203#note_33136
Francisco Casas (@fcasas) commented about libs/vkd3d-shader/hlsl_constant_ops.c:
> + {
> + switch (type)
> + {
> + case HLSL_TYPE_FLOAT:
> + case HLSL_TYPE_HALF:
> + dst->value.u[k].f = fabsf(src->value.u[k].f);
> + break;
> +
> + case HLSL_TYPE_DOUBLE:
> + dst->value.u[k].d = fabs(src->value.u[k].d);
> + break;
> +
> + case HLSL_TYPE_INT:
> + /* abs(INT_MIN) is undefined, leave this expression alone */
> + if (src->value.u[k].i == INT_MIN)
> + return false;
This won't get the absolute value of components that come after the component that is INT_MIN.
Consider an int vector such as `(-1, INT_MIN, -1, -1)`; This would end up as `(1, INT_MIN, -1, -1)`.
I think it would be better to guard the assignment:
```c
case HLSL_TYPE_INT:
/* abs(INT_MIN) is undefined, leave this expression alone */
if (src->value.u[k].i != INT_MIN)
dst->value.u[k].i = abs(src->value.u[k].i);
break;
```
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/203#note_33133
Adds the tray icons implementation based on org.kde.StatusNotifierItem interface usage. Does allow restarting StatusNotifierWatcher object, but will fallback to XEMBED or internal tray, if wine gets initialized when there is no StatusNotifierWatcher object registered.
--
v10: test host_os echoing
https://gitlab.winehq.org/wine/wine/-/merge_requests/2808
Adds the tray icons implementation based on org.kde.StatusNotifierItem interface usage. Does allow restarting StatusNotifierWatcher object, but will fallback to XEMBED or internal tray, if wine gets initialized when there is no StatusNotifierWatcher object registered.
--
v9: configure: fix winesni.drv not getting disabled
https://gitlab.winehq.org/wine/wine/-/merge_requests/2808