Add fallthrough to prevent errors caused by missing break
Now, I can't see if this code is correct or not, because there is no break and no fallthrough comment which will show that break is unnecessary
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT: {
VkPhysicalDeviceRobustness2FeaturesEXT *features =
(VkPhysicalDeviceRobustness2FeaturesEXT *)ext;
features->robustBufferAccess2 = true;
features->robustImageAccess2 = true;
features->nullDescriptor = true;
}
https://gitlab.freedesktop.org/mesa/mesa/-/blob/master/src/amd/vulkan/radv_device.c#L1291-1297
I found very similar code which have break;
at the end of case.
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT: {
VkPhysicalDeviceRobustness2FeaturesEXT *features = (void *)ext;
features->robustBufferAccess2 = true;
features->robustImageAccess2 = true;
features->nullDescriptor = true;
break;
}
https://gitlab.freedesktop.org/mesa/mesa/-/blob/master/src/intel/vulkan/anv_device.c#L1269-1275
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-fallthrough
There is more places without fallthrough:
mesa/src/amd/compiler/aco_optimizer.cpp:1076
mesa/src/amd/vulkan/radv_device.c:1297
mesa/src/compiler/glsl/ast_to_hir.cpp:5365
mesa/src/compiler/glsl/ast_to_hir.cpp:5368
mesa/src/compiler/glsl/ast_to_hir.cpp:5371
mesa/src/mesa/main/glformats.c:3064
mesa/src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1940
mesa/src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1945
mesa/src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1966
mesa/src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1971
mesa/src/mesa/state_tracker/st_glsl_to_tgsi.cpp:1976