From: Marek Olšák Date: Wed, 7 Aug 2019 01:08:57 +0000 (-0400) Subject: radeonsi/nir: fix assertion in si_nir_load_sampler_desc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=452cb7055f515274ac8ed6443c8f4c3ccededa4b;p=mesa.git radeonsi/nir: fix assertion in si_nir_load_sampler_desc --- diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index 0aa17e7a37c..9c0379a997b 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -1129,7 +1129,7 @@ si_nir_load_sampler_desc(struct ac_shader_abi *abi, } unsigned num_slots = image ? ctx->num_images : ctx->num_samplers; - assert(const_index < num_slots); + assert(const_index < num_slots || dynamic_index); LLVMValueRef list = LLVMGetParam(ctx->main_fn, ctx->param_samplers_and_images); LLVMValueRef index = LLVMConstInt(ctx->ac.i32, const_index, false);