[Mesa-dev] [PATCH 1/3] r600g: call cayman_emit_msaa_sample_locs only when needed

Nicolai Hähnle nhaehnle at gmail.com
Wed Jul 6 16:07:01 UTC 2016


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

In the case of nr_samples <= 1, that function is (currently) a no-op anyway.
---
 src/gallium/drivers/r600/evergreen_state.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index fe4f14c..463dc15 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -1654,7 +1654,8 @@ static void evergreen_emit_framebuffer_state(struct r600_context *rctx, struct r
 			EG_S_028A4C_FORCE_EOV_CNTDWN_ENABLE(1) |
 			EG_S_028A4C_FORCE_EOV_REZ_ENABLE(1);
 
-		cayman_emit_msaa_sample_locs(cs, rctx->framebuffer.nr_samples);
+		if (rctx->framebuffer.nr_samples > 1)
+			cayman_emit_msaa_sample_locs(cs, rctx->framebuffer.nr_samples);
 		cayman_emit_msaa_config(cs, rctx->framebuffer.nr_samples,
 					rctx->ps_iter_samples, 0, sc_mode_cntl_1);
 	}
-- 
2.7.4



More information about the mesa-dev mailing list