-
Notifications
You must be signed in to change notification settings - Fork 244
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
image attribute has no arguments in storage_class.rs #386
Comments
Oh fun, didn't notice there was a storage class called What you want here is, roughly (doing this off the top of my head): use spirv_std::{storage_class::UniformConstant, textures::Image2d};
pub fn main(
#[spirv(global_invocation_id)] gid: Input<Vec3>,
mut img: UniformConstant<Image2d>
) {
...
} However, we have no support for |
According to the spec, it's just for storing |
Yeah, I saw that, but like... what does "image memory" mean? clearly not storing an image, because that's UniformConstant? aaa |
Thanks. I guess then what I want to draw attention to is this:
In storage_class.rs the image macro is used without any arguments, but in symbols.rs there is code to check for, and error, when the image macro has no arguments.
It seems inconsistent. |
yeah, it's because there's a name collision we didn't notice before, the no-argument one is defined here. we need to rename one of them.
|
FWIW I think it would make sense to rename the |
My goal is to recreate the shader below in rust.
Here is the code I have so far.
Through trial and error I found that the
image
macro requires many arguments.#[spirv(image(dim="Dim2D", depth=1, arrayed=0, multisampled=0, sampled=0, image_format="Rgba8", access_qualifier="WriteOnly"))]
When I compile this shader with my build script, I get an error.
It seems this error occurs because in
storage_class.rs
,image
has no arguments. Is it thatimage
always requires many arguments or does the error instorage_class.rs
occur for some other reason, say, something I've done incorrectly in my code?Any help is appreciated.
The text was updated successfully, but these errors were encountered: