From 0ee48216ddbb949a73369ae378f3a4aebaa9c56e Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 15 Jun 2021 08:31:21 -0700 Subject: [PATCH] zink: fix more initializer styles Empty initializer lists are a GCC extension, let's use the syntax that compilers like MSVC also supports. Reviewed-by: Hoe Hao Cheng Reviewed-By: Mike Blumenkrantz Part-of: --- src/gallium/drivers/zink/zink_descriptors_lazy.c | 6 +++--- src/gallium/drivers/zink/zink_state.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/zink/zink_descriptors_lazy.c b/src/gallium/drivers/zink/zink_descriptors_lazy.c index 62743f2d415..4e832ddfc0c 100644 --- a/src/gallium/drivers/zink/zink_descriptors_lazy.c +++ b/src/gallium/drivers/zink/zink_descriptors_lazy.c @@ -126,7 +126,7 @@ zink_descriptor_program_init_lazy(struct zink_context *ctx, struct zink_program struct zink_screen *screen = zink_screen(ctx->base.screen); VkDescriptorSetLayoutBinding bindings[ZINK_DESCRIPTOR_TYPES][PIPE_SHADER_TYPES * 32]; VkDescriptorUpdateTemplateEntry entries[ZINK_DESCRIPTOR_TYPES][PIPE_SHADER_TYPES * 32]; - unsigned num_bindings[ZINK_DESCRIPTOR_TYPES] = {}; + unsigned num_bindings[ZINK_DESCRIPTOR_TYPES] = {0}; uint8_t has_bindings = 0; struct zink_shader **stages; @@ -141,7 +141,7 @@ zink_descriptor_program_init_lazy(struct zink_context *ctx, struct zink_program return false; unsigned push_count = 0; - unsigned entry_idx[ZINK_DESCRIPTOR_TYPES] = {}; + unsigned entry_idx[ZINK_DESCRIPTOR_TYPES] = {0}; unsigned num_shaders = pg->is_compute ? 1 : ZINK_SHADER_COUNT; bool have_push = screen->info.have_KHR_push_descriptor; @@ -228,7 +228,7 @@ zink_descriptor_program_init_lazy(struct zink_context *ctx, struct zink_program if (!screen->info.have_KHR_descriptor_update_template || screen->descriptor_mode == ZINK_DESCRIPTOR_MODE_NOTEMPLATES) return true; - VkDescriptorUpdateTemplateCreateInfo template[ZINK_DESCRIPTOR_TYPES + 1] = {}; + VkDescriptorUpdateTemplateCreateInfo template[ZINK_DESCRIPTOR_TYPES + 1] = {0}; /* type of template */ VkDescriptorUpdateTemplateType types[ZINK_DESCRIPTOR_TYPES + 1] = {VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET}; if (have_push && screen->descriptor_mode == ZINK_DESCRIPTOR_MODE_LAZY) diff --git a/src/gallium/drivers/zink/zink_state.c b/src/gallium/drivers/zink/zink_state.c index 135203e0184..bc9fd3e8e09 100644 --- a/src/gallium/drivers/zink/zink_state.c +++ b/src/gallium/drivers/zink/zink_state.c @@ -251,7 +251,7 @@ zink_create_blend_state(struct pipe_context *pctx, if (blend_state->independent_blend_enable) rt = blend_state->rt + i; - VkPipelineColorBlendAttachmentState att = { }; + VkPipelineColorBlendAttachmentState att = {0}; if (rt->blend_enable) { att.blendEnable = VK_TRUE;