[Mesa-dev] [PATCH] ac/nir: for ubo load use correct num_components

Nicolai Hähnle nhaehnle at gmail.com
Thu Nov 2 16:07:46 UTC 2017


On 31.10.2017 02:33, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> I was hacking something stupid in doom, and hit an assert for the bitcast
> following this, it definitely looks like this should be the number of 32-bit
> components, not the instr level ones.

Agreed.

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

> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>   src/amd/common/ac_nir_to_llvm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index a736d34..fb44d55 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -2510,7 +2510,7 @@ static LLVMValueRef visit_load_ubo_buffer(struct ac_nir_context *ctx,
>   	}
>   
>   
> -	ret = ac_build_gather_values(&ctx->ac, results, instr->num_components);
> +	ret = ac_build_gather_values(&ctx->ac, results, num_components);
>   	return LLVMBuildBitCast(ctx->ac.builder, ret,
>   	                        get_def_type(ctx, &instr->dest.ssa), "");
>   }
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list