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

Buffer zero init test for binding (and use in a compute shader) #1191

Merged
merged 3 commits into from
Feb 6, 2021

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Feb 3, 2021

Connections
Buffer zero init #1159
Buffer zero crash on unused buffer fix #1190

Description
Tried to create a player ron file repro case for #1190 but didn't work out quite well (test keeps buffers alive even when I tried to go through an indirection via buffer copies). But with a bit of cleanup the test still felt very useful since it gives more coverage to buffer zero init.

Generally zero init is hard to test since the way to get the result is to map it which is one particular case of requiring zero init. But there's a few ways like in this test here where we look at what modifications a compute shader did to a buffer - since the buffer was not explicitly initialized, the outcome would be different if the compute shader would have seen a buffer without zero init.

Given how few tests there are right now this ofc implicitly tests a bunch of other things ;)

Copy link
Contributor

@monocodus monocodus bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an autogenerated code review.

Checker summary (by rust_clippy):
The tool has found 94 warnings, 0 errors.

@kvark
Copy link
Member

kvark commented Feb 4, 2021

Also filed #1195 to make our RON captures nicer.

player/tests/data/all.ron Outdated Show resolved Hide resolved
@Wumpf Wumpf requested a review from kvark February 6, 2021 11:17
Copy link
Contributor

@monocodus monocodus bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an autogenerated code review.

Checker summary (by rust_clippy):
The tool has found 94 warnings, 0 errors.

Copy link
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!
bors r+

@bors
Copy link
Contributor

bors bot commented Feb 6, 2021

@bors bors bot merged commit 9841b9b into gfx-rs:master Feb 6, 2021
@Wumpf Wumpf deleted the buffer-zero-init-test-for-binding branch February 6, 2021 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants