KhronosGroup / Vulkan-Docs

The Vulkan API Specification and related tools
Other
2.76k stars 463 forks source link

The "required format tables" aren't reflected in `vk.xml` #2389

Open io7m opened 2 months ago

io7m commented 2 months ago

Currently, the tables in the Formats chapter that associate required format properties with formats are hand-written and aren't reflected in any form in vk.xml. This means that, for example, we can't reliably write tools to ask questions like "What, if any, formats are required to support usage bits X and Y"?

The markdown tables are here:

https://github.com/KhronosGroup/Vulkan-Docs/blob/main/chapters/formats.adoc#required-format-support

Note that (even though nobody should be doing this!) even the markdown is hard to parse as there are embedded ifdef statements. I've done it, and I wish I hadn't. :laughing:

io7m commented 2 months ago

@spencer-lunarg I think I'd like to see something along the lines of:

<format name="VK_FORMAT_R8_UNORM">
  <support-required bit="VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT"/>
  <support-required bit="VK_FORMAT_FEATURE_BLIT_SRC_BIT"/>
  ..
  <support-conditional bit="VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT" feature="shaderStorageImageExtendedFormats"/>
</format>

I'm not too fussed about the exact format.

spencer-lunarg commented 2 months ago

Will try to get some time soon in near future to try and mock something up in the XML and make sure we can generate the spec from it