-
Notifications
You must be signed in to change notification settings - Fork 1.3k
WGSL: Support the requires directive #6350
Copy link
Copy link
Closed
Labels
area: naga front-endTranslation to Naga IRTranslation to Naga IRlang: WGSLWebGPU Shading LanguageWebGPU Shading LanguagenagaShader TranslatorShader Translator
Description
Standard WGSL supports something called the requires global directive, which allows shaders to declare that certain extensions either need to be supported by the WebGPU host, or shader compilation should fail. It's used like this:
requires readonly_and_readwrite_storage_textures; // single extension
requires packed_4x8_integer_dot_product, unrestricted_pointer_parameters; // multiple extensions, comma-separatedWGSL standard link: https://www.w3.org/TR/WGSL/#requires-directive
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: naga front-endTranslation to Naga IRTranslation to Naga IRlang: WGSLWebGPU Shading LanguageWebGPU Shading LanguagenagaShader TranslatorShader Translator
Type
Projects
Status
Done