-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
area: naga back-endOutputs of naga shader conversionOutputs of naga shader conversionarea: performanceHow fast things goHow fast things gobackend: metalIssues with MetalIssues with Metallang: MetalMetal Shading LanguageMetal Shading LanguagenagaShader TranslatorShader Translatorplatform: macosIssues with integration with macosIssues with integration with macostype: enhancementNew feature or requestNew feature or request
Description
Rather than injecting branches on volatile bools, Naga's backend for Metal Shading Language should avoid undefined behavior simply by imposing an iteration limit on every loop. Unlike the volatile bools, the optimizer will be able to reason about these limits and eliminate them when possible. Optimizations like unrolling are defeated by the volatile bool, but not by the iteration limit.
See a full description of the idea, with godbolt experiments, here: #6528 (comment)
Metadata
Metadata
Assignees
Labels
area: naga back-endOutputs of naga shader conversionOutputs of naga shader conversionarea: performanceHow fast things goHow fast things gobackend: metalIssues with MetalIssues with Metallang: MetalMetal Shading LanguageMetal Shading LanguagenagaShader TranslatorShader Translatorplatform: macosIssues with integration with macosIssues with integration with macostype: enhancementNew feature or requestNew feature or request
Type
Projects
Status
Todo