nested mme_while leads to failing cts cases
When trying some things with the mme I found something that I do not understand regarding nested loops and whiles.
@jekstrand confirmed on irc that nested loops does not work but whiles do. I also wrote a small unit test with two nested whiles that passes. There should not be a problem.
However this was not what I observed when trying things in the drawing code.
One example is for indirect indexed draws. Here nvk_mme_draw_indexed_indirect()
uses a mme_while
over draw_count
. In this while
it calls nvk_mme_build_draw_indexed()
. This function does a mme_loop
over instance_count
. CTS tests pass. Switching between loop and while in the two functions resulted in:
nvk_mme_draw_indexed_indirect | nvk_mme_build_draw_indexed | CTS |
---|---|---|
Loop | While | Pass |
Loop | Loop | Fail |
While | Loop | Pass |
While | While | Fail |
Why using while in both functions would make the CTS fail I do not understand. I have tried to debug this but I cannot find the answer.
Several cts cases are affected. In this specific setup I was testing dEQP-VK.draw.renderpass.indirect_draw.indexed_data_from_compute.indirect_draw_instanced*