From 0084f4a42290ab54c185c9284a5670d4da4fc66e Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 31 Oct 2017 11:29:54 +1000 Subject: [PATCH] ac/nir: for ubo load use correct num_components MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. Reviewed-by: Nicolai Hähnle Signed-off-by: Dave Airlie --- 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 38a65b9cd13..2ae656693fc 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -2467,7 +2467,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), ""); } -- 2.30.2