KhronosGroup / Vulkan-Portability

Apache License 2.0
40 stars 4 forks source link

Required Vulkan Spec Documentation Modifications #24

Open billhollings opened 3 years ago

billhollings commented 3 years ago

This is a list of Vulkan modifications for portability that can be accomplished through changes to the Vulkan spec documentation, without requiring the need for additional feature flags or values. Typically, this applies to the loosening of required features or formats, or of required numerical limits.

Vulkan spec wording and VU's would be adjusted to include wording similar to:

If the VK_KHR_portability_subset extension is enabled, this feature/format is not required.

If the VK_KHR_portability_subset extension is enabled, the required limit is nnnn.

Such changes also require changes to the appropriate CTS test in order to apply the adjusted requirements. In each entry here, the CTS Tests Affected is listed for investigative purposes. A single issue may actually affect multiple CTS tests, and all may not be listed here if the expectation is that fixing one should fix them all.

Description Vulkan spec Portability spec CTS Tests Affected Status
VkPhysicalDeviceLimits:: maxSamplerAllocationCount Min 4000 required 1024 dEQP-VK.info.device_properties
VK_FORMAT_B4G4R4A4_UNORM_PACK16
VK_FORMAT_R5G6B5_UNORM_PACK16
VK_FORMAT_A1R5G5B5_UNORM_PACK16
Requires minimal VkFormatFeatureFlags Not required dEQP-VK.api.info.format_properties.b4g4r4a4_unorm_pack16
dEQP-VK.api.info.format_properties.r5g6b5_unorm_pack16
dEQP-VK.api.info.format_properties.a1r5g5b5_unorm_pack16
dEQP-VK.texture.explicit_lod.2d.formats.b4g4r4a4_unorm_pack16_nearest
dEQP-VK.texture.explicit_lod.2d.formats.b4g4r4a4_unorm_pack16_linear
VK_FORMAT_R32_UINT
VK_FORMAT_R32_SINT
VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT required in optimalTilingFeatures Not required dEQP-VK.api.info.format_properties.r32_uint
dEQP-VK.api.info.format_properties.r32_sint
On some platforms, primitive restart cannot always be disabled VkPipelineInputAssemblyStateCreateInfo.primitiveRestartEnable and vkCmdSetPrimitiveRestartEnableEXT() can be set to VK_FALSE VkPipelineInputAssemblyStateCreateInfo.primitiveRestartEnable and vkCmdSetPrimitiveRestartEnableEXT() must always be set to VK_TRUE None. All CTS primitive restart tests only test enabling.
VkVertexInputBindingDescription::stride must be a multiple of 4 VkVertexInputBindingDescription::stride can be any value VkVertexInputBindingDescription::stride must be a multiple of 4 (see also #30 re zero value) CTS tests currently using VkPhysicalDevicePortabilitySubsetPropertiesKHR::minVertexInputBindingStrideAlignment should macro-define a fixed value (currently known to be 4) .
Vulkan prohibits multiViewport without geometry shaders but Metal does not (see #23) multiViewport prohibited without geometry shaders multiViewport allowed for other uses without geometry shaders in main spec, with or without VK_KHR_portability subset dEQP-VK.info.device_features
billhollings commented 2 years ago

Need to submit these spec changes to the WG.

lexaknyazev commented 2 years ago

VkPipelineInputAssemblyStateCreateInfo.primitiveRestartEnable and vkCmdSetPrimitiveRestartEnableEXT() must always be set to VK_TRUE.

This should say

... must always be set to VK_TRUE for triangle strip and line strip topology types.

billhollings commented 2 years ago

... must always be set to VK_TRUE for triangle strip and line strip topology types.

I didn't include this, because the spec includes the following, which would be disabled:

Primitive restart is not allowed for “list” topologies, unless one of the features primitiveTopologyPatchListRestart (for VK_PRIMITIVE_TOPOLOGY_PATCH_LIST) or primitiveTopologyListRestart (for all other list topologies) is enabled.

However, I guess the extra clarifying text doesn't hurt.