Commit 82a426af authored by Dave Airlie's avatar Dave Airlie Committed by Emil Velikov

radv: get correct offset into LDS for indexed vars.

This seems more correct to me, since if we have an array
of floats they'll be vec4 aligned, and if we do af[2],
we want the const index to increase by 2 slots in the non
compact case.

Fixes: 94f95919 (radv/ac: add support for TCS/TES inputs/outputs.)
Reviewed-by: Bas Nieuwenhuizen's avatarBas Nieuwenhuizen <>
Signed-off-by: default avatarDave Airlie <>
(cherry picked from commit f9de2d40)
[Emil Velikov: hunk belongs to another file {radv,ac}_nir_to_llvm.c]
Signed-off-by: default avatarEmil Velikov <>

parent a3602cdf
......@@ -2880,7 +2880,7 @@ get_dw_address(struct nir_to_llvm_context *ctx,
LLVMConstInt(ctx->ac.i32, 4, false), ""), "");
else if (const_index && !compact_const_index)
dw_addr = LLVMBuildAdd(ctx->builder, dw_addr,
LLVMConstInt(ctx->ac.i32, const_index, false), "");
LLVMConstInt(ctx->ac.i32, const_index * 4, false), "");
dw_addr = LLVMBuildAdd(ctx->builder, dw_addr,
LLVMConstInt(ctx->ac.i32, param * 4, false), "");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment