radeonsi: add a 'break' in si_check_render_feedback_*()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 5 Apr 2017 22:07:32 +0000 (00:07 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 10 Apr 2017 21:05:29 +0000 (23:05 +0200)
No need to check all color buffers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_blit.c

index 9b3096d734ff2cb090ad21a79a4ca28487045bdf..4256c51efbc97386c9cea0301acad8194a6fe487 100644 (file)
@@ -555,8 +555,10 @@ static void si_check_render_feedback_textures(struct si_context *sctx,
                            surf->base.u.tex.level >= view->u.tex.first_level &&
                            surf->base.u.tex.level <= view->u.tex.last_level &&
                            surf->base.u.tex.first_layer <= view->u.tex.last_layer &&
-                           surf->base.u.tex.last_layer >= view->u.tex.first_layer)
+                           surf->base.u.tex.last_layer >= view->u.tex.first_layer) {
                                render_feedback = true;
+                               break;
+                       }
                }
 
                if (render_feedback)
@@ -595,8 +597,10 @@ static void si_check_render_feedback_images(struct si_context *sctx,
                        if (tex == (struct r600_texture*)surf->base.texture &&
                            surf->base.u.tex.level == view->u.tex.level &&
                            surf->base.u.tex.first_layer <= view->u.tex.last_layer &&
-                           surf->base.u.tex.last_layer >= view->u.tex.first_layer)
+                           surf->base.u.tex.last_layer >= view->u.tex.first_layer) {
                                render_feedback = true;
+                               break;
+                       }
                }
 
                if (render_feedback)