Bug 177063 - Fill out vector types in WSL's standard library
Summary: Fill out vector types in WSL's standard library
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks: 176199
  Show dependency treegraph
 
Reported: 2017-09-17 18:33 PDT by Myles C. Maxfield
Modified: 2018-10-13 16:31 PDT (History)
4 users (show)

See Also:


Attachments
Patch (19.20 KB, patch)
2017-09-17 19:06 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (19.29 KB, patch)
2017-09-17 19:08 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (10.95 KB, patch)
2017-09-17 21:54 PDT, Myles C. Maxfield
fpizlo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2017-09-17 18:33:32 PDT
Fill out vector types in WSL's standard library
Comment 1 Myles C. Maxfield 2017-09-17 19:06:29 PDT
Created attachment 321063 [details]
Patch
Comment 2 Myles C. Maxfield 2017-09-17 19:08:04 PDT
Created attachment 321065 [details]
Patch
Comment 3 Filip Pizlo 2017-09-17 19:58:46 PDT
Comment on attachment 321065 [details]
Patch

Let’s use generics. You can save a lot of typing by saying that int4/float4/etc are just vec4<isn’t>/etc.
Comment 4 Myles C. Maxfield 2017-09-17 21:54:52 PDT
Created attachment 321075 [details]
Patch
Comment 5 Filip Pizlo 2017-09-17 22:01:50 PDT
Comment on attachment 321075 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=321075&action=review

R=me if you add trap, assuming you thread it through everything the obvious way.

> Tools/WebGPUShadingLanguageRI/StandardLibrary.js:141
> +    return null;

How about you add a trap operation, that throws WTrapError the way that we currently do for OOB. 

We should talk about what “trap” means. I think it means that the shader returns prematurely, possibly leaving some output state unpopulated.
Comment 6 Myles C. Maxfield 2017-09-18 16:29:13 PDT
(In reply to Filip Pizlo from comment #5)
> Comment on attachment 321075 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=321075&action=review
> 
> R=me if you add trap, assuming you thread it through everything the obvious
> way.
> 
> > Tools/WebGPUShadingLanguageRI/StandardLibrary.js:141
> > +    return null;
> 
> How about you add a trap operation, that throws WTrapError the way that we
> currently do for OOB. 
> 
> We should talk about what “trap” means. I think it means that the shader
> returns prematurely, possibly leaving some output state unpopulated.

I'll do the trap stuff in a subsequent patch. https://bugs.webkit.org/show_bug.cgi?id=177110
Comment 7 Myles C. Maxfield 2017-09-18 16:43:04 PDT
Committed r222191: <http://trac.webkit.org/changeset/222191>
Comment 8 Radar WebKit Bug Importer 2017-09-27 12:28:52 PDT
<rdar://problem/34693352>
Comment 9 Myles C. Maxfield 2018-10-13 16:31:31 PDT
Migrated to https://github.com/gpuweb/WHLSL/issues/125