Jon Leech 52d809dd04 Change log for October 13, 2017 Vulkan 1.0.63 spec update:
* Bump API patch number and header version number to 63 for this update.

Github Issues:

  * Add missing valid usage statements for ptext:maxDescriptorSets*,
    ptext:maxPerStageDescriptorInputAttachments, and
    ptext:maxPerStageResources to slink:VkPipelineLayoutCreateInfo.txt,
    flink:VkComputePipelineCreateInfo, and
    flink:VkGraphicsPipelineCreateInfo (public issue 546).
  * Fix typos in ftext:vkCmdDraw*AMD descriptions (public pull request 549).
  * Fixed flink:vkCmdWriteTimestamp so it is not unnecessarily restricted to
    queues supporting graphics or compute operations (public issue 558).
  * Improvements to valid usage generator for output `*Flags` pointer
    parameters and for some `void *` parameters (public pull requests 560,
    562).
  * Document `altlen` attribute in XML schema as valid C99 syntax and tweak
    `vk.xml` to match (public pull request 566).
  * Clarify when pname:fence is signaled by flink:vkQueueSubmit in a more
    obvious place (public issue 577).

Internal Issues:

  * Specify a whitelist of supported SPIR-V Storage Classes in the
    <<spirvenv-module-validation, Validation Rules within a Module>>
    appendix (internal SPIR-V issue 166).
  * Relax the shared semaphore wait timeout requirement in the
    <<synchronization-semaphores-importing, Importing Semaphore Payloads>>
    section (internal issue 820).
  * Update the <<textures-image-level-selection, Image Level(s) Selection>>
    equations so that the parameters returned by the level-of-detail query
    appear explicitly, also fixing the issue that linear filtering would
    select a level below the base level for magnification (internal issue
    926).
  * Disallow creation of a swapchain with zero pname:imageExtent in
    slink:VkSurfaceCapabilitiesKHR and slink:VkSwapchainCreateInfoKHR
    (internal issue 1020).

Other Issues:

  * Clarify in <<textures-operation-validation,Image View Validation>> that
    the layout of subresources in an image view must have a layout that
    matches that written into the descriptor, and that this section is about
    validating image views, not images.

New Extensions:

  * `VK_EXT_global_priority`
2017-10-12 19:57:47 -07:00
..
2017-10-13 00:36:41 +02:00

= Vulkan^(R)^ API Registry Build Instructions and Notes =

Jon Leech

* <<intro,Introduction>>
* <<files,Files>>
* <<targets,Makefile Targets>>
* <<linux,Linux Software Dependencies>>
* <<windows,Windows Software Dependencies>>
* <<history,Revision History>>


[[intro]]
== Introduction ==

This is the Vulkan XML API Registry. It is used to generate the canonical
vulkan.h and the API Asciidoc include files used by the Vulkan Specification
and Reference Pages.

When changes to the header or the includes are needed, follow this workflow.
Normally changes are done only when defining a new extension, or when adding
missing validity language to existing APIs.

* Create a git branch to work in locally
* Edit vk.xml
* `make ; make test`
** This generates `../vulkan/vulkan.h` and `../ext_loader/vulkan_ext.[ch]`
* `(cd ../../doc/specs/vulkan && make generated)`
** This generates asciidoc includes for the spec. There are many ways to
   invoke the Makefile in the spec directory; this simple recipe only
   generates includes for the core Vulkan API without any extensions.
* Repeat until the header and/or includes are correct.
* Commit your changes to your local git branch, push to the Khronos git
  server, and create a merge request against the specification branch
  ("1.0") or other appropriate target.

For a detailed description of the schema, go to `../../doc/specs/vulkan` and
`make registry_doc`, which generates $(OUTDIR)/registry.html. This includes
some examples of how to make simple changes in the API via the XML.

The generator scripts are written in Python 3, using the etree package for
processing XML.


[[files]]
== Files ==

* Makefile - generates header and asciidoc includes from XML (see
  <<targets,Makefile Targets>> below).
* vk.xml - XML API description.
* genvk.py - Python script to generate vulkan.h and other targets.
* readme.txt - Source for detailed description of the XML schema.
* registry.rnc - RelaxNG compact schema for validating XML against the
  schema.
* reg.py - Python tools to read XML file and convert it into C headers.
* generator.py - output generator base class.
** cgenerator.py - C header output generator.
** docgenerator.py - Asciidoc interface language include generator.
** hostsyncgenerator.py - Asciidoc host sync table generator.
** pygenerator.py - Generates python encoding of the API description.
** validitygenerator.py - Asciidoc validity language generator.
* ../vulkan/vulkan.h - Generated Vulkan header.
* indexExt.py - generate HTML index of all extensions for inclusion into the
  Vulkan registry index page.
* extDependency.py - generate extension dependencies in Bash and Python form
  for use when building the specification.

[[targets]]
== Makefile Targets ==

* `install` or `../vulkan/vulkan.h` (default target) - regenerate
  `../vulkan/vulkan.h` .
* `test` - make sure `../vulkan/vulkan.h` compiles. Important!
* `validate` - validate `vk.xml` against the schema. Requires installing
  `jing` (see <<linux,Software Dependencies>> below). Also important!
* `clean_dirt` - remove intermediate files.
* `clean` - remove generated files. Usually done when preparing to merge to
  1.0 via ```make clean ; make install```.

If you have trouble running the Makefile on your platform, the following
steps will build vulkan.h and test that it compiles:

[source,sh]
----
# Regenerate header from XML
python3 genvk.py ../vulkan/vulkan.h
# Verify that the resulting header compiles
gcc -Wall -c -I.. test.c
g++ -Wall -c -std=c++98 -I.. test.c
g++ -Wall -c -std=c++11 -I.. test.c
----


[[linux]]
== Linux Software Depencies ==

These are the versions of required tools in a Debian 8 development
environment. Earlier versions *may* work but unless they are verified by
someone else, there's no way to know that:

* Python 3 (`python3`, version: 3.4.2)
* pass:[g++] and gcc (`g++-4.9` / `gcc-4.9`, version: 4.9.2-10 - gcc 4.8
  also reported to work)
* GNU make (`make` version: 4.0.8-1; older versions probably OK)
* Jing (`jing` version: 20131210+dfsg+1-1; needed only for optional XML
  validation)


[[windows]]
== Windows Software Dependencies ==

Using the Windows 10 Ubuntu subsystem, if available, is probably the most
pleasant way of building. Cygwin64 is also a viable approach.

On native Windows without a Linux emulation environment, one way to build on
Windows is:

* Install python (32-bit works great): https://www.python.org/downloads/
* Ensure the pip module is installed (should be by default)
* Run the genvk.py script in C:\PathToVulkan\src\specfile
** ```C:\PathToPython\python3.exe genvk.py vulkan.h```


[[history]]
== Revision History ==

* 2015/06/01 -
  The header that is generated has been improved relative to the first
  version. Function arguments are indented like the hand-generated header,
  enumerant BEGIN/END_RANGE enums are named the same, etc. The ordering of
  declarations is unlike the hand-generated header, and probably always
  will because it results from a type/enum/function dependency analysis.
  Some of this can be forced by being more explicit about it, if that is a
  big deal.
* 2015/06/02 -
  Per WG signoff, converted hex constant values to decimal (for
  non-bitmasks) and VK_BIT macros to 'bitpos' attributes in the XML and
  hex constants in the header. Updated schema to match. Changed <ptype> tag
  to <type>.
* 2015/06/03 -
  Moved into new 'vulkan' tree (did not bother preserving history in
  previous repo). Added semantic knowledge about structs and unions to
  <type> tags instead of just imbedding C struct definitions. Improved
  registry.rnc schema a bit.
* 2015/06/07 -
  Incorporate feedback from F2F including Python 3 and Windows fixes to
  the scripts. Add documentation to readme.pdf. Fold in multiple merge
  requests resulting from action items agreed at the F2F, to prepare
  for everyone moving to XML instead of directly editing the header.
* 2015/06/20 -
  Add vulkan-docs target and instructions for installing python3 and
  python-lxml for Windows.
* 2015/08/13 -
  Bring documentation up to date with Makefile targets (default is now
  ../include/vulkan.h).
* 2015/09/02 -
  Update README with required (or known working) versions of toolchain
  components.
* 2015/09/02 -
  Move include/vulkan.h to vulkan/vulkan.h so #include "vulkan/vulkan.h"
  is the normal usage (Bug 14576).
* 2016/02/12 -
  Update README and remove old files to stage for public release.
* 2016/05/31 -
  Remove dependency on lxml.
* 2016/07/27 -
  Update documentation for changes to schema and generator scripts.
* 2016/08/26 -
  Move README to an asciidoc file and update for the single-branch model.
  Use 'clean' target to remove generated files in both spec source and
  registry Makefiles.
* 2017/02/20 -
  Move registry.txt (schema documentation) to the Vulkan spec source
  directory and update the README here.