From 8be88e432396348c081a5674bae5137e5d076519 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Tue, 19 Mar 2019 10:14:48 +0000 Subject: Import Mesa 18.3.5 --- lib/mesa/src/gallium/drivers/radeonsi/driinfo_radeonsi.h | 1 + lib/mesa/src/gallium/drivers/radeonsi/si_compute_blit.c | 14 ++++++++++++++ lib/mesa/src/gallium/drivers/radeonsi/si_driinfo.h | 1 + 3 files changed, 16 insertions(+) (limited to 'lib/mesa/src/gallium/drivers/radeonsi') diff --git a/lib/mesa/src/gallium/drivers/radeonsi/driinfo_radeonsi.h b/lib/mesa/src/gallium/drivers/radeonsi/driinfo_radeonsi.h index 8c5078c13..095110a2b 100644 --- a/lib/mesa/src/gallium/drivers/radeonsi/driinfo_radeonsi.h +++ b/lib/mesa/src/gallium/drivers/radeonsi/driinfo_radeonsi.h @@ -8,4 +8,5 @@ DRI_CONF_SECTION_END DRI_CONF_SECTION_DEBUG DRI_CONF_RADEONSI_CLEAR_DB_CACHE_BEFORE_CLEAR("false") + DRI_CONF_RADEONSI_ENABLE_NIR("false") DRI_CONF_SECTION_END diff --git a/lib/mesa/src/gallium/drivers/radeonsi/si_compute_blit.c b/lib/mesa/src/gallium/drivers/radeonsi/si_compute_blit.c index 20e4f591f..3cbc440b1 100644 --- a/lib/mesa/src/gallium/drivers/radeonsi/si_compute_blit.c +++ b/lib/mesa/src/gallium/drivers/radeonsi/si_compute_blit.c @@ -112,12 +112,20 @@ static void si_compute_do_clear_or_copy(struct si_context *sctx, sb[0].buffer_offset = dst_offset; sb[0].buffer_size = size; + bool shader_dst_stream_policy = SI_COMPUTE_DST_CACHE_POLICY != L2_LRU; + if (src) { sb[1].buffer = src; sb[1].buffer_offset = src_offset; sb[1].buffer_size = size; ctx->set_shader_buffers(ctx, PIPE_SHADER_COMPUTE, 0, 2, sb); + + if (!sctx->cs_copy_buffer) { + sctx->cs_copy_buffer = si_create_dma_compute_shader(&sctx->b, + SI_COMPUTE_COPY_DW_PER_THREAD, + shader_dst_stream_policy, true); + } ctx->bind_compute_state(ctx, sctx->cs_copy_buffer); } else { assert(clear_value_size >= 4 && @@ -128,6 +136,12 @@ static void si_compute_do_clear_or_copy(struct si_context *sctx, sctx->cs_user_data[i] = clear_value[i % (clear_value_size / 4)]; ctx->set_shader_buffers(ctx, PIPE_SHADER_COMPUTE, 0, 1, sb); + + if (!sctx->cs_clear_buffer) { + sctx->cs_clear_buffer = si_create_dma_compute_shader(&sctx->b, + SI_COMPUTE_CLEAR_DW_PER_THREAD, + shader_dst_stream_policy, false); + } ctx->bind_compute_state(ctx, sctx->cs_clear_buffer); } diff --git a/lib/mesa/src/gallium/drivers/radeonsi/si_driinfo.h b/lib/mesa/src/gallium/drivers/radeonsi/si_driinfo.h index 38f5c3dc7..37939a4ed 100644 --- a/lib/mesa/src/gallium/drivers/radeonsi/si_driinfo.h +++ b/lib/mesa/src/gallium/drivers/radeonsi/si_driinfo.h @@ -46,6 +46,7 @@ DRI_CONF_BEGIN DRI_CONF_ALLOW_GLSL_LAYOUT_QUALIFIER_ON_FUNCTION_PARAMETERS("false") DRI_CONF_FORCE_COMPAT_PROFILE("false") DRI_CONF_RADEONSI_CLEAR_DB_CACHE_BEFORE_CLEAR("false") + DRI_CONF_RADEONSI_ENABLE_NIR("false") DRI_CONF_SECTION_END DRI_CONF_SECTION_MISCELLANEOUS DRI_CONF_ALWAYS_HAVE_DEPTH_BUFFER("false") -- cgit v1.2.3