Skip to content

Draft: r300: report linking problem when shaders require dynamic loop

Filip Gawin requested to merge gawin/mesa:r300/skip_dynamic_loops_new into main

As dynamic loops are a feature which can not be emulated in driver (like derivatives) and usually gles2 has low requirements in main spec, I've started digging. I've found in spec that:

In general, control flow is limited to forward branching and to loops where the maximum number of iterations can easily be determined at compile time.

https://www.khronos.org/files/opengles_shading_language.pdf

Later I've got answer from Emma that indeed it's optional and we need to throw error when linking. (Test are gonna be skipped.)

This patch in current form (v1) is port of !12218 (merged) and skips 300 tests. (No new fixes.)

Todo:

  • verify if added NIR passes are useful
  • check if we do really need PIPE_CAP_TGSI_TEXCOORD
  • checks for r500
  • cleanup

As always any suggestion is appreciated.

@ondracka

Merge request reports