WebKit Bugzilla
Attachment 348543 Details for
Bug 189099
: [WHLSL] Implement tests to verify array indexing order matches our desires
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP
bug-189099-20180830140709.patch (text/plain), 3.24 KB, created by
Thomas Denney
on 2018-08-30 14:07:10 PDT
(
hide
)
Description:
WIP
Filename:
MIME Type:
Creator:
Thomas Denney
Created:
2018-08-30 14:07:10 PDT
Size:
3.24 KB
patch
obsolete
>Subversion Revision: 235517 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 7cec6187fe5500d5bf80f52d8061660ba32b4e7d..4538f25da869fc5aa4688e29341aaf604ae6d4bc 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,14 @@ >+2018-08-30 Thomas Denney <tdenney@apple.com> >+ >+ [WHLSL] Implement tests to verify matrix and array indexing order matches our desires >+ https://bugs.webkit.org/show_bug.cgi?id=189099 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebGPUShadingLanguageRI/Test.js: >+ * WebGPUShadingLanguageRI/TypeRef.js: >+ (TypeRef.wrap): >+ > 2018-08-30 Sihui Liu <sihui_liu@apple.com> > > WKNavigation.ProcessCrashDuringCallback is failing on iOS >diff --git a/Tools/WebGPUShadingLanguageRI/Test.js b/Tools/WebGPUShadingLanguageRI/Test.js >index 2b5f872d8970c9e9e039a8b1827e377380789ffb..2610a6a3865565ffa629ed3e5934d01e2e44d77a 100644 >--- a/Tools/WebGPUShadingLanguageRI/Test.js >+++ b/Tools/WebGPUShadingLanguageRI/Test.js >@@ -5551,6 +5551,40 @@ tests.matrixMultiplication = function() { > checkFloat(program, callFunction(program, "foo13", []), 29 * 7 + 43 * 11 + 61 * 13); > } > >+tests.arrayIndex = function() { >+ let program = doPrep(` >+ uint innerArrayLength() { >+ int[2][3] array; >+ return array[0].length; >+ } >+ >+ uint outerArrayLength() { >+ int[2][3] array; >+ return array.length; >+ } >+ >+ int arrayIndexing(int i, int j) { >+ int[2][3] array; >+ array[0][0] = 1; >+ array[0][1] = 2; >+ array[0][2] = 3; >+ array[1][0] = 4; >+ array[1][1] = 5; >+ array[1][2] = 6; >+ return array[i][j]; >+ } >+ `); >+ >+ checkUint(program, callFunction(program, "innerArrayLength", []), 3); >+ checkUint(program, callFunction(program, "outerArrayLength", []), 2); >+ checkInt(program, callFunction(program, "arrayIndexing", [ makeInt(program, 0), makeInt(program, 0) ]), 1); >+ checkInt(program, callFunction(program, "arrayIndexing", [ makeInt(program, 0), makeInt(program, 1) ]), 2); >+ checkInt(program, callFunction(program, "arrayIndexing", [ makeInt(program, 0), makeInt(program, 2) ]), 3); >+ checkInt(program, callFunction(program, "arrayIndexing", [ makeInt(program, 1), makeInt(program, 0) ]), 4); >+ checkInt(program, callFunction(program, "arrayIndexing", [ makeInt(program, 1), makeInt(program, 1) ]), 5); >+ checkInt(program, callFunction(program, "arrayIndexing", [ makeInt(program, 1), makeInt(program, 2) ]), 6); >+} >+ > okToTest = true; > > let testFilter = /.*/; // run everything by default >diff --git a/Tools/WebGPUShadingLanguageRI/TypeRef.js b/Tools/WebGPUShadingLanguageRI/TypeRef.js >index acda706c0ce3797e46b09517dcb081ea59e3df89..41bb0602ff095747c172acd98671e00514ec9008 100644 >--- a/Tools/WebGPUShadingLanguageRI/TypeRef.js >+++ b/Tools/WebGPUShadingLanguageRI/TypeRef.js >@@ -42,7 +42,7 @@ class TypeRef extends Type { > if (type instanceof NativeType) > result = new TypeRef(type.origin, type.name, type.typeArguments); > else >- result = new TypeRef(type.orgin, type.name); >+ result = new TypeRef(type.origin, type.name); > result.type = type; > return result; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189099
:
348543
|
348549
|
348550
|
348555