gfx-rs / gfx

[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
http://gfx-rs.github.io/
Apache License 2.0
5.35k stars 547 forks source link

Refactor the Features to include more portability flags #2886

Open kvark opened 5 years ago

kvark commented 5 years ago

We've reached the limit of u64 bitflags for the Features. We should leave the Vulkan proper flags there, but move all the extra stuff into a separate bitflags/struct. Here are the new flags we need:

    //TODO: add a feature for non-normalized samplers
    //TODO: add a feature for mutable comparison samplers
betoissues commented 5 years ago

More or less something like ExtraFeatures. An example of those "extra" features from what I've read on the spec would be:

        /// Support triangle fan primitive topology.
        const TRIANGLE_FAN = 0x1000_0000_0000_0000;
        /// Support separate stencil reference values for front and back sides.
        const SEPARATE_STENCIL_REF_VALUES = 0x2000_0000_0000_0000;
        /// Support manually specified vertex attribute rates (divisors).
        const INSTANCE_RATE = 0x4000_0000_0000_0000;
        /// Support non-zero mipmap bias on samplers.
        const SAMPLER_MIP_LOD_BIAS = 0x8000_0000_0000_0000;