[Mesa-dev] [PATCH 2/5] radeonsi: add a 'break' in si_check_render_feedback_*()

Samuel Pitoiset samuel.pitoiset at gmail.com
Wed Apr 5 22:07:32 UTC 2017


No need to check all color buffers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/gallium/drivers/radeonsi/si_blit.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c
index 9b3096d734..4256c51efb 100644
--- a/src/gallium/drivers/radeonsi/si_blit.c
+++ b/src/gallium/drivers/radeonsi/si_blit.c
@@ -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)
-- 
2.12.2



More information about the mesa-dev mailing list