From: Timur Kristóf Date: Wed, 26 Feb 2020 17:31:34 +0000 (+0100) Subject: radv: Enable ACO for tessellation control shaders. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=80d281c6dc9e64f51f7ffb0b649148bc7f71917f;p=mesa.git radv: Enable ACO for tessellation control shaders. Signed-off-by: Timur Kristóf Reviewed-by: Rhys Perry Part-of: --- 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); }