Add type tests for WGSL immediate pointers#4675
Open
shaoboyan091 wants to merge 1 commit into
Open
Conversation
This patch extends type validation for the `immediate` address space. The pointer tests cover `ptr<immediate>` parsing, missing store types, invalid access modes, read-only pointer use, and immediate store types that must be rejected, including arrays and atomics. The type suites also recognize `immediate` as an address-space enumerant and check that `ref<immediate, T>` is not a nameable type.
|
Results for build job (at b01536d): -webgpu:shader,validation,types,enumerant:decl_value:* - 26 cases, 104 subcases (~4/case)
+webgpu:shader,validation,types,enumerant:decl_value:* - 27 cases, 108 subcases (~4/case)
-webgpu:shader,validation,types,pointer:missing_type:* - 10 cases, 10 subcases (~1/case)
-webgpu:shader,validation,types,pointer:address_space:* - 14 cases, 14 subcases (~1/case)
-webgpu:shader,validation,types,pointer:access_mode:* - 30 cases, 30 subcases (~1/case)
+webgpu:shader,validation,types,pointer:missing_type:* - 12 cases, 12 subcases (~1/case)
+webgpu:shader,validation,types,pointer:address_space:* - 16 cases, 16 subcases (~1/case)
+webgpu:shader,validation,types,pointer:access_mode:* - 36 cases, 36 subcases (~1/case)
-webgpu:shader,validation,types,pointer:ptr_not_instantiable:* - 10 cases, 10 subcases (~1/case)
+webgpu:shader,validation,types,pointer:ptr_not_instantiable:* - 15 cases, 15 subcases (~1/case)
+webgpu:shader,validation,types,ref:not_typeable_ref_immediate:* - 7 cases, 7 subcases (~1/case)
-TOTAL: 283163 cases, 2326068 subcases
+TOTAL: 283186 cases, 2326094 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.
Extends the WGSL
immediateaddress space validation coverage to the pointer, ref, and enumerant type tests:types/pointer.spec.ts: addimmediatetomissing_type,address_space, andaccess_mode; addptr<immediate, …>store-type cases toptr_not_instantiable(bool, atomic, fixed/runtime array, struct-with-array).types/ref.spec.ts:ref<immediate, T>cannot be written as an explicit type.types/enumerant.spec.ts: add theimmediateenumerant.