diff --git a/src/vulkan/runtime/vk_pipeline.c b/src/vulkan/runtime/vk_pipeline.c index e14fdab9cb2..421afc2ca89 100644 --- a/src/vulkan/runtime/vk_pipeline.c +++ b/src/vulkan/runtime/vk_pipeline.c @@ -511,6 +511,8 @@ vk_shader_unref(struct vk_device *device, struct vk_shader *shader) vk_pipeline_cache_object_unref(device, &shader->pipeline.cache_obj); } +PRAGMA_DIAGNOSTIC_PUSH +PRAGMA_DIAGNOSTIC_ERROR(-Wpadded) struct vk_pipeline_tess_info { unsigned tcs_vertices_out : 8; unsigned primitive_mode : 2; /* tess_primitive_mode */ @@ -519,6 +521,7 @@ struct vk_pipeline_tess_info { unsigned point_mode : 1; unsigned _pad : 18; }; +PRAGMA_DIAGNOSTIC_POP static_assert(sizeof(struct vk_pipeline_tess_info) == 4, "This struct has no holes"); diff --git a/src/vulkan/runtime/vk_shader.c b/src/vulkan/runtime/vk_shader.c index 6f377fa6f21..d124113a0cc 100644 --- a/src/vulkan/runtime/vk_shader.c +++ b/src/vulkan/runtime/vk_shader.c @@ -167,6 +167,8 @@ vk_shader_compile_info_init(struct vk_shader_compile_info *info, }; } +PRAGMA_DIAGNOSTIC_PUSH +PRAGMA_DIAGNOSTIC_ERROR(-Wpadded) struct vk_shader_bin_header { char mesavkshaderbin[16]; VkDriverId driver_id; @@ -176,6 +178,7 @@ struct vk_shader_bin_header { uint8_t sha1[SHA1_DIGEST_LENGTH]; uint32_t _pad; }; +PRAGMA_DIAGNOSTIC_POP static_assert(sizeof(struct vk_shader_bin_header) == 72, "This struct has no holes");