[Mesa-dev] [RFC PATCH 55/65] radeonsi: add si_update_check_render_feedback() helper

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri May 19 16:53:00 UTC 2017


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

diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 44a4b16712..810dd8e89a 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -613,6 +613,13 @@ static void si_update_compressed_tex_shader_mask(struct si_context *sctx,
 		sctx->compressed_tex_shader_mask &= ~shader_bit;
 }
 
+static void si_update_check_render_feedback(struct si_context *sctx,
+					    struct r600_texture *rtex)
+{
+	if (rtex->dcc_offset && p_atomic_read(&rtex->framebuffers_bound))
+		sctx->need_check_render_feedback = true;
+}
+
 static void si_set_sampler_views(struct pipe_context *ctx,
 				 enum pipe_shader_type shader, unsigned start,
                                  unsigned count,
@@ -653,9 +660,7 @@ static void si_set_sampler_views(struct pipe_context *ctx,
 				samplers->compressed_colortex_mask &= ~(1u << slot);
 			}
 
-			if (rtex->dcc_offset &&
-			    p_atomic_read(&rtex->framebuffers_bound))
-				sctx->need_check_render_feedback = true;
+			si_update_check_render_feedback(sctx, rtex);
 		} else {
 			samplers->depth_texture_mask &= ~(1u << slot);
 			samplers->compressed_colortex_mask &= ~(1u << slot);
@@ -861,9 +866,7 @@ static void si_set_shader_image(struct si_context *ctx,
 			images->compressed_colortex_mask &= ~(1 << slot);
 		}
 
-		if (tex->dcc_offset &&
-		    p_atomic_read(&tex->framebuffers_bound))
-			ctx->need_check_render_feedback = true;
+		si_update_check_render_feedback(ctx, tex);
 	}
 
 	images->enabled_mask |= 1u << slot;
-- 
2.13.0



More information about the mesa-dev mailing list