RESOLVED MOVED 190029
[WHLSL] Add casts between vector types
https://bugs.webkit.org/show_bug.cgi?id=190029
Summary [WHLSL] Add casts between vector types
Thomas Denney
Reported 2018-09-26 22:30:39 PDT
There are no cast operators that allow you to cast a vector (or matrix, for that matter) element-wise. For example: operator int4(uint4 v) { return int4(int(v.x), int(v.y), int(v.z), int(v.w)); } Metal supports these; I think they would be a useful utility to add to the standard library.
Attachments
Myles C. Maxfield
Comment 1 2018-09-28 16:58:42 PDT
HLSL doesn't have these; I'm not sure we should either.
Myles C. Maxfield
Comment 2 2018-10-13 14:22:57 PDT
Myles C. Maxfield
Comment 3 2018-10-13 14:50:36 PDT
Note You need to log in before you can comment on or make changes to this bug.