OSDN Git Service

vulkan.api: Distinguish Vk*Flags from Vk*FlagBits
authorJesse Hall <jessehall@google.com>
Tue, 24 Nov 2015 18:24:18 +0000 (10:24 -0800)
committerJesse Hall <jessehall@google.com>
Mon, 25 Jan 2016 21:49:31 +0000 (13:49 -0800)
commitd8bade009decc9e5bcc21396993d7a2e572a38f9
tree7e9fcc3fb0ff545daa582e5dfff5a84c26cdc8ba
parenta9bb62b44be381292b893055cd01cdc89ba55c97
vulkan.api: Distinguish Vk*Flags from Vk*FlagBits

Previously Vulkan never used the *FlagBits enums directly as the type
of a parameter or field, only ever using the *Flags typedef. For cases
when a variable should have exactl one of the options, a separate enum
was used. Now Vulkan is switching to using the *FlagBits enum for such
variables, to avoid needing two separate enums for the same thing.

The API file didn't distinguish between these before, it only had one
type for the bitfield, and the vulkan_h.tmpl template synthesized the
*FlagBits name from the *Flags name during generation. Now that we
have cases where some variables need the *FlagBits type and some need
the *Flags type, we need to distinguish them in the API file. This
change does that.

This required some ugly casting in a few places to get around apic's
strict operand type compatibility rules. Most of these can go away
once b/25863296 is fixed.

Change-Id: Ia153d4b0c91abe80e4c34a284ca9d721cc770795
(cherry picked from commit 9f9678461ec3fdefa9c29e84c329cbdd243d7f80)
vulkan/api/vulkan.api