radeonsi: remove SET_PREDICATION workaround on newer firmware
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 25 Aug 2017 23:11:14 +0000 (01:11 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 13 Sep 2017 16:25:08 +0000 (18:25 +0200)
We need to keep the workaround for older firmware, though.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeon/r600_query.c

index 03ff1018a7146e69fb73c1120192810ef7ead72e..76307ca06623ecf0b4d597948deea591d252b06d 100644 (file)
@@ -1803,11 +1803,13 @@ static void r600_render_condition(struct pipe_context *ctx,
        if (query) {
                bool needs_workaround = false;
 
-               /* There is a firmware regression in VI which causes successive
+               /* There was a firmware regression in VI which causes successive
                 * SET_PREDICATION packets to give the wrong answer for
                 * non-inverted stream overflow predication.
                 */
-               if (rctx->chip_class >= VI && !condition &&
+               if (((rctx->chip_class == VI && rctx->screen->info.pfp_fw_feature < 49) ||
+                    (rctx->chip_class == GFX9 && rctx->screen->info.pfp_fw_feature < 38)) &&
+                   !condition &&
                    (rquery->b.type == PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE ||
                     (rquery->b.type == PIPE_QUERY_SO_OVERFLOW_PREDICATE &&
                      (rquery->buffer.previous ||