From 7d2ce5258f279ec22e86ee772f257756f5314423 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Wed, 6 Jul 2016 14:26:47 +0200 Subject: [PATCH] r600g: call cayman_emit_msaa_sample_locs only when needed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In the case of nr_samples <= 1, that function is (currently) a no-op anyway. Reviewed-by: Marek Olšák --- 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 fe4f14c5e4f..463dc1517d9 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.30.2