Bug 190029

Summary: [WHLSL] Add casts between vector types
Product: WebKit Reporter: Thomas Denney <tdenney>
Component: WebGPUAssignee: Nobody <webkit-unassigned>
Status: RESOLVED MOVED    
Severity: Normal CC: dino, mmaxfield
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 176199    

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.