From 677bd47cb96679cd6a75b0a11019797272fcba03 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Fri, 9 Jun 2017 15:16:14 +0200 Subject: [PATCH] radeonsi/nir: set si_shader_context::num_{sampler,images} MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader_nir.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index 22c7e238456..0eb8f9704e8 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -375,6 +375,8 @@ si_nir_load_sampler_desc(struct ac_shader_abi *abi, bool si_nir_build_llvm(struct si_shader_context *ctx, struct nir_shader *nir) { + struct tgsi_shader_info *info = &ctx->shader->selector->info; + unsigned fs_attr_idx = 0; nir_foreach_variable(variable, &nir->inputs) { unsigned attrib_count = glsl_count_attribute_slots(variable->type, @@ -399,6 +401,9 @@ bool si_nir_build_llvm(struct si_shader_context *ctx, struct nir_shader *nir) ctx->abi.inputs = &ctx->inputs[0]; ctx->abi.load_sampler_desc = si_nir_load_sampler_desc; + ctx->num_samplers = util_last_bit(info->samplers_declared); + ctx->num_images = util_last_bit(info->images_declared); + ac_nir_translate(&ctx->ac, &ctx->abi, nir, NULL); return true; -- 2.30.2