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

Expose Instance flags #4230

Merged
merged 6 commits into from
Oct 11, 2023
Merged

Expose Instance flags #4230

merged 6 commits into from
Oct 11, 2023

Conversation

nical
Copy link
Contributor

@nical nical commented Oct 11, 2023

Checklist

  • Run cargo clippy.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Connections

Blocks #4028
Closes #2316

Description

  • Move instance flags from wgpu-hal to wgpu-types
  • expose them in the instance descriptor
  • Add a few helpers for picking the flags:
    • InstanceFlags::debugging() picks all flags related to debugging and validation,
    • InstanceFlags::from_build_type() picks debugging flags if debug_assertions is enabled (matches current behavior)
    • DEBUG and VALIDATION flags can be overridden via environment variables using InstanceFlags::with_env.

@nical nical requested a review from a team as a code owner October 11, 2023 09:51
wgpu-types/src/lib.rs Show resolved Hide resolved
wgpu-core/src/instance.rs Outdated Show resolved Hide resolved
@nical nical requested a review from a team October 11, 2023 13:43
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.

Amazing!

wgpu-types/src/lib.rs Outdated Show resolved Hide resolved
wgpu-types/src/lib.rs Show resolved Hide resolved
@cwfitzgerald cwfitzgerald enabled auto-merge (squash) October 11, 2023 17:26
@cwfitzgerald cwfitzgerald mentioned this pull request Oct 11, 2023
3 tasks
@cwfitzgerald cwfitzgerald merged commit f95d1c5 into gfx-rs:trunk Oct 11, 2023
23 checks passed
@nical nical deleted the instance-flags branch October 11, 2023 17:59
Davidster added a commit to Davidster/ikari that referenced this pull request Feb 19, 2024
…footgun; disable debug-assertions in wgpu-types to prevent validation layers from being enable since gfx-rs/wgpu#4230
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.

Labels, debug markers, and validation layers should be available on release builds
3 participants