radeonsi: handle count_from_stream_output in a few IA_MULTI_VGT_PARAM cases
authorMarek Olšák <marek.olsak@amd.com>
Sun, 29 Jan 2017 21:28:04 +0000 (22:28 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 30 Jan 2017 16:45:29 +0000 (17:45 +0100)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_state_draw.c

index aa79b8fcb58fc0826a8018dc7d6df03c33f7bd54..16d905772a6fff8629d7738e7604120c9fb31da0 100644 (file)
@@ -432,7 +432,8 @@ static unsigned si_get_ia_multi_vgt_param(struct si_context *sctx,
        key.u.multi_instances_smaller_than_primgroup =
                info->indirect ||
                (info->instance_count > 1 &&
-                si_num_prims_for_vertices(info) < primgroup_size);
+                (info->count_from_stream_output ||
+                 si_num_prims_for_vertices(info) < primgroup_size));
        key.u.primitive_restart = info->primitive_restart;
        key.u.count_from_stream_output = info->count_from_stream_output != NULL;
 
@@ -452,7 +453,8 @@ static unsigned si_get_ia_multi_vgt_param(struct si_context *sctx,
                    G_028AA8_SWITCH_ON_EOI(ia_multi_vgt_param) &&
                    (info->indirect ||
                     (info->instance_count > 1 &&
-                     si_num_prims_for_vertices(info) <= 1)))
+                     (info->count_from_stream_output ||
+                      si_num_prims_for_vertices(info) <= 1))))
                        sctx->b.flags |= SI_CONTEXT_VGT_FLUSH;
        }