From 16fcbb2eba95d0ec04c775894165e964b63d8e6f Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 25 Jul 2019 09:33:36 +1000 Subject: [PATCH] gallium: fix windows build from params change. This is why we can't have nice things. I'm sure there's someway to do this with {0} but I really don't have time for that. Fixes: 2631fd3b0bf ("gallivm: rework lp_build_tgsi_soa to take a struct") Reviewed-by: Timothy Arceri --- src/gallium/auxiliary/draw/draw_llvm.c | 6 ++++-- src/gallium/drivers/llvmpipe/lp_state_fs.c | 3 ++- src/gallium/drivers/swr/swr_shader.cpp | 9 ++++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c index d9a93c3d667..d4c89a85146 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.c +++ b/src/gallium/auxiliary/draw/draw_llvm.c @@ -637,7 +637,8 @@ generate_vs(struct draw_llvm_variant *variant, LLVMValueRef num_ssbos_ptr = draw_jit_context_num_vs_ssbos(variant->gallivm, context_ptr); - struct lp_build_tgsi_params params = {}; + struct lp_build_tgsi_params params; + memset(¶ms, 0, sizeof(params)); params.type = vs_type; params.mask = bld_mask; @@ -2379,7 +2380,8 @@ draw_gs_llvm_generate(struct draw_llvm *llvm, draw_gs_llvm_dump_variant_key(&variant->key); } - struct lp_build_tgsi_params params = {}; + struct lp_build_tgsi_params params; + memset(¶ms, 0, sizeof(params)); params.type = gs_type; params.mask = &mask; diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index eabe8572111..101877ded34 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -478,7 +478,8 @@ generate_fs_loop(struct gallivm_state *gallivm, lp_build_interp_soa_update_inputs_dyn(interp, gallivm, loop_state.counter); - struct lp_build_tgsi_params params = {}; + struct lp_build_tgsi_params params; + memset(¶ms, 0, sizeof(params)); params.type = type; params.mask = &mask; diff --git a/src/gallium/drivers/swr/swr_shader.cpp b/src/gallium/drivers/swr/swr_shader.cpp index 3fc2ef4ced8..44fc133f530 100644 --- a/src/gallium/drivers/swr/swr_shader.cpp +++ b/src/gallium/drivers/swr/swr_shader.cpp @@ -681,7 +681,8 @@ BuilderSWR::CompileGS(struct swr_context *ctx, swr_jit_gs_key &key) gs_iface.info = info; gs_iface.pVtxAttribMap = vtxAttribMap; - struct lp_build_tgsi_params params = {}; + struct lp_build_tgsi_params params; + memset(¶ms, 0, sizeof(params)); params.type = lp_type_float_vec(32, 32 * 8); params.mask = & mask; params.consts_ptr = wrap(consts_ptr); @@ -834,7 +835,8 @@ BuilderSWR::CompileVS(struct swr_context *ctx, swr_jit_vs_key &key) uint32_t vectorWidth = mVWidth; #endif - struct lp_build_tgsi_params params = {}; + struct lp_build_tgsi_params params; + memset(¶ms, 0, sizeof(params)); params.type = lp_type_float_vec(32, 32 * vectorWidth); params.consts_ptr = wrap(consts_ptr); params.const_sizes_ptr = wrap(const_sizes_ptr); @@ -1324,7 +1326,8 @@ BuilderSWR::CompileFS(struct swr_context *ctx, swr_jit_fs_key &key) uses_mask = true; } - struct lp_build_tgsi_params params = {}; + struct lp_build_tgsi_params params; + memset(¶ms, 0, sizeof(params)); params.type = lp_type_float_vec(32, 32 * 8); params.mask = uses_mask ? &mask : NULL; params.consts_ptr = wrap(consts_ptr); -- 2.30.2