radeon: only suspend queries on flush if they haven't been suspended yet
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 27 Nov 2015 23:02:26 +0000 (00:02 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Sat, 28 Nov 2015 10:08:49 +0000 (11:08 +0100)
commit9e5e702cfb380af461062c96d974027da8d5f17a
tree0f986c0f7665238cc9d6c24daf1373ada2255465
parentea3f394e4a2bd8303d199acd0642f39784b7e27f
radeon: only suspend queries on flush if they haven't been suspended yet

Non-timer queries are suspended during blits. When the blits end, the queries
are resumed, but this resume operation itself might run out of CS space and
trigger a flush. When this happens, we must prevent a duplicate suspend during
preflush suspend, and we must also prevent a duplicate resume when the CS flush
returns back to the original resume operation.

This fixes a regression that was introduced by:

commit 8a125afa6e88a3eeddba8c7fdc1a75c9b99d5489
Author: Nicolai Hähnle <nhaehnle@gmail.com>
Date:   Wed Nov 18 18:40:22 2015 +0100

    radeon: ensure that timing/profiling queries are suspended on flush

    The queries_suspended_for_flush flag is redundant because suspended queries
    are not removed from their respective linked list.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reported-by: Axel Davy <axel.davy@ens.fr>
Cc: "11.1" <mesa-stable@lists.freedesktop.org>
Tested-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/radeon/r600_pipe_common.h