radv: discard the PS epilog when the pipeline doesn't use a fragment shader
This makes no sense and this was broken. Fixes dEQP-VK.mesh_shader.ext.smoke.*_lib.mesh_shader_triangle_rasterization_disabled. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19019>
This commit is contained in:
@@ -2882,7 +2882,8 @@ radv_generate_graphics_pipeline_key(const struct radv_graphics_pipeline *pipelin
|
||||
if (device->primitives_generated_query)
|
||||
key.primitives_generated_query = true;
|
||||
|
||||
key.ps.has_epilog = !!pipeline->ps_epilog;
|
||||
key.ps.has_epilog =
|
||||
!!(pipeline->active_stages & VK_SHADER_STAGE_FRAGMENT_BIT) && !!pipeline->ps_epilog;
|
||||
|
||||
key.dynamic_patch_control_points =
|
||||
!!(pipeline->dynamic_states & RADV_DYNAMIC_PATCH_CONTROL_POINTS);
|
||||
@@ -4196,12 +4197,20 @@ radv_create_shaders(struct radv_pipeline *pipeline, struct radv_pipeline_layout
|
||||
}
|
||||
}
|
||||
|
||||
/* When the main FS is compiled inside a library, we need to compile a PS epilog if it hasn't
|
||||
* been already imported.
|
||||
*/
|
||||
if (pipeline->type == RADV_PIPELINE_GRAPHICS) {
|
||||
if (!radv_pipeline_create_ps_epilog(radv_pipeline_to_graphics(pipeline), pipeline_key))
|
||||
return result;
|
||||
struct radv_graphics_pipeline *graphics_pipeline = radv_pipeline_to_graphics(pipeline);
|
||||
|
||||
if (noop_fs && graphics_pipeline->ps_epilog) {
|
||||
/* Discard the PS epilog when the pipeline doesn't use a FS because it makes no sense. */
|
||||
radv_shader_part_unref(device, graphics_pipeline->ps_epilog);
|
||||
graphics_pipeline->ps_epilog = NULL;
|
||||
} else {
|
||||
/* When the main FS is compiled inside a library, we need to compile a PS epilog if it
|
||||
* hasn't been already imported.
|
||||
*/
|
||||
if (!radv_pipeline_create_ps_epilog(graphics_pipeline, pipeline_key))
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
/* Upload shader binaries. */
|
||||
|
Reference in New Issue
Block a user