diff options
author | Timothy Arceri <[email protected]> | 2018-02-05 15:47:05 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-02-13 14:43:05 +1100 |
commit | b6cf898ec24ff19ad6ea03c5327cc7ccfc3a08f5 (patch) | |
tree | 274b5f24503cfe776d2103d43495183d70192994 /src/gallium/drivers/radeonsi/si_shader_nir.c | |
parent | 94fa090fada8394c8569191b5ebfc46c037f20ba (diff) |
radeonsi: make si_declare_compute_memory() more generic and call for nir
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader_nir.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_nir.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index f467ce282af..f46e5c6aac4 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -857,6 +857,10 @@ bool si_nir_build_llvm(struct si_shader_context *ctx, struct nir_shader *nir) ctx->num_samplers = util_last_bit(info->samplers_declared); ctx->num_images = util_last_bit(info->images_declared); + if (ctx->shader->selector->local_size) { + assert(nir->info.stage == MESA_SHADER_COMPUTE); + si_declare_compute_memory(ctx); + } ac_nir_translate(&ctx->ac, &ctx->abi, nir, NULL); return true; |