diff options
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 9340360376d..825cb9dd0ea 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -2231,16 +2231,13 @@ void si_load_system_value(struct si_shader_context *ctx, ctx->system_values[index] = value; } -void si_declare_compute_memory(struct si_shader_context *ctx, - const struct tgsi_full_declaration *decl) +void si_declare_compute_memory(struct si_shader_context *ctx) { struct si_shader_selector *sel = ctx->shader->selector; LLVMTypeRef i8p = LLVMPointerType(ctx->i8, AC_LOCAL_ADDR_SPACE); LLVMValueRef var; - assert(decl->Declaration.MemType == TGSI_MEMORY_TYPE_SHARED); - assert(decl->Range.First == decl->Range.Last); assert(!ctx->ac.lds); var = LLVMAddGlobalInAddressSpace(ctx->ac.module, @@ -2252,6 +2249,15 @@ void si_declare_compute_memory(struct si_shader_context *ctx, ctx->ac.lds = LLVMBuildBitCast(ctx->ac.builder, var, i8p, ""); } +void si_tgsi_declare_compute_memory(struct si_shader_context *ctx, + const struct tgsi_full_declaration *decl) +{ + assert(decl->Declaration.MemType == TGSI_MEMORY_TYPE_SHARED); + assert(decl->Range.First == decl->Range.Last); + + si_declare_compute_memory(ctx); +} + static LLVMValueRef load_const_buffer_desc(struct si_shader_context *ctx, int i) { LLVMValueRef list_ptr = LLVMGetParam(ctx->main_fn, |