-
Notifications
You must be signed in to change notification settings - Fork 53
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
Example panics at runtime (COPY_DST
flag)
#60
Comments
Weird! I see that you are setting the copy destination flag correctly. Following the execution from Lines 260 to 302 in 9fe3db3
Any idea what the issue is? |
Update: removing the shapes.set(vec![
Shape {
x: 0,
y: 0,
w: 100,
h: 100,
r: [2, 9]
};
1024
])?; eliminates the error, and things always complete successfully. Are usage flags being corrupted by |
Ok, here's the problem: 80a28e7#diff-c42b8503ace5f383ffbc7c9f91463d31dc54fc36b2d3974c49a3e2fc434024e9R331-R337 when setting, the existing staging buffer is discarded and replaced with a new staging buffer, which is created with the usage flag Adding to the end of the function the construction of a new staging buffer with I would like to not do it this way, it seems quite wasteful to prepare a new allocation and immediately discard it etc. Mixing |
@wbrickner Thanks for doing this investigation in this issue. I see how the staging buffer creation is problematic... If anyone has a PR that fixes this, I can review/edit/merge. |
Hello, running the compute example:
View full code
yields
my understanding is that buffers must have their usage declared correctly (with some amount of detail) at construction time through
wgpu
.The text was updated successfully, but these errors were encountered: