On Tue, Feb 20, 2018 at 4:42 AM, Timothy Arceri <tarc...@itsqueeze.com> wrote: > --- > src/gallium/drivers/radeonsi/si_shader_nir.c | 41 > +++++++++++++++++++++++----- > 1 file changed, 34 insertions(+), 7 deletions(-) > > diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c > b/src/gallium/drivers/radeonsi/si_shader_nir.c > index c2036a1509..e3e71c6eb6 100644 > --- a/src/gallium/drivers/radeonsi/si_shader_nir.c > +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c > @@ -771,6 +771,21 @@ si_nir_lookup_interp_param(struct ac_shader_abi *abi, > LLVMGetParam(ctx->main_fn, interp_param_idx) : NULL; > } > > +static LLVMValueRef > +get_bindless_index(struct ac_shader_abi *abi, > + struct si_shader_context *ctx, LLVMValueRef index) > +{ > + LLVMValueRef offset = > + LLVMBuildMul(ctx->ac.builder, index, LLVMConstInt(ctx->i32, > 16, 0), ""); > + > + index = abi->load_ubo(abi, ctx->ac.i32_0); > + > + LLVMValueRef ret = ac_build_buffer_load(&ctx->ac, index, 1, NULL, > offset, > + NULL, 0, false, false, true, > true);
I don't understand this. At least I think it shouldn't use load_ubo and ac_build_buffer_load. A bindless variable (index) is a 64-bit integer, i.e. the same size as vec2. Marek _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev