tu: Ignore unused shader stages in pipeline library creation.
Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22865>
This commit is contained in:
@@ -365,14 +365,6 @@ SRGBReadWritePixels,Fail
|
||||
KHR-GL46.polygon_offset_clamp.PolygonOffsetClampMinMax,Fail
|
||||
KHR-GL46.polygon_offset_clamp.PolygonOffsetClampZeroInfinity,Fail
|
||||
dEQP-VK.pipeline.fast_linked_library.misc.interpolate_at_sample_no_sample_shading,Crash
|
||||
dEQP-VK.pipeline.fast_linked_library.misc.unused_shader_stages,Crash
|
||||
dEQP-VK.pipeline.fast_linked_library.misc.unused_shader_stages_include_geom,Crash
|
||||
dEQP-VK.pipeline.fast_linked_library.misc.unused_shader_stages_include_tess,Crash
|
||||
dEQP-VK.pipeline.fast_linked_library.misc.unused_shader_stages_include_tess_include_geom,Crash
|
||||
dEQP-VK.pipeline.pipeline_library.misc.unused_shader_stages,Crash
|
||||
dEQP-VK.pipeline.pipeline_library.misc.unused_shader_stages_include_geom,Crash
|
||||
dEQP-VK.pipeline.pipeline_library.misc.unused_shader_stages_include_tess,Crash
|
||||
dEQP-VK.pipeline.pipeline_library.misc.unused_shader_stages_include_tess_include_geom,Crash
|
||||
dEQP-VK.transform_feedback.simple.lines_or_triangles_line_strip_1,Fail
|
||||
dEQP-VK.transform_feedback.simple.lines_or_triangles_line_strip_3,Fail
|
||||
dEQP-VK.transform_feedback.simple.lines_or_triangles_triangle_strip_1,Fail
|
||||
|
||||
@@ -375,19 +375,10 @@ spec@!opengl 1.1@line-smooth-stipple,Fail
|
||||
|
||||
# New CTS failures in 1.3.5.0
|
||||
dEQP-VK.pipeline.fast_linked_library.misc.interpolate_at_sample_no_sample_shading,Crash
|
||||
dEQP-VK.pipeline.fast_linked_library.misc.unused_shader_stages_include_geom,Crash
|
||||
dEQP-VK.pipeline.fast_linked_library.misc.unused_shader_stages_include_tess_include_geom,Crash
|
||||
dEQP-VK.pipeline.fast_linked_library.misc.unused_shader_stages_include_tess,Crash
|
||||
dEQP-VK.pipeline.fast_linked_library.misc.unused_shader_stages,Crash
|
||||
dEQP-VK.pipeline.pipeline_library.misc.unused_shader_stages_include_geom,Crash
|
||||
dEQP-VK.pipeline.pipeline_library.misc.unused_shader_stages_include_tess_include_geom,Crash
|
||||
dEQP-VK.pipeline.pipeline_library.misc.unused_shader_stages_include_tess,Crash
|
||||
dEQP-VK.pipeline.pipeline_library.misc.unused_shader_stages,Crash
|
||||
dEQP-VK.transform_feedback.simple.lines_or_triangles_line_strip_1,Fail
|
||||
dEQP-VK.transform_feedback.simple.lines_or_triangles_line_strip_3,Fail
|
||||
dEQP-VK.transform_feedback.simple.lines_or_triangles_triangle_strip_1,Fail
|
||||
dEQP-VK.transform_feedback.simple.lines_or_triangles_triangle_strip_3,Fail
|
||||
gmem-dEQP-VK.pipeline.fast_linked_library.misc.unused_shader_stages_include_geom,Crash
|
||||
gmem-dEQP-VK.transform_feedback.simple.lines_or_triangles_triangle_strip_1,Fail
|
||||
spec@arb_vertex_attrib_64bit@execution@unused-sub-dvec4-01,Crash
|
||||
spec@arb_vertex_attrib_64bit@execution@unused-sub-dvec4-02,Crash
|
||||
|
||||
@@ -3140,6 +3140,9 @@ tu_pipeline_builder_compile_shaders(struct tu_pipeline_builder *builder,
|
||||
bool must_compile =
|
||||
builder->state & VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT;
|
||||
for (uint32_t i = 0; i < builder->create_info->stageCount; i++) {
|
||||
if (!(builder->active_stages & builder->create_info->pStages[i].stage))
|
||||
continue;
|
||||
|
||||
gl_shader_stage stage =
|
||||
vk_to_mesa_shader_stage(builder->create_info->pStages[i].stage);
|
||||
stage_infos[stage] = &builder->create_info->pStages[i];
|
||||
@@ -4851,6 +4854,24 @@ tu_pipeline_finish(struct tu_pipeline *pipeline,
|
||||
ralloc_free(pipeline->executables_mem_ctx);
|
||||
}
|
||||
|
||||
static VkGraphicsPipelineLibraryFlagBitsEXT
|
||||
vk_shader_stage_to_pipeline_library_flags(VkShaderStageFlagBits stage)
|
||||
{
|
||||
assert(util_bitcount(stage) == 1);
|
||||
switch (stage) {
|
||||
case VK_SHADER_STAGE_VERTEX_BIT:
|
||||
case VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT:
|
||||
case VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT:
|
||||
case VK_SHADER_STAGE_GEOMETRY_BIT:
|
||||
case VK_SHADER_STAGE_TASK_BIT_EXT:
|
||||
case VK_SHADER_STAGE_MESH_BIT_EXT:
|
||||
return VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT;
|
||||
case VK_SHADER_STAGE_FRAGMENT_BIT:
|
||||
return VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT;
|
||||
default:
|
||||
unreachable("Invalid shader stage");
|
||||
}
|
||||
}
|
||||
|
||||
static VkResult
|
||||
tu_pipeline_builder_build(struct tu_pipeline_builder *builder,
|
||||
@@ -4872,7 +4893,13 @@ tu_pipeline_builder_build(struct tu_pipeline_builder *builder,
|
||||
|
||||
VkShaderStageFlags stages = 0;
|
||||
for (unsigned i = 0; i < builder->create_info->stageCount; i++) {
|
||||
stages |= builder->create_info->pStages[i].stage;
|
||||
VkShaderStageFlagBits stage = builder->create_info->pStages[i].stage;
|
||||
|
||||
/* Ignore shader stages that don't need to be imported. */
|
||||
if (!(vk_shader_stage_to_pipeline_library_flags(stage) & builder->state))
|
||||
continue;
|
||||
|
||||
stages |= stage;
|
||||
}
|
||||
builder->active_stages = stages;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user