Add unary, function, and uniformity tests for WGSL immediate pointers#4677
Open
shaoboyan091 wants to merge 3 commits into
Open
Add unary, function, and uniformity tests for WGSL immediate pointers#4677shaoboyan091 wants to merge 3 commits into
shaoboyan091 wants to merge 3 commits into
Conversation
This patch extends address-of and indirection validation to `var<immediate>`. The new cases verify that shaders can take the address of immediate variables, read through `ptr<immediate>` values, and reject writes through those pointers. The generated matrix is limited to store types that are valid for `immediate`; invalid store types are covered by the declaration and pointer type suites.
This patch extends function restriction tests for `ptr<immediate, u32>` parameters. The new cases verify that immediate pointer parameters follow the `unrestricted_pointer_parameters` language feature gate, that calls can pass the address of a `var<immediate>` to a matching parameter, and that explicit read and write access modes on immediate pointer parameters are rejected.
This patch adds `var<immediate>` reads as a uniform condition source in the uniformity suite. The coverage verifies that control flow depending on immediate data is treated as uniform in the baseline uniformity cases and in the subgroup variants. The cases are skipped unless immediate data support is exposed by the browser.
|
Results for build job (at 05a63dd): -webgpu:shader,validation,expression,unary,address_of_and_indirection:basic:* - 88 cases, 88 subcases (~1/case)
-webgpu:shader,validation,expression,unary,address_of_and_indirection:composite:* - 76 cases, 608 subcases (~8/case)
+webgpu:shader,validation,expression,unary,address_of_and_indirection:basic:* - 104 cases, 104 subcases (~1/case)
+webgpu:shader,validation,expression,unary,address_of_and_indirection:composite:* - 86 cases, 688 subcases (~8/case)
-webgpu:shader,validation,functions,restrictions:function_parameter_types:* - 60 cases, 60 subcases (~1/case)
-webgpu:shader,validation,functions,restrictions:function_parameter_matching:* - 47 cases, 6063 subcases (~129/case)
+webgpu:shader,validation,functions,restrictions:function_parameter_types:* - 64 cases, 64 subcases (~1/case)
+webgpu:shader,validation,functions,restrictions:function_parameter_matching:* - 48 cases, 6240 subcases (~130/case)
-webgpu:shader,validation,uniformity,uniformity:basics:* - 135 cases, 46170 subcases (~342/case)
-webgpu:shader,validation,uniformity,uniformity:basics,subgroups:* - 135 cases, 133380 subcases (~988/case)
+webgpu:shader,validation,uniformity,uniformity:basics:* - 135 cases, 48600 subcases (~360/case)
+webgpu:shader,validation,uniformity,uniformity:basics,subgroups:* - 135 cases, 140400 subcases (~1040/case)
-TOTAL: 283186 cases, 2326094 subcases
+TOTAL: 283217 cases, 2335821 subcases |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds WGSL
immediateaddress space coverage to three more validation areas, continuing #4658, #4661, and #4675:expression/unary/address_of_and_indirection.spec.ts: includeimmediatein the address-of / dereferencebasicandcompositecases (immediate excludesbooland arrays).functions/restrictions.spec.ts: addptr<immediate, u32>parameter (valid withunrestricted_pointer_parameters), invalid immediate access-mode parameters, and the matching argument case.uniformity/uniformity.spec.ts: add auniform_immediatecondition — reads from an immediate variable are uniform.