-
Notifications
You must be signed in to change notification settings - Fork 939
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
Full MSAA handling #235
Full MSAA handling #235
Conversation
@msiglreith it does sound like ATTACHMENT_UNUSED (or some sort of an |
let color_attachments = | ||
unsafe { slice::from_raw_parts(desc.color_attachments, desc.color_attachments_length) }; | ||
let depth_stencil_attachment = unsafe { desc.depth_stencil_attachment.as_ref() }; | ||
|
||
let sample_count = color_attachments.get(0).map(|at| view_guard[at.attachment].samples).unwrap_or(1); | ||
assert!(sample_count & samples_count_limit != 0, "Attachment sample_count must be supported by physical device limits"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we using &
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh wow, this is confusing. Filed gfx-rs/gfx#2859
There was a problem hiding this 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+
let color_attachments = | ||
unsafe { slice::from_raw_parts(desc.color_attachments, desc.color_attachments_length) }; | ||
let depth_stencil_attachment = unsafe { desc.depth_stencil_attachment.as_ref() }; | ||
|
||
let sample_count = color_attachments.get(0).map(|at| view_guard[at.attachment].samples).unwrap_or(1); | ||
assert!(sample_count & samples_count_limit != 0, "Attachment sample_count must be supported by physical device limits"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh wow, this is confusing. Filed gfx-rs/gfx#2859
235: Full MSAA handling r=kvark a=rukai These changes fix the msaa-line wgpu example, along with a PR to wgpu-native gfx-rs/wgpu-rs#28 Concerns: * webgpu does not expose a way for users to query limits, how are they supposed to choose a suitable sample_count? * I think `attachment_unused` should be moved into gfx-hal. Where abouts? * Is a sample mask of `:u64 = !0` suitable? Co-authored-by: Rukai <rubickent@gmail.com>
Build succeeded |
yes, a constant might be the easiest way to get started? |
28: msaa-line example fixes r=kvark a=rukai This PR fixes the msaa-line example in addition to the fixes in gfx-rs/wgpu#235 If gfx-rs/gfx#2853 is merged first we can remove the crates.io patch. Co-authored-by: Rukai <rubickent@gmail.com>
28: msaa-line example fixes r=kvark a=rukai This PR fixes the msaa-line example in addition to the fixes in gfx-rs#235 If gfx-rs/gfx#2853 is merged first we can remove the crates.io patch. Co-authored-by: Rukai <rubickent@gmail.com>
These changes fix the msaa-line wgpu example, along with a PR to wgpu-native gfx-rs/wgpu-rs#28
Concerns:
attachment_unused
should be moved into gfx-hal. Where abouts?:u64 = !0
suitable?