Mesa (master): radv: Only use 32 KiB per threadgroup on Stoney.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jan 14 19:59:08 UTC 2019
Module: Mesa
Branch: master
Commit: 76b12fa564a5f48e3f2264718dea0158d0c05b4c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=76b12fa564a5f48e3f2264718dea0158d0c05b4c
Author: Bas Nieuwenhuizen <basni at chromium.org>
Date: Mon Jan 14 14:44:15 2019 +0100
radv: Only use 32 KiB per threadgroup on Stoney.
Causes hangs on some machines.
What works for dEQP-VK.tessellation.shader_input_output.barrier:
- running num_patches = 6 (which limits LDS to 32 KiB)
- running num_patches = 8, and artificially cutting LDS size at 32 KiB.
CC: <mesa-stable at lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/vulkan/radv_nir_to_llvm.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c
index cd58167b76..9d0aa41152 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -254,7 +254,16 @@ get_tcs_num_patches(struct radv_shader_context *ctx)
/* Make sure that the data fits in LDS. This assumes the shaders only
* use LDS for the inputs and outputs.
*/
- hardware_lds_size = ctx->options->chip_class >= CIK ? 65536 : 32768;
+ hardware_lds_size = 32768;
+
+ /* Looks like STONEY hangs if we use more than 32 KiB LDS in a single
+ * threadgroup, even though there is more than 32 KiB LDS.
+ *
+ * Test: dEQP-VK.tessellation.shader_input_output.barrier
+ */
+ if (ctx->options->chip_class >= CIK && ctx->options->family != CHIP_STONEY)
+ hardware_lds_size = 65536;
+
num_patches = MIN2(num_patches, hardware_lds_size / (input_patch_size + output_patch_size));
/* Make sure the output data fits in the offchip buffer */
num_patches = MIN2(num_patches, (ctx->options->tess_offchip_block_dw_size * 4) / output_patch_size);
More information about the mesa-commit
mailing list