wgpu icon indicating copy to clipboard operation
wgpu copied to clipboard

Implement `unrestricted_pointer_parameters` wgsl extension

Open guusw opened this issue 1 year ago • 1 comments

I tried searching a bit but could find out which is correct/outdated, some previous comments seem to mention that pointers to storage are illegal however I couldn't find anything about it in the spec (if so, please point me to it, thanks)

From the spec https://www.w3.org/TR/WGSL/#example-eab7f633

fn baz2(p : ptr<storage, f32>) {
}

which seems to not be accepted by naga:

Function [1] 'baz2' is invalid:
        Argument 'p' at index 0 is a pointer of space Storage { access: StorageAccess(LOAD) }, which can't be passed into functions.

guusw avatar Jan 29 '24 12:01 guusw

We haven't yet implemented the unrestricted_pointer_parameters WGSL language extension.

teoxoy avatar Jan 29 '24 16:01 teoxoy

Any news about this crucial feature ? When do you plan to release the unrestricted_pointer_parameters WGSL language extension ? Is there a way to bypass the limitation ?

Alphapage avatar Jul 13 '24 17:07 Alphapage