r600g: call cayman_emit_msaa_sample_locs only when needed
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 6 Jul 2016 12:26:47 +0000 (14:26 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 8 Jul 2016 08:52:45 +0000 (10:52 +0200)
In the case of nr_samples <= 1, that function is (currently) a no-op anyway.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/r600/evergreen_state.c

index fe4f14c..463dc15 100644 (file)
@@ -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);
        }