From: Marek Olšák <marek.ol...@amd.com> --- src/gallium/drivers/radeonsi/si_shader.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index c39b80bb396..9f2d323459d 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -1878,42 +1878,42 @@ static void interp_fs_input(struct si_shader_context *ctx, prim_mask, i, j); } } } void si_llvm_load_input_fs( struct si_shader_context *ctx, unsigned input_index, LLVMValueRef out[4]) { - struct lp_build_context *base = &ctx->bld_base.base; struct si_shader *shader = ctx->shader; struct tgsi_shader_info *info = &shader->selector->info; LLVMValueRef main_fn = ctx->main_fn; LLVMValueRef interp_param = NULL; int interp_param_idx; enum tgsi_semantic semantic_name = info->input_semantic_name[input_index]; unsigned semantic_index = info->input_semantic_index[input_index]; enum tgsi_interpolate_mode interp_mode = info->input_interpolate[input_index]; enum tgsi_interpolate_loc interp_loc = info->input_interpolate_loc[input_index]; /* Get colors from input VGPRs (set by the prolog). */ if (semantic_name == TGSI_SEMANTIC_COLOR) { unsigned colors_read = shader->selector->info.colors_read; unsigned mask = colors_read >> (semantic_index * 4); unsigned offset = SI_PARAM_POS_FIXED_PT + 1 + (semantic_index ? util_bitcount(colors_read & 0xf) : 0); + LLVMValueRef undef = LLVMGetUndef(ctx->f32); - out[0] = mask & 0x1 ? LLVMGetParam(main_fn, offset++) : base->undef; - out[1] = mask & 0x2 ? LLVMGetParam(main_fn, offset++) : base->undef; - out[2] = mask & 0x4 ? LLVMGetParam(main_fn, offset++) : base->undef; - out[3] = mask & 0x8 ? LLVMGetParam(main_fn, offset++) : base->undef; + out[0] = mask & 0x1 ? LLVMGetParam(main_fn, offset++) : undef; + out[1] = mask & 0x2 ? LLVMGetParam(main_fn, offset++) : undef; + out[2] = mask & 0x4 ? LLVMGetParam(main_fn, offset++) : undef; + out[3] = mask & 0x8 ? LLVMGetParam(main_fn, offset++) : undef; return; } interp_param_idx = lookup_interp_param_index(interp_mode, interp_loc); if (interp_param_idx == -1) return; else if (interp_param_idx) { interp_param = LLVMGetParam(ctx->main_fn, interp_param_idx); } @@ -5802,21 +5802,21 @@ si_generate_gs_copy_shader(struct si_screen *sscreen, bb = LLVMInsertBasicBlockInContext(ctx.ac.context, end_bb, "out"); LLVMAddCase(switch_inst, LLVMConstInt(ctx.i32, stream, 0), bb); LLVMPositionBuilderAtEnd(builder, bb); /* Fetch vertex data from GSVS ring */ offset = 0; for (i = 0; i < gsinfo->num_outputs; ++i) { for (unsigned chan = 0; chan < 4; chan++) { if (!(gsinfo->output_usagemask[i] & (1 << chan)) || outputs[i].vertex_stream[chan] != stream) { - outputs[i].values[chan] = ctx.bld_base.base.undef; + outputs[i].values[chan] = LLVMGetUndef(ctx.f32); continue; } LLVMValueRef soffset = LLVMConstInt(ctx.i32, offset * gs_selector->gs_max_out_vertices * 16 * 4, 0); offset++; outputs[i].values[chan] = ac_build_buffer_load(&ctx.ac, ctx.gsvs_ring[0], 1, -- 2.17.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev