-
Notifications
You must be signed in to change notification settings - Fork 953
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use numeric constants to define
wgpu_types::Features
values. (#2817)
As an incidental change, wgpu#2802 (de5fe90) changed the definitions of the bitflags in `wgpu_types::Features` from looking like this: const DEPTH24UNORM_STENCIL8 = 1 << 1; to this: const DEPTH24UNORM_STENCIL8 = Self::DEPTH_CLIP_CONTROL.bits << 1; The intention was to make it easier to insert new flags at a logical point in the list, and have the numbers automatically update themselves. Unfortunately, `cbindgen` can't cope with the new style of definition. It produces definitions for these flags that look like this: #define WGPUFeatures_DEPTH24UNORM_STENCIL8 (uint64_t)((WGPUFeatures_DEPTH_CLIP_CONTROL).bits << 1) These are integer values, so the `.bits` field access is bogus. This commit changes the definitions back to using direct numbering, which `cbindgen` doesn't choke on.
- Loading branch information
Showing
1 changed file
with
35 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters