tu: Fix re-emitting VS param state after it is re-enabled

We need to always re-emit it if it was disabled. Fixes vertex/instance
offset in a direct draw after an indirect draw.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26148>
This commit is contained in:
Connor Abbott 2023-11-10 18:03:08 +01:00 committed by Marge Bot
parent aba00ff391
commit 6be6b4ca71
3 changed files with 3 additions and 4 deletions

View file

@ -610,7 +610,6 @@ dEQP-VK.transform_feedback.primitives_generated_query.concurrent.pipeline_statis
dEQP-VK.transform_feedback.primitives_generated_query.concurrent.pipeline_statistics_3.pgq_32bit_xfb_64bit.triangle_strip.indirect,Fail
dEQP-VK.transform_feedback.primitives_generated_query.concurrent.pipeline_statistics_3.pgq_64bit_xfb_32bit.point_list.draw,Fail
dEQP-VK.transform_feedback.primitives_generated_query.concurrent.pipeline_statistics_3.pgq_64bit_xfb_32bit.triangle_list_with_adjacency.indirect,Fail
dEQP-VK.transform_feedback.simple.backward_dependency_indirect_endqueryindexed_streamid_0,Fail
dynamic-dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d24_unorm_s8_uint.compatibility_depth_zero_stencil_zero_testing_stencil,Fail
gmem-dEQP-VK.glsl.derivate.dfdy.dynamic_loop.vec4_mediump,Crash
gmem-dEQP-VK.transform_feedback.primitives_generated_query.concurrent.pipeline_statistics_1.32bit.triangle_fan.draw,Fail

View file

@ -93,8 +93,6 @@ dEQP-VK.transform_feedback.primitives_generated_query.concurrent.pipeline_statis
dEQP-VK.transform_feedback.primitives_generated_query.concurrent.pipeline_statistics_3.pgq_64bit_xfb_32bit.triangle_strip.indirect,Fail
dEQP-VK.transform_feedback.primitives_generated_query.concurrent.pipeline_statistics_3.pgq_64bit_xfb_32bit.triangle_strip_with_adjacency.draw,Fail
dEQP-VK.transform_feedback.primitives_generated_query.concurrent.pipeline_statistics_3.pgq_64bit_xfb_32bit.triangle_strip_with_adjacency.indirect,Fail
dEQP-VK.transform_feedback.simple.backward_dependency_indirect_beginqueryindexed_streamid_0,Fail
dEQP-VK.transform_feedback.simple.backward_dependency_indirect_no_offset_array,Fail
gmem-dEQP-VK.dynamic_rendering.complete_secondary_cmd_buff.suballocation.load_store_op_none.depthstencil_d32_sfloat_s8_uint_load_op_depth_load_stencil_none_store_op_depth_store_stencil_none_stencil_write_off,Fail
gmem-dEQP-VK.subgroups.vote.frag_helper.subgroupallequal_ivec2_fragment,Fail
gmem-dEQP-VK.transform_feedback.primitives_generated_query.concurrent.pipeline_statistics_1.32bit.triangle_fan.draw,Fail

View file

@ -4985,10 +4985,12 @@ tu6_emit_vs_params(struct tu_cmd_buffer *cmd,
uint32_t offset = vs_params_offset(cmd);
/* Beside re-emitting params when they are changed, we should re-emit
* them after constants are invalidated via HLSQ_INVALIDATE_CMD.
* them after constants are invalidated via HLSQ_INVALIDATE_CMD or after we
* emit an empty vs params.
*/
if (!(cmd->state.dirty & (TU_CMD_DIRTY_DRAW_STATE | TU_CMD_DIRTY_VS_PARAMS |
TU_CMD_DIRTY_PROGRAM)) &&
cmd->state.vs_params.iova &&
(offset == 0 || draw_id == cmd->state.last_vs_params.draw_id) &&
vertex_offset == cmd->state.last_vs_params.vertex_offset &&
first_instance == cmd->state.last_vs_params.first_instance) {