From 80d281c6dc9e64f51f7ffb0b649148bc7f71917f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timur=20Krist=C3=B3f?= Date: Wed, 26 Feb 2020 18:31:34 +0100 Subject: [PATCH] radv: Enable ACO for tessellation control shaders. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Timur Kristóf Reviewed-by: Rhys Perry Part-of: --- src/amd/vulkan/radv_pipeline.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 8055ee95568..2814798bff6 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -2732,7 +2732,8 @@ void radv_stop_feedback(VkPipelineCreationFeedbackEXT *feedback, bool cache_hit) static bool radv_aco_supported_stage(gl_shader_stage stage, bool has_ts) { - return (stage == MESA_SHADER_VERTEX && !has_ts) || + return stage == MESA_SHADER_VERTEX || + stage == MESA_SHADER_TESS_CTRL || (stage == MESA_SHADER_GEOMETRY && !has_ts) || stage == MESA_SHADER_FRAGMENT || stage == MESA_SHADER_COMPUTE; @@ -2941,10 +2942,11 @@ void radv_create_shaders(struct radv_pipeline *pipeline, radv_start_feedback(stage_feedbacks[MESA_SHADER_TESS_CTRL]); + bool aco = use_aco && radv_aco_supported_stage(MESA_SHADER_TESS_CTRL, has_ts); pipeline->shaders[MESA_SHADER_TESS_CTRL] = radv_shader_variant_compile(device, modules[MESA_SHADER_TESS_CTRL], combined_nir, 2, pipeline->layout, &key, &infos[MESA_SHADER_TESS_CTRL], keep_executable_info, - false, &binaries[MESA_SHADER_TESS_CTRL]); + aco, &binaries[MESA_SHADER_TESS_CTRL]); radv_stop_feedback(stage_feedbacks[MESA_SHADER_TESS_CTRL], false); } -- 2.30.2