Looking through the Sascha Willem C ++ Vulkan Demos hosted on GitHub , I noticed that some functions returned the VkBool32 data VkBool32 .
I was curious why Khronos did not use the usual bool when I noticed Line
typedef uint32_t VkBool32;
at vulkan.h. Uint32_t is defined as
typedef unsigned int uint32_t;
in stdint.h.
My question is: why does it make Sense throw 3 bytes if the standard Bool will do the job with only one byte? My little Recherche showed that there is no performance difference near (see Which is faster: if (bool) or if (int)? ), And Khronos themselfes said they wanted to minimize compatibility problems (in this case, old C, not having a primitive Boolean type) in the order of focus on modern code.
(See Trevett Quote from here )
grounding design, were not compatible with the reverse side
source share