From 3137f4fad15058cc7d16b2438f44b5e581853be8 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 29 Sep 2022 08:20:25 +1000 Subject: [PATCH] llvmpipe/fs: use explicit api in viewport code. Reviewed-by: Brian Paul Reviewed-by: Mihai Preda Part-of: --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 9dabfcb4a80..9cbdc9cff03 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -332,12 +332,13 @@ lp_llvm_viewport(LLVMTypeRef context_type, LLVMValueRef res; struct lp_type viewport_type = lp_type_float_vec(32, 32 * LP_JIT_VIEWPORT_NUM_FIELDS); + LLVMTypeRef vtype = lp_build_vec_type(gallivm, viewport_type); ptr = lp_jit_context_viewports(gallivm, context_type, context_ptr); ptr = LLVMBuildPointerCast(builder, ptr, - LLVMPointerType(lp_build_vec_type(gallivm, viewport_type), 0), ""); + LLVMPointerType(vtype, 0), ""); - res = lp_build_pointer_get(builder, ptr, viewport_index); + res = lp_build_pointer_get2(builder, vtype, ptr, viewport_index); return res; }