Skip to content

Draft: vtn: stop validating caps

Alyssa Rosenzweig requested to merge alyssa/mesa:vtn/drop-spirv-caps into main

When we -- and as usual, by "we" I mean Faith -- first added SPIR-V support to Mesa, the landscape looked pretty different:

  • there were very few caps
  • there were very few drivers consuming SPIR-V
  • the VVL was young and not used universally

As such, it made a reasonable amount of sense to collect cap lists in every Vulkan driver and validate them in vtn, to help check for app bugs.

Things look different today. We now have lots of caps, lots of drivers, and a competent VVL that has the responsibility of making sure apps don't declare any caps that the underlying driver doesn't actually support.

So, rip out the validation so we can stop burdening every driver individually with this. The alternative would be to auto-generate the validation code -- and I do have patches to get Mesa most of the way there as a fallback -- but you know who else has that code? The VVL. It's not Mesa's job to validate Vulkan usage, and we're totally justified in dropping this pile of stuff.

OpenGL SPIR-V seems to me to be DOA so I'm not at all concerned about the loss of coverage there.

The one open question I have about this plan is the implications for OpenCL. That said, I'm not too worried in practice... we have just one source of in-the-wild CL-flavour SPIR-V (Rusticl), with just a few relevant caps compared to the larger number of graphics caps. If we need to for Rusticl only, we can add back just a bit of validation as a treat.

Merge request reports