radeonsi: fix a hang with instancing in Unigine Heaven/Valley on Hawaii
authorMarek Olšák <marek.olsak@amd.com>
Wed, 6 Aug 2014 00:11:04 +0000 (02:11 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 9 Aug 2014 21:41:15 +0000 (23:41 +0200)
This isn't documented anywhere, but it's the only thing that works
for this case.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/radeonsi/si_state_draw.c

index eb21ba1c9062f3df8eaadba04773b7ee107a228e..4e808a3eedf7d57958373cb7d05a1af289967242 100644 (file)
@@ -411,14 +411,11 @@ static bool si_update_draw_info_state(struct si_context *sctx,
                bool ia_switch_on_eop = wd_switch_on_eop;
                unsigned primgroup_size = 64;
 
-               /* Hawaii hangs if instancing is enabled and each instance
-                * is smaller than a prim group and WD_SWITCH_ON_EOP is 0.
+               /* Hawaii hangs if instancing is enabled and WD_SWITCH_ON_EOP is 0.
                 * We don't know that for indirect drawing, so treat it as
                 * always problematic. */
                if (sctx->b.family == CHIP_HAWAII &&
-                   (info->indirect ||
-                    (info->instance_count > 1 &&
-                     u_prims_for_vertices(info->mode, info->count) < primgroup_size))) {
+                   (info->indirect || info->instance_count > 1)) {
                        wd_switch_on_eop = true;
                        ia_switch_on_eop = true;
                }