From a097bf160a9c05e173f7255891a38304a326ca52 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 14 Aug 2020 21:19:07 -0500 Subject: [PATCH] nir/builder: Make nir_get_ptr_bitsize take a nir_shader Reviewed-by: Jesse Natalie Reviewed-by: Karol Herbst Part-of: --- src/compiler/nir/nir_builder.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h index 10268ddf6bd..1c1ed9d4373 100644 --- a/src/compiler/nir/nir_builder.h +++ b/src/compiler/nir/nir_builder.h @@ -963,10 +963,10 @@ nir_ssa_for_alu_src(nir_builder *build, nir_alu_instr *instr, unsigned srcn) } static inline unsigned -nir_get_ptr_bitsize(nir_builder *build) +nir_get_ptr_bitsize(nir_shader *shader) { - if (build->shader->info.stage == MESA_SHADER_KERNEL) - return build->shader->info.cs.ptr_size; + if (shader->info.stage == MESA_SHADER_KERNEL) + return shader->info.cs.ptr_size; return 32; } @@ -981,7 +981,7 @@ nir_build_deref_var(nir_builder *build, nir_variable *var) deref->var = var; nir_ssa_dest_init(&deref->instr, &deref->dest, 1, - nir_get_ptr_bitsize(build), NULL); + nir_get_ptr_bitsize(build->shader), NULL); nir_builder_instr_insert(build, &deref->instr); -- 2.30.2