SPIR-V back-end uses extra pass to write output #4303
Labels
area: naga back-end
Outputs of naga shader conversion
area: performance
How fast things go
kind: refactor
Making existing function faster or nicer
lang: SPIR-V
Vulkan's Shading Language
naga
Shader Translator
type: enhancement
New feature or request
At the moment, the current SPIR-V back-end uses an exta pass, which results in increased and (probably) unnecessary memory.
After everything is parsed, it then rearranges all the data in the correct order for the Physical- and Logical Layout.
A better and proposed way of @kvark is just single passing it. This means stripping the phase of rearranging, and holding data in temporarily vectors, to just directly write it to the output string.
There will be some lightweight "scans" through the IR to look for example the Capabilities the SPIR-V output requires, but this shouldn't be a whole lot of iterations.
The text was updated successfully, but these errors were encountered: