Calling vkEnumerateDeviceExtensionProperties "twice" - is it required?
<p>From the <a href="https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkEnumerateDeviceExtensionProperties.html" rel="nofollow">man page for vkEnumerateDeviceExtensionProperties</a>, </p>

<blockquote>
  <p>vkEnumerateDeviceExtensionProperties retrieves properties for
  extensions on a physical device whose handle is given in
  physicalDevice. To determine the extensions implemented by a layer set
  pLayerName to point to the layer’s name and any returned extensions
  are implemented by that layer. Setting pLayerName to NULL will return
  the available non-layer extensions. pPropertyCount must be set to the
  size of the VkExtensionProperties array pointed to by pProperties. The
  pProperties should point to an array of VkExtensionProperties to be
  filled out or null. <strong>If null, vkEnumerateDeviceExtensionProperties will
  update pPropertyCount with the number of extensions found.</strong> The
  definition of VkExtensionProperties is as follows:</p>
</blockquote>

<p>(emphasis mine). It seems in the current implementation (Window SDK v1.0.13), <code>pPropertyCount</code> <em>is</em> updated with the number of extensions, regardless of whether <code>pProperties</code> is null or not. However, the documentation doesn't appear to be explicit on what happens in this situation. </p>

<p>Here's an example, of why having such a feature is 'nicer':</p>

<pre><code>const uint32_t MaxCount = 1024; // More than you'll ever need
uint32_t ActualCount = MaxCount;
VkLayerProperties layers[MaxCount];
VkResult result = vkEnumerateDeviceLayerProperties(physicalDevice, &amp;ActualCount, layers);
//...
</code></pre>

<p>vs.</p>

<pre><code>uint32_t ActualCount = 0;
VkLayerProperties* layers;
VkResult result = vkEnumerateDeviceLayerProperties(physicalDevice, &amp;ActualCount, nullptr);
if (ActualCount &gt; 0) 
{
    extensions = alloca(ActualCount * sizeof(VkLayerProperties));
    result = vkEnumerateDeviceLayerProperties(physicalDevice, &amp;ActualCount, layers);
    //...
}
</code></pre>

<p><strong>My question is:</strong> am I depending on unsupported functionality by doing this, or is this somehow advertised somewhere else in the documentation?</p>