[Mesa-dev] [PATCH 13/18] ac/nir: drop nir_to_llvm_context from visit_vulkan_resource_reindex()

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Feb 9 12:54:30 UTC 2018


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/amd/common/ac_nir_to_llvm.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index d9ad62d7f6..167d0f0c91 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -2381,13 +2381,13 @@ radv_load_resource(struct ac_shader_abi *abi, LLVMValueRef index,
 	return desc_ptr;
 }
 
-static LLVMValueRef visit_vulkan_resource_reindex(struct nir_to_llvm_context *ctx,
+static LLVMValueRef visit_vulkan_resource_reindex(struct ac_nir_context *ctx,
                                                   nir_intrinsic_instr *instr)
 {
-	LLVMValueRef ptr = get_src(ctx->nir, instr->src[0]);
-	LLVMValueRef index = get_src(ctx->nir, instr->src[1]);
+	LLVMValueRef ptr = get_src(ctx, instr->src[0]);
+	LLVMValueRef index = get_src(ctx, instr->src[1]);
 
-	LLVMValueRef result = LLVMBuildGEP(ctx->builder, ptr, &index, 1, "");
+	LLVMValueRef result = LLVMBuildGEP(ctx->ac.builder, ptr, &index, 1, "");
 	LLVMSetMetadata(result, ctx->ac.uniform_md_kind, ctx->ac.empty_md);
 	return result;
 }
@@ -4392,7 +4392,7 @@ static void visit_intrinsic(struct ac_nir_context *ctx,
 		break;
 	}
 	case nir_intrinsic_vulkan_resource_reindex:
-		result = visit_vulkan_resource_reindex(ctx->nctx, instr);
+		result = visit_vulkan_resource_reindex(ctx, instr);
 		break;
 	case nir_intrinsic_store_ssbo:
 		visit_store_ssbo(ctx, instr);
-- 
2.16.1



More information about the mesa-dev mailing list