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

Deduplicate BindGroupLayout by value #753

Merged
merged 2 commits into from
Jun 27, 2020
Merged

Deduplicate BindGroupLayout by value #753

merged 2 commits into from
Jun 27, 2020

Conversation

kvark
Copy link
Member

@kvark kvark commented Jun 27, 2020

Connections
Fixes #335

Description
BGL now has distinct MultiRefCount type with a bit of a hacky logic to support deduplication.
Good review is needed!

Testing
Ran wgpu-rs examples.
The actual new logic is NOT tested enough!

@kvark kvark requested a review from cwfitzgerald June 27, 2020 15:15
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.

The .monocodus config not found in your repo. Default config is used.
Check config documentation here

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Looks good! Audited the refcounting, and assuming the memory ordering is correct, ship it!

wgpu-core/src/device/mod.rs Show resolved Hide resolved
wgpu-core/src/lib.rs Outdated Show resolved Hide resolved
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.

The .monocodus config not found in your repo. Default config is used.
Check config documentation here

@kvark kvark requested a review from cwfitzgerald June 27, 2020 16:37
wgpu-core/src/lib.rs Show resolved Hide resolved
@cwfitzgerald
Copy link
Member

Awesome!
bors r+

bors bot added a commit that referenced this pull request Jun 27, 2020
753: Deduplicate BindGroupLayout by value r=cwfitzgerald a=kvark

**Connections**
Fixes #335 

**Description**
BGL now has distinct `MultiRefCount` type with a bit of a hacky logic to support deduplication.
Good review is needed!

**Testing**
Ran wgpu-rs examples.
The actual new logic is NOT tested enough!

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
@bors
Copy link
Contributor

bors bot commented Jun 27, 2020

Canceled.

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.

The .monocodus config not found in your repo. Default config is used.
Check config documentation here

@kvark
Copy link
Member Author

kvark commented Jun 27, 2020

Just made both refcount bumps to be consistent here.
bors r=cwfitzgerald

@bors
Copy link
Contributor

bors bot commented Jun 27, 2020

@bors bors bot merged commit 2547c43 into gfx-rs:master Jun 27, 2020
@kvark kvark deleted the layout-ref branch June 27, 2020 18:12
kvark pushed a commit to kvark/wgpu that referenced this pull request Jun 3, 2021
753: Use max function to ensure that the swapchain size is not less than 1. r=kvark a=Tnze

ATT

Co-authored-by: Tnze <cjd001113@outlook.com>
Patryk27 pushed a commit to Patryk27/wgpu that referenced this pull request Nov 23, 2022
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.

Validate bind group layouts by value instead of "by ID"
2 participants