mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
anv: do not get rid of empty/useless fragment shaders
This was an optimization done a while ago that doesn't seem to be having much of an impact anymore, and on the other hand, causes all sorts of breakage with queries, as many of our HW counters don't get incremented when rasterization is disabled. This fixes a bunch of issues Zink has with ANV, but more importantly, it fixes upcoming CTS tests: dEQP-VK.transform_feedback.primitives_generated_query.*.empty_frag.* dEQP-VK.transform_feedback.primitives_generated_query.*.no_attachment.* dEQP-VK.transform_feedback.primitives_generated_query.*.color_write_disable_* Cc: mesa-stable Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17038>
This commit is contained in:
parent
10f6191fb5
commit
4666ef720e
2 changed files with 0 additions and 70 deletions
|
|
@ -1,32 +1,2 @@
|
|||
# 6205
|
||||
KHR-GL46.geometry_shader.primitive_queries.primitive_queries_lines,Fail
|
||||
KHR-GL46.geometry_shader.primitive_queries.primitive_queries_points,Fail
|
||||
KHR-GL46.geometry_shader.primitive_queries.primitive_queries_triangles,Fail
|
||||
KHR-GL46.tessellation_shader.single.xfb_captures_data_from_correct_stage,Fail
|
||||
|
||||
KHR-GL46.tessellation_shader.tessellation_control_to_tessellation_evaluation.data_pass_through,Fail
|
||||
KHR-GL46.tessellation_shader.tessellation_control_to_tessellation_evaluation.gl_MaxPatchVertices_Position_PointSize,Fail
|
||||
KHR-GL46.tessellation_shader.tessellation_control_to_tessellation_evaluation.gl_tessLevel,Fail
|
||||
KHR-GL46.tessellation_shader.tessellation_invariance.invariance_rule1,Fail
|
||||
KHR-GL46.tessellation_shader.tessellation_invariance.invariance_rule2,Fail
|
||||
KHR-GL46.tessellation_shader.tessellation_invariance.invariance_rule3,Fail
|
||||
KHR-GL46.tessellation_shader.tessellation_invariance.invariance_rule4,Fail
|
||||
KHR-GL46.tessellation_shader.tessellation_invariance.invariance_rule5,Fail
|
||||
KHR-GL46.tessellation_shader.tessellation_invariance.invariance_rule6,Fail
|
||||
KHR-GL46.tessellation_shader.tessellation_invariance.invariance_rule7,Fail
|
||||
KHR-GL46.tessellation_shader.tessellation_shader_point_mode.points_verification,Fail
|
||||
KHR-GL46.tessellation_shader.tessellation_shader_quads_tessellation.degenerate_case,Fail
|
||||
KHR-GL46.tessellation_shader.tessellation_shader_quads_tessellation.inner_tessellation_level_rounding,Fail
|
||||
KHR-GL46.tessellation_shader.tessellation_shader_tessellation.TCS_TES,Fail
|
||||
KHR-GL46.tessellation_shader.tessellation_shader_tessellation.TES,Fail
|
||||
KHR-GL46.tessellation_shader.tessellation_shader_tessellation.gl_InvocationID_PatchVerticesIn_PrimitiveID,Fail
|
||||
KHR-GL46.tessellation_shader.tessellation_shader_triangles_tessellation.identical_triangles,Fail
|
||||
KHR-GL46.tessellation_shader.tessellation_shader_triangles_tessellation.inner_tessellation_level_rounding,Fail
|
||||
KHR-GL46.tessellation_shader.vertex.vertex_ordering,Fail
|
||||
KHR-GL46.tessellation_shader.vertex.vertex_spacing,Fail
|
||||
KHR-GL46.transform_feedback_overflow_query_ARB.advanced-single-stream-interleaved-attribs,Fail
|
||||
KHR-GL46.transform_feedback_overflow_query_ARB.advanced-single-stream-separate-attribs,Fail
|
||||
KHR-GL46.transform_feedback_overflow_query_ARB.basic-single-stream-interleaved-attribs,Fail
|
||||
KHR-GL46.transform_feedback_overflow_query_ARB.basic-single-stream-separate-attribs,Fail
|
||||
KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-multiple-buffers-per-stream,Fail
|
||||
KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-one-buffer-per-stream,Fail
|
||||
|
|
|
|||
|
|
@ -1847,46 +1847,6 @@ anv_pipeline_compile_graphics(struct anv_graphics_pipeline *pipeline,
|
|||
|
||||
done:
|
||||
|
||||
if (pipeline->shaders[MESA_SHADER_FRAGMENT] != NULL) {
|
||||
struct anv_shader_bin *fs = pipeline->shaders[MESA_SHADER_FRAGMENT];
|
||||
const struct brw_wm_prog_data *wm_prog_data =
|
||||
brw_wm_prog_data_const(fs->prog_data);
|
||||
|
||||
if (wm_prog_data->color_outputs_written == 0 &&
|
||||
!wm_prog_data->has_side_effects &&
|
||||
!wm_prog_data->uses_omask &&
|
||||
!wm_prog_data->uses_kill &&
|
||||
wm_prog_data->computed_depth_mode == BRW_PSCDEPTH_OFF &&
|
||||
!wm_prog_data->computed_stencil &&
|
||||
fs->xfb_info == NULL) {
|
||||
/* This can happen if we decided to implicitly disable the fragment
|
||||
* shader. See anv_pipeline_compile_fs().
|
||||
*/
|
||||
anv_shader_bin_unref(pipeline->base.device, fs);
|
||||
pipeline->shaders[MESA_SHADER_FRAGMENT] = NULL;
|
||||
pipeline->active_stages &= ~VK_SHADER_STAGE_FRAGMENT_BIT;
|
||||
|
||||
/* The per-SIMD size fragment shaders should be last in the
|
||||
* executables array. Remove all of them.
|
||||
*/
|
||||
ASSERTED unsigned removed = 0;
|
||||
|
||||
util_dynarray_foreach_reverse(&pipeline->base.executables,
|
||||
struct anv_pipeline_executable,
|
||||
tail) {
|
||||
/* There must be at least one fragment shader. */
|
||||
assert(removed > 0 || tail->stage == MESA_SHADER_FRAGMENT);
|
||||
|
||||
if (tail->stage != MESA_SHADER_FRAGMENT)
|
||||
break;
|
||||
|
||||
(void) util_dynarray_pop(&pipeline->base.executables,
|
||||
struct anv_pipeline_executable);
|
||||
removed++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pipeline_feedback.duration = os_time_get_nano() - pipeline_start;
|
||||
|
||||
const VkPipelineCreationFeedbackCreateInfo *create_feedback =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue