rayanht/SPIRVSmith

SPIRVSmith occasionally generates forward references

rayanht opened this issue · 1 comments

Describe the bug
SPIRVSmith sometimes generates decorations for instructions that seemingly do not exist. This creates forward references which in turn fail the SPIR-V validator stage.

To Reproduce
N/A

Expected behavior
No forward references should be generated.

Artifacts (Amber file, SPIR-V assembly file...)
Refer to the following generated shaders:

  • 86nykCkbnQbbAkMZQL5XQz
  • iT4bBEigfyskHRTuHpXyU2
  • LFQVWfcJk6N3GDts93JZko
  • UvM8NCmCGLU9dvWu5njd2R

Additional context
This doesn't happen too often (~10% incidence rate according to logs) but it's a very low-hanging fruit to increase our generation throughput.

image

Fixed