anv: Use GNU C empty brace initializer

Avoids Clang's warning about the current code:

   warning: suggest braces around initialization of subobject

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
This commit is contained in:
Matt Turner 2017-08-25 20:22:11 -07:00
parent e99dcfd803
commit 012887ef48
2 changed files with 11 additions and 11 deletions

View File

@ -739,7 +739,7 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties2KHR(
* the implementation for use in vkCreateImage, then all members of
* imageFormatProperties will be filled with zero.
*/
base_props->imageFormatProperties = (VkImageFormatProperties) {0};
base_props->imageFormatProperties = (VkImageFormatProperties) {};
}
return result;

View File

@ -510,7 +510,7 @@ anv_pipeline_compile_vs(struct anv_pipeline *pipeline,
}
if (bin == NULL) {
struct brw_vs_prog_data prog_data = { 0, };
struct brw_vs_prog_data prog_data = {};
struct anv_pipeline_binding surface_to_descriptor[256];
struct anv_pipeline_binding sampler_to_descriptor[256];
@ -617,8 +617,8 @@ anv_pipeline_compile_tcs_tes(struct anv_pipeline *pipeline,
pipeline->device->instance->physicalDevice.compiler;
struct anv_pipeline_bind_map tcs_map;
struct anv_pipeline_bind_map tes_map;
struct brw_tcs_prog_key tcs_key = { 0, };
struct brw_tes_prog_key tes_key = { 0, };
struct brw_tcs_prog_key tcs_key = {};
struct brw_tes_prog_key tes_key = {};
struct anv_shader_bin *tcs_bin = NULL;
struct anv_shader_bin *tes_bin = NULL;
unsigned char tcs_sha1[40];
@ -642,8 +642,8 @@ anv_pipeline_compile_tcs_tes(struct anv_pipeline *pipeline,
}
if (tcs_bin == NULL || tes_bin == NULL) {
struct brw_tcs_prog_data tcs_prog_data = { 0, };
struct brw_tes_prog_data tes_prog_data = { 0, };
struct brw_tcs_prog_data tcs_prog_data = {};
struct brw_tes_prog_data tes_prog_data = {};
struct anv_pipeline_binding tcs_surface_to_descriptor[256];
struct anv_pipeline_binding tcs_sampler_to_descriptor[256];
struct anv_pipeline_binding tes_surface_to_descriptor[256];
@ -775,7 +775,7 @@ anv_pipeline_compile_gs(struct anv_pipeline *pipeline,
}
if (bin == NULL) {
struct brw_gs_prog_data prog_data = { 0, };
struct brw_gs_prog_data prog_data = {};
struct anv_pipeline_binding surface_to_descriptor[256];
struct anv_pipeline_binding sampler_to_descriptor[256];
@ -853,7 +853,7 @@ anv_pipeline_compile_fs(struct anv_pipeline *pipeline,
}
if (bin == NULL) {
struct brw_wm_prog_data prog_data = { 0, };
struct brw_wm_prog_data prog_data = {};
struct anv_pipeline_binding surface_to_descriptor[256];
struct anv_pipeline_binding sampler_to_descriptor[256];
@ -976,7 +976,7 @@ anv_pipeline_compile_cs(struct anv_pipeline *pipeline,
}
if (bin == NULL) {
struct brw_cs_prog_data prog_data = { 0, };
struct brw_cs_prog_data prog_data = {};
struct anv_pipeline_binding surface_to_descriptor[256];
struct anv_pipeline_binding sampler_to_descriptor[256];
@ -1277,8 +1277,8 @@ anv_pipeline_init(struct anv_pipeline *pipeline,
pipeline->active_stages = 0;
const VkPipelineShaderStageCreateInfo *pStages[MESA_SHADER_STAGES] = { 0, };
struct anv_shader_module *modules[MESA_SHADER_STAGES] = { 0, };
const VkPipelineShaderStageCreateInfo *pStages[MESA_SHADER_STAGES] = {};
struct anv_shader_module *modules[MESA_SHADER_STAGES] = {};
for (uint32_t i = 0; i < pCreateInfo->stageCount; i++) {
gl_shader_stage stage = ffs(pCreateInfo->pStages[i].stage) - 1;
pStages[stage] = &pCreateInfo->pStages[i];