Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPIR-V back-end uses extra pass to write output #4303

Open
Napokue opened this issue Jun 16, 2020 · 1 comment
Open

SPIR-V back-end uses extra pass to write output #4303

Napokue opened this issue Jun 16, 2020 · 1 comment
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

Comments

@Napokue
Copy link
Collaborator

Napokue commented Jun 16, 2020

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.

@Napokue Napokue added the area: naga back-end Outputs of naga shader conversion label Jun 16, 2020
@kvark
Copy link
Member

kvark commented Dec 9, 2020

The capabilities concern is now totally resolved by gfx-rs/naga#315. The road to single-pass is now open.

@cwfitzgerald cwfitzgerald added kind: refactor Making existing function faster or nicer lang: SPIR-V Vulkan's Shading Language labels Oct 25, 2023
@cwfitzgerald cwfitzgerald transferred this issue from gfx-rs/naga Oct 25, 2023
@cwfitzgerald cwfitzgerald added the naga Shader Translator label Oct 25, 2023
@teoxoy teoxoy added type: enhancement New feature or request area: performance How fast things go labels Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

4 participants