From 977476bb050ee904fda8fa5871dc04c52a465836 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 26 Sep 2022 13:52:21 +1000 Subject: [PATCH] llvmpipe/fs: fix invocations access for opaque ptrs. Reviewed-by: Roland Scheidegger Reviewed-by: Brian Paul Reviewed-by: Mihai Preda Part-of: --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 217349a1a86..53d933cfb02 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -3243,8 +3243,9 @@ generate_fragment(struct llvmpipe_context *lp, */ if (shader->info.base.num_instructions > 1) { LLVMValueRef invocs, val; + LLVMTypeRef invocs_type = LLVMInt64TypeInContext(gallivm->context); invocs = lp_jit_thread_data_invocations(gallivm, variant->jit_thread_data_type, thread_data_ptr); - val = LLVMBuildLoad(builder, invocs, ""); + val = LLVMBuildLoad2(builder, invocs_type, invocs, ""); val = LLVMBuildAdd(builder, val, LLVMConstInt(LLVMInt64TypeInContext(gallivm->context), 1, 0),