summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-10-06 16:03:15 +0200
committerSamuel Pitoiset <[email protected]>2017-10-09 10:04:17 +0200
commitaab1537568475fefcf2981c87a7b1689f655a4e7 (patch)
tree3eb21c5ccdb394fa0fba470aa9a595d91fc28d37
parent6c7720ed78db754d52f204cbb74897aa9e65ea7e (diff)
radv: allow launching waves out-of-order for compute
Ported from RadeonSI, and -pro seems to enable it as well. Signed-off-by: Samuel Pitoiset <[email protected]> Acked-by: Nicolai Hähnle <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
-rw-r--r--src/amd/vulkan/radv_cmd_buffer.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 4b41b358e99..3f6945bfea3 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -3216,7 +3216,15 @@ radv_emit_dispatch_packets(struct radv_cmd_buffer *cmd_buffer,
}
} else {
unsigned blocks[3] = { info->blocks[0], info->blocks[1], info->blocks[2] };
- unsigned dispatch_initiator = S_00B800_COMPUTE_SHADER_EN(1);
+ unsigned dispatch_initiator = S_00B800_COMPUTE_SHADER_EN(1) |
+ S_00B800_FORCE_START_AT_000(1);
+
+ if (cmd_buffer->device->physical_device->rad_info.chip_class >= CIK) {
+ /* If the KMD allows it (there is a KMD hw register for
+ * it), allow launching waves out-of-order.
+ */
+ dispatch_initiator |= S_00B800_ORDER_MODE(1);
+ }
if (info->unaligned) {
unsigned *cs_block_size = compute_shader->info.cs.block_size;