From da9c3cd3ee5494b43a8ab3f9a3fee95620d9d357 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 23 Oct 2017 06:23:29 +1000 Subject: radv/ac/nir: only emit tess factors to storage if tes reads them Otherwise we just need to write them to the tf ring. this seems to improve the tessellation demo on Bonarie ~2190->~2230 fps Reviewed-by: Bas Nieuwenhuizen Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_pipeline.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/amd/vulkan') diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index f23afa42b70..669d9a4858e 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -1773,6 +1773,7 @@ void radv_create_shaders(struct radv_pipeline *pipeline, if (keys) keys[MESA_SHADER_TESS_CTRL].tcs.primitive_mode = nir[MESA_SHADER_TESS_EVAL]->info.tess.primitive_mode; + keys[MESA_SHADER_TESS_CTRL].tcs.tes_reads_tess_factors = !!(nir[MESA_SHADER_TESS_EVAL]->info.inputs_read & (VARYING_BIT_TESS_LEVEL_INNER | VARYING_BIT_TESS_LEVEL_OUTER)); nir_lower_tes_patch_vertices(nir[MESA_SHADER_TESS_EVAL], nir[MESA_SHADER_TESS_CTRL]->info.tess.tcs_vertices_out); } -- cgit v1.2.3