[Mesa-dev] [PATCH 4/4] radeonsi: fix interpolateAt opcodes for .zw components

Nicolai Hähnle nhaehnle at gmail.com
Wed Oct 5 15:51:40 UTC 2016


On 05.10.2016 00:35, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> Not returning garbage in .zw seems pretty important.

Those are the best bugs :)

For the series: Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

>
> This fixes:
> GL45-CTS.shader_multisample_interpolation.render.interpolate_at_*_check.*
>
> Cc: 11.2 12.0 <mesa-stable at lists.freedesktop.org>
> ---
>  src/gallium/drivers/radeonsi/si_shader.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
> index 590ae64..f856064 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -5201,21 +5201,21 @@ static void build_interp_intrinsic(const struct lp_build_tgsi_action *action,
>
>  			temp2 = LLVMBuildFAdd(gallivm->builder, temp2, temp1, "");
>
>  			ij_out[i] = LLVMBuildBitCast(gallivm->builder,
>  						     temp2, ctx->i32, "");
>  		}
>  		interp_param = lp_build_gather_values(bld_base->base.gallivm, ij_out, 2);
>  	}
>
>  	intr_name = interp_param ? "llvm.SI.fs.interp" : "llvm.SI.fs.constant";
> -	for (chan = 0; chan < 2; chan++) {
> +	for (chan = 0; chan < 4; chan++) {
>  		LLVMValueRef args[4];
>  		LLVMValueRef llvm_chan;
>  		unsigned schan;
>
>  		schan = tgsi_util_get_full_src_register_swizzle(&inst->Src[0], chan);
>  		llvm_chan = lp_build_const_int32(gallivm, schan);
>
>  		args[0] = llvm_chan;
>  		args[1] = attr_number;
>  		args[2] = params;
>


More information about the mesa-dev mailing list