-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Naga specific WGSL extensions #4410
Copy link
Copy link
Open
Labels
area: naga back-endOutputs of naga shader conversionOutputs of naga shader conversionarea: naga front-endTranslation to Naga IRTranslation to Naga IRfeature: 64-bit typesIssues with the 64-bit data types native feature (`i64`, `u64`, and `f64`)Issues with the 64-bit data types native feature (`i64`, `u64`, and `f64`)lang: WGSLWebGPU Shading LanguageWebGPU Shading LanguagenagaShader TranslatorShader Translator
Milestone
Metadata
Metadata
Assignees
Labels
area: naga back-endOutputs of naga shader conversionOutputs of naga shader conversionarea: naga front-endTranslation to Naga IRTranslation to Naga IRfeature: 64-bit typesIssues with the 64-bit data types native feature (`i64`, `u64`, and `f64`)Issues with the 64-bit data types native feature (`i64`, `u64`, and `f64`)lang: WGSLWebGPU Shading LanguageWebGPU Shading LanguagenagaShader TranslatorShader Translator
Type
Projects
Status
No status
naga_ext_f6464-bit data types should have an enable extension #8975f64typenaga_ext_early_depth_test@early_depth_testattributenaga_ext_multiview(ornaga_ext_view_index?)@builtin(view_index)builtinnaga_ext_primitive_index@builtin(primitive_index)builtinnaga_ext_binding_array(this will end up having 8Capabilitiessee Updatebinding_arrayrelatedCapabilities#4407)binding_arraytypeAll of these have their own Capabilities therefore the validator is already aware of those non-standard items but I think we should still have our own set of extensions so that it's obvious when a shader uses those items.
Introducing a
strict_extensions: boolfield for theParserwill limit the extensions to only those defined by the spec (for now onlyf16).Relevant errors should be different based on the
strict_extensionsfield. Example: using anf64type withstrict_extensions: trueshould yield an error that informs the user that there is no such type; on the other hand, ifstrict_extensionswerefalse, the error should inform the user that thenaga_ext_f64extension is required.