Fill out vector types in WSL's standard library
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Sep 2017 23:42:18 +0000 (23:42 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Sep 2017 23:42:18 +0000 (23:42 +0000)
commitc5071b36d1c5bda687e8f42d52979cb5b1b01767
tree60fc2f9973cb7ff28d5e10a6a7a23325b93030b9
parent56043b12e6741ae0dec70e9501b09a638c174a50
Fill out vector types in WSL's standard library
https://bugs.webkit.org/show_bug.cgi?id=177063

Reviewed by Filip Pizlo.

Now that we have struct types, operator&[], and operator==, fill out a few of the builtin vector types in the
standard library. This patch creates three new types: vec2, vec3, and vec4, each of which takes a type
argument, so you can say vec4<float>. This patch also adds typedefs of int4, uint4, float4, and double4 (along
with their 2- and 3- length siblings).

This patch does not include the swizzling operators, so you can't say float4.yzw.

* WebGPUShadingLanguageRI/StandardLibrary.js:
(operator.T.vec2.T):
(bool.operator.T.Equatable):
(thread.T.operator.T):
(operator.T.vec3.T):
(operator.T.vec4.T):
* WebGPUShadingLanguageRI/Test.js:
(TEST_builtinVectors):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/WebGPUShadingLanguageRI/StandardLibrary.js
Tools/WebGPUShadingLanguageRI/Test.js