summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/drivers
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-03-19 10:14:48 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-03-19 10:14:48 +0000
commit8be88e432396348c081a5674bae5137e5d076519 (patch)
tree840f05abb0f18db5fd06c56498aa4cb22497a5cb /lib/mesa/src/gallium/drivers
parent7e5bd7808d2f4ccb01fa9dc8226f994fff183111 (diff)
Import Mesa 18.3.5
Diffstat (limited to 'lib/mesa/src/gallium/drivers')
-rw-r--r--lib/mesa/src/gallium/drivers/radeonsi/driinfo_radeonsi.h1
-rw-r--r--lib/mesa/src/gallium/drivers/radeonsi/si_compute_blit.c14
-rw-r--r--lib/mesa/src/gallium/drivers/radeonsi/si_driinfo.h1
3 files changed, 16 insertions, 0 deletions
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")