radeonsi: fix a GPU hang with tessellation on 2-CU configs
authorMarek Olšák <marek.olsak@amd.com>
Tue, 23 May 2017 19:52:11 +0000 (21:52 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 6 Jun 2017 11:01:52 +0000 (13:01 +0200)
Only harvested Stoney has 2 CUs. Tested on 2-CU Stoney and Fiji forced
to 2 CUs.

Cc: 17.0 17.1 <mesa-stable@lists.freedesktop.org>
Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
src/gallium/drivers/radeonsi/si_state_draw.c

index 8651592..77df643 100644 (file)
@@ -169,8 +169,12 @@ static void si_emit_derived_tess_state(struct si_context *sctx,
 
        /* Make sure that the data fits in LDS. This assumes the shaders only
         * use LDS for the inputs and outputs.
+        *
+        * While CIK can use 64K per threadgroup, there is a hang on Stoney
+        * with 2 CUs if we use more than 32K. The closed Vulkan driver also
+        * uses 32K at most on all GCN chips.
         */
-       hardware_lds_size = sctx->b.chip_class >= CIK ? 65536 : 32768;
+       hardware_lds_size = 32768;
        *num_patches = MIN2(*num_patches, hardware_lds_size / (input_patch_size +
                                                               output_patch_size));