Skip to content

pipeline-overridable constants #102

@9SMTM6

Description

@9SMTM6

Support for these has been added to wgpu. Release 0.20.0 supports them on metal, vulkan and dx12 (i think), release 22.0.0 supports them, at least in some fashion, on the web.

At least in my current application I get errors if I try to use pipeline-overrideable constants. In all fairness, I use naga_oil indirectly, through wgsl_bindgen. But as far as I can tell, I get the error through here and originally coming from here.

That error is coming from naga, as you can see. The reason I make this issue here, is that I'm not entirely sure whether solving that issue upstream will solve it. If we look at e.g. what they did in the spir-v backend, then it appears to me, that they replaced the override with its actual value. Note that this code seems to have changed a lot in the meantime, probably due to the refactor in the 22.0 release.

But as I understand it, as a preprocessor, naga_oil would not actually want to replace these values yet.

Ideally I would want pipeline-overridable constants to work, but honestly, this seems a bit beyond me at this point, at the very least I don't know what would be required to achieve that.

If you tell me that it would help you if I make a PR to naga that does similar things as it does in the spir-v code then I think I'm perfectly able to do that. But AFAICT this would not solve this issue for naga oil.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions