From: Jason Ekstrand Date: Sat, 15 Aug 2020 02:19:07 +0000 (-0500) Subject: nir/builder: Make nir_get_ptr_bitsize take a nir_shader X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a097bf160a9c05e173f7255891a38304a326ca52;p=mesa.git nir/builder: Make nir_get_ptr_bitsize take a nir_shader Reviewed-by: Jesse Natalie Reviewed-by: Karol Herbst Part-of: --- 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);