diff options
author | Marek Olšák <[email protected]> | 2019-06-28 21:29:34 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-07-04 15:39:00 -0400 |
commit | fe5dbe75b2d9804b72c9c130e5485bfb28e0fc93 (patch) | |
tree | e69ffd70bb668d34200f49fbce87fb2f39e09bd4 /src/gallium/drivers/radeonsi | |
parent | 8a71f60194de3447070138316d0e8b869fe669e2 (diff) |
ac: only set ac_dlc in ac_llvm_build.c
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c index e937ad8f3aa..d45dac1553f 100644 --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c @@ -315,7 +315,7 @@ static void image_fetch_coords( static unsigned get_cache_policy(struct si_shader_context *ctx, const struct tgsi_full_instruction *inst, - bool load, bool atomic, bool may_store_unaligned, + bool atomic, bool may_store_unaligned, bool writeonly_memory) { unsigned cache_policy = 0; @@ -331,8 +331,7 @@ static unsigned get_cache_policy(struct si_shader_context *ctx, * instructions. */ writeonly_memory || inst->Memory.Qualifier & (TGSI_MEMORY_COHERENT | TGSI_MEMORY_VOLATILE))) { - cache_policy |= ac_glc | - (ctx->screen->info.chip_class >= GFX10 && load ? ac_dlc : 0); + cache_policy |= ac_glc; } if (inst->Memory.Qualifier & TGSI_MEMORY_STREAM_CACHE_POLICY) @@ -532,7 +531,7 @@ static void load_emit( info->uses_bindless_buffer_atomic, info->uses_bindless_image_store | info->uses_bindless_image_atomic); - args.cache_policy = get_cache_policy(ctx, inst, true, false, false, false); + args.cache_policy = get_cache_policy(ctx, inst, false, false, false); if (inst->Src[0].Register.File == TGSI_FILE_BUFFER) { /* Don't use SMEM for shader buffer loads, because LLVM doesn't @@ -709,7 +708,6 @@ static void store_emit( bool is_image = inst->Dst[0].Register.File != TGSI_FILE_BUFFER; args.cache_policy = get_cache_policy(ctx, inst, - false, /* load */ false, /* atomic */ is_image, /* may_store_unaligned */ writeonly_memory); @@ -831,7 +829,7 @@ static void atomic_emit( args.data[num_data++] = ac_to_integer(&ctx->ac, lp_build_emit_fetch(bld_base, inst, 2, 0)); - args.cache_policy = get_cache_policy(ctx, inst, false, true, false, false); + args.cache_policy = get_cache_policy(ctx, inst, true, false, false); if (inst->Src[0].Register.File == TGSI_FILE_BUFFER) { args.resource = shader_buffer_fetch_rsrc(ctx, &inst->Src[0], false); |