diff --git a/ChangeLog.txt b/ChangeLog.txt index 76d49315..a2526084 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -8,6 +8,49 @@ public pull requests that have been accepted. ----------------------------------------------------- +Change log for July 28, 2019 Vulkan 1.1.117 spec update: + + * Update release number to 117. + +Github Issues: + + * Add ename:VK_STENCIL_FACE_FRONT_AND_BACK for naming consistency, and + alias the old ename:VK_STENCIL_FRONT_AND_BACK for backwards + compatibility (public issue 991). + * Fix minor issues with valid usage statements for + flink:vkCreateFramebuffer, slink:VkFramebufferCreateInfo, and + slink:VkRenderPassBeginInfo when the `<>` + extension is enabled (public issue 998). + * Clarify the subpass dependency requirement in the + <> section to eliminate the need for a + subpass dependency for either the same or different layouts as long as + they're both read-only (relates to + https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/948). + +Internal Issues: + + * Document that <> as part of promoting an + extension (internal issue 1677). + * Update VK_ANDROID_native_buffer extension to spec version 8 (internal + issue 1753). + * Add missing section to the <> extension appendix describing + the reason for the breaking API change in version 4 of the extension, + and correct the version to 4 in `vk.xml` (internal merge request + 3275). + * Add valid usage statements to slink:VkAccelerationStructureInfoNV + requiring the ename:VK_BUFFER_USAGE_RAY_TRACING_BIT_NV usage flag for + buffers used in acceleration structure building. + +New Extensions: + + * `<>` + * `<>` + * `<>` + +----------------------------------------------------- + Change log for July 20, 2019 Vulkan 1.1.116 spec update: * Happy 50th Lunar Landing Day! diff --git a/Makefile b/Makefile index 9f9a6fd5..0ce70fa8 100644 --- a/Makefile +++ b/Makefile @@ -121,7 +121,7 @@ VERBOSE = # ADOCOPTS options for asciidoc->HTML5 output NOTEOPTS = -a editing-notes -a implementation-guide -PATCHVERSION = 116 +PATCHVERSION = 117 ifneq (,$(findstring VK_VERSION_1_1,$(VERSIONS))) SPECREVISION = 1.1.$(PATCHVERSION) else diff --git a/appendices/VK_EXT_index_type_uint8.txt b/appendices/VK_EXT_index_type_uint8.txt new file mode 100644 index 00000000..0d41b7b1 --- /dev/null +++ b/appendices/VK_EXT_index_type_uint8.txt @@ -0,0 +1,52 @@ +include::meta/VK_EXT_index_type_uint8.txt[] + +*Last Modified Date*:: + 2019-05-02 +*IP Status*:: + No known IP claims. +*Contributors*:: + - Jeff Bolz, NVIDIA + +This extension allows uint8_t indices to be used with +flink:vkCmdBindIndexBuffer. + +=== New Object Types + +None + +=== New Enum Constants + + * Extending elink:VkStructureType: + ** ename:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT + + * Extending elink:VkIndexType: + ** ename:VK_INDEX_TYPE_UINT8_EXT + +=== New Enums + +None + +=== New Structures + + * slink:VkPhysicalDeviceIndexTypeUint8FeaturesEXT + +=== New Functions + +None + +=== New Built-In Variables + +None + +=== New SPIR-V Capabilities + +None + +=== Issues + +None + +=== Version History + + * Revision 1, 2019-05-02 (Piers Daniell) + - Internal revisions diff --git a/appendices/VK_EXT_line_rasterization.txt b/appendices/VK_EXT_line_rasterization.txt new file mode 100644 index 00000000..5e10865f --- /dev/null +++ b/appendices/VK_EXT_line_rasterization.txt @@ -0,0 +1,55 @@ +include::meta/VK_EXT_line_rasterization.txt[] + +*Last Modified Date*:: + 2019-05-09 +*IP Status*:: + No known IP claims. +*Contributors*:: + - Jeff Bolz, NVIDIA + - Allen Jensen, NVIDIA + - Jason Ekstrand, Intel + +This extension adds some line rasterization features that are commonly used +in CAD applications and supported in other APIs like OpenGL. +Bresenham-style line rasterization is supported, smooth rectangular lines +(coverage to alpha) are supported, and stippled lines are supported for all +three line rasterization modes. + +=== New Enum Constants + + * Extending elink:VkStructureType: + ** ename:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT + ** ename:VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT + + * Extending elink:VkDynamicState: + ** ename:VK_DYNAMIC_STATE_LINE_STIPPLE_EXT + +=== New Enums + + * elink:VkLineRasterizationModeEXT + +=== New Structures + + * slink:VkPhysicalDeviceLineRasterizationFeaturesEXT + * slink:VkPipelineRasterizationLineStateCreateInfoEXT + +=== New Functions + + * flink:vkCmdSetLineStippleEXT + +=== Issues + + (1) Do we need to support Bresenham-style and smooth lines with more than + one rasterization sample? i.e. the equivalent of + glDisable(GL_MULTISAMPLE) in OpenGL when the framebuffer has more than + one sample? + + RESOLVED: Yes. + For simplicity, Bresenham line rasterization carries forward a few + restrictions from OpenGL, such as not supporting per-sample shading, alpha + to coverage, or alpha to one. + +=== Version History + + * Revision 1, 2019-05-09 (Jeff Bolz) + - Initial draft diff --git a/appendices/VK_EXT_texture_compression_astc_hdr.txt b/appendices/VK_EXT_texture_compression_astc_hdr.txt new file mode 100644 index 00000000..a847a84f --- /dev/null +++ b/appendices/VK_EXT_texture_compression_astc_hdr.txt @@ -0,0 +1,87 @@ +include::meta/VK_EXT_texture_compression_astc_hdr.txt[] + +*Last Modified Date*:: + 2019-05-28 +*IP Status*:: + No known issues. +*Contributors*:: + - Jan-Harald Fredriksen, Arm + +This extension adds support for textures compressed using the Adaptive +Scalable Texture Compression (ASTC) High Dynamic Range (HDR) profile. + +When this extension is enabled, the HDR profile is supported for all ASTC +formats listed in <>. + +=== New Object Types + +None. + +=== New Enum Constants + + * Extending elink:VkStructureType: + ** ename:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT + + * Extending elink:VkFormat: + ** ename:VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT + +=== New Enums + +None. + +=== New Structures + + * slink:VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT + +=== New Functions + +None. + +=== Issues + +1) Should we add a feature or limit for this functionality? + +Yes. +It is consistent with the ASTC LDR support to add a feature like +textureCompressionASTC_HDR. + +The feature is strictly speaking redundant as long as this is just an +extension; it would be be sufficient to just enable the extension. +But adding the feature is more forward-looking if wanted to make this an +optional core feature in the future. + +2) Should we introduce new format enums for HDR? + +Yes. +Vulkan 1.0 describes the ASTC format enums as UNORM, e.g. +VK_FORMAT_ASTC_4x4_UNORM_BLOCK, so it's confusing to make these contain HDR +data. +Note that the OpenGL (ES) extensions did not make this distinction because a +single ASTC HDR texture may contain both unorm and float blocks. +Implementations may: not be able to distinguish between LDR and HDR ASTC +textures internally and just treat them as the same format, i.e. if this +extension is supported then sampling from an +ename:VK_FORMAT_ASTC_4x4_UNORM_BLOCK image format may: return HDR results. +Applications can: get predictable results by using the appropriate image +format. + + +=== Version History + + * Revision 1, 2019-05-28 (Jan-Harald Fredriksen) + - Initial version + diff --git a/appendices/VK_KHR_shader_float_controls.txt b/appendices/VK_KHR_shader_float_controls.txt index 2912a63d..d68fd133 100644 --- a/appendices/VK_KHR_shader_float_controls.txt +++ b/appendices/VK_KHR_shader_float_controls.txt @@ -92,8 +92,41 @@ instructions. *RESOLVED*: These instructions must always accurately detect inf/nan if it is passed to them. +[[VK_KHR_shader_controls_v4_incompatibility]] +=== Version 4 API incompatiblity + +The original versions of VK_KHR_shader_controls shipped with booleans named +"separateDenormSettings" and "separateRoundingModeSettings", which at first +glance could've indicated "they can all independently set, or not". +However the spec language as written indicated that the 32-bit value could +always be set independently, and only the 16- and 64-bit controls needed to +be the same if these values were VK_FALSE. + +As a result of this slight disparity, and lack of test coverage for this +facet of the extension, we ended up with two different behaviors in the +wild, where some implementations worked as written, and others worked based +on the naming. +As these are hard limits in hardware with reasons for exposure as written, +it was not possible to standardise on a single way to make this work within +the existing API. + +No known users of this part of the extension exist in the wild, and as such +the Vulkan WG took the unusual step of retroactively changing the once +boolean value into a tri-state enum, breaking source compatibility. +This was however done in such a way as to retain ABI compatibility, in case +any code using this did exist; with the numerical values 0 and 1 retaining +their original specified meaning, and a new value signifying the additional +"all need to be set together" state. +If any applications exist today, compiled binaries will continue to work as +written in most cases, but will need changes before the code can be +recompiled. + + === Version History + * Revision 4, 2019-06-18 (Tobias Hector) + - Modified settings restrictions, see + <> * Revision 3, 2018-09-11 (Alexander Galazin) - Minor restructuring * Revision 2, 2018-04-17 (Alexander Galazin) diff --git a/appendices/compressedtex.txt b/appendices/compressedtex.txt index 619e615c..63cc6918 100644 --- a/appendices/compressedtex.txt +++ b/appendices/compressedtex.txt @@ -85,37 +85,53 @@ ASTC formats are described in the "`ASTC Compressed Texture Image Formats`" chapter of the <>. .Mapping of Vulkan ASTC formats to descriptions -[width="75%",options="header",cols="63%,15%,22%"] +[width="90%",options="header",cols="50%,15%,20%,15%"] |==== -| elink:VkFormat ^| Compressed texel block dimensions ^| sRGB-encoded -| ename:VK_FORMAT_ASTC_4x4_UNORM_BLOCK ^|[eq]#4 {times} 4# ^|No -| ename:VK_FORMAT_ASTC_4x4_SRGB_BLOCK ^|[eq]#4 {times} 4# ^|Yes -| ename:VK_FORMAT_ASTC_5x4_UNORM_BLOCK ^|[eq]#5 {times} 4# ^|No -| ename:VK_FORMAT_ASTC_5x4_SRGB_BLOCK ^|[eq]#5 {times} 4# ^|Yes -| ename:VK_FORMAT_ASTC_5x5_UNORM_BLOCK ^|[eq]#5 {times} 5# ^|No -| ename:VK_FORMAT_ASTC_5x5_SRGB_BLOCK ^|[eq]#5 {times} 5# ^|Yes -| ename:VK_FORMAT_ASTC_6x5_UNORM_BLOCK ^|[eq]#6 {times} 5# ^|No -| ename:VK_FORMAT_ASTC_6x5_SRGB_BLOCK ^|[eq]#6 {times} 5# ^|Yes -| ename:VK_FORMAT_ASTC_6x6_UNORM_BLOCK ^|[eq]#6 {times} 6# ^|No -| ename:VK_FORMAT_ASTC_6x6_SRGB_BLOCK ^|[eq]#6 {times} 6# ^|Yes -| ename:VK_FORMAT_ASTC_8x5_UNORM_BLOCK ^|[eq]#8 {times} 5# ^|No -| ename:VK_FORMAT_ASTC_8x5_SRGB_BLOCK ^|[eq]#8 {times} 5# ^|Yes -| ename:VK_FORMAT_ASTC_8x6_UNORM_BLOCK ^|[eq]#8 {times} 6# ^|No -| ename:VK_FORMAT_ASTC_8x6_SRGB_BLOCK ^|[eq]#8 {times} 6# ^|Yes -| ename:VK_FORMAT_ASTC_8x8_UNORM_BLOCK ^|[eq]#8 {times} 8# ^|No -| ename:VK_FORMAT_ASTC_8x8_SRGB_BLOCK ^|[eq]#8 {times} 8# ^|Yes -| ename:VK_FORMAT_ASTC_10x5_UNORM_BLOCK ^|[eq]#10 {times} 5# ^|No -| ename:VK_FORMAT_ASTC_10x5_SRGB_BLOCK ^|[eq]#10 {times} 5# ^|Yes -| ename:VK_FORMAT_ASTC_10x6_UNORM_BLOCK ^|[eq]#10 {times} 6# ^|No -| ename:VK_FORMAT_ASTC_10x6_SRGB_BLOCK ^|[eq]#10 {times} 6# ^|Yes -| ename:VK_FORMAT_ASTC_10x8_UNORM_BLOCK ^|[eq]#10 {times} 8# ^|No -| ename:VK_FORMAT_ASTC_10x8_SRGB_BLOCK ^|[eq]#10 {times} 8# ^|Yes -| ename:VK_FORMAT_ASTC_10x10_UNORM_BLOCK ^|[eq]#10 {times} 10# ^|No -| ename:VK_FORMAT_ASTC_10x10_SRGB_BLOCK ^|[eq]#10 {times} 10# ^|Yes -| ename:VK_FORMAT_ASTC_12x10_UNORM_BLOCK ^|[eq]#12 {times} 10# ^|No -| ename:VK_FORMAT_ASTC_12x10_SRGB_BLOCK ^|[eq]#12 {times} 10# ^|Yes -| ename:VK_FORMAT_ASTC_12x12_UNORM_BLOCK ^|[eq]#12 {times} 12# ^|No -| ename:VK_FORMAT_ASTC_12x12_SRGB_BLOCK ^|[eq]#12 {times} 12# ^|Yes +| elink:VkFormat ^| Compressed texel block dimensions ^| sRGB-encoded ^| Profile +| ename:VK_FORMAT_ASTC_4x4_UNORM_BLOCK ^|[eq]#4 {times} 4# ^|No ^| LDR +| ename:VK_FORMAT_ASTC_4x4_SRGB_BLOCK ^|[eq]#4 {times} 4# ^|Yes ^| LDR +| ename:VK_FORMAT_ASTC_5x4_UNORM_BLOCK ^|[eq]#5 {times} 4# ^|No ^| LDR +| ename:VK_FORMAT_ASTC_5x4_SRGB_BLOCK ^|[eq]#5 {times} 4# ^|Yes ^| LDR +| ename:VK_FORMAT_ASTC_5x5_UNORM_BLOCK ^|[eq]#5 {times} 5# ^|No ^| LDR +| ename:VK_FORMAT_ASTC_5x5_SRGB_BLOCK ^|[eq]#5 {times} 5# ^|Yes ^| LDR +| ename:VK_FORMAT_ASTC_6x5_UNORM_BLOCK ^|[eq]#6 {times} 5# ^|No ^| LDR +| ename:VK_FORMAT_ASTC_6x5_SRGB_BLOCK ^|[eq]#6 {times} 5# ^|Yes ^| LDR +| ename:VK_FORMAT_ASTC_6x6_UNORM_BLOCK ^|[eq]#6 {times} 6# ^|No ^| LDR +| ename:VK_FORMAT_ASTC_6x6_SRGB_BLOCK ^|[eq]#6 {times} 6# ^|Yes ^| LDR +| ename:VK_FORMAT_ASTC_8x5_UNORM_BLOCK ^|[eq]#8 {times} 5# ^|No ^| LDR +| ename:VK_FORMAT_ASTC_8x5_SRGB_BLOCK ^|[eq]#8 {times} 5# ^|Yes ^| LDR +| ename:VK_FORMAT_ASTC_8x6_UNORM_BLOCK ^|[eq]#8 {times} 6# ^|No ^| LDR +| ename:VK_FORMAT_ASTC_8x6_SRGB_BLOCK ^|[eq]#8 {times} 6# ^|Yes ^| LDR +| ename:VK_FORMAT_ASTC_8x8_UNORM_BLOCK ^|[eq]#8 {times} 8# ^|No ^| LDR +| ename:VK_FORMAT_ASTC_8x8_SRGB_BLOCK ^|[eq]#8 {times} 8# ^|Yes ^| LDR +| ename:VK_FORMAT_ASTC_10x5_UNORM_BLOCK ^|[eq]#10 {times} 5# ^|No ^| LDR +| ename:VK_FORMAT_ASTC_10x5_SRGB_BLOCK ^|[eq]#10 {times} 5# ^|Yes ^| LDR +| ename:VK_FORMAT_ASTC_10x6_UNORM_BLOCK ^|[eq]#10 {times} 6# ^|No ^| LDR +| ename:VK_FORMAT_ASTC_10x6_SRGB_BLOCK ^|[eq]#10 {times} 6# ^|Yes ^| LDR +| ename:VK_FORMAT_ASTC_10x8_UNORM_BLOCK ^|[eq]#10 {times} 8# ^|No ^| LDR +| ename:VK_FORMAT_ASTC_10x8_SRGB_BLOCK ^|[eq]#10 {times} 8# ^|Yes ^| LDR +| ename:VK_FORMAT_ASTC_10x10_UNORM_BLOCK ^|[eq]#10 {times} 10# ^|No ^| LDR +| ename:VK_FORMAT_ASTC_10x10_SRGB_BLOCK ^|[eq]#10 {times} 10# ^|Yes ^| LDR +| ename:VK_FORMAT_ASTC_12x10_UNORM_BLOCK ^|[eq]#12 {times} 10# ^|No ^| LDR +| ename:VK_FORMAT_ASTC_12x10_SRGB_BLOCK ^|[eq]#12 {times} 10# ^|Yes ^| LDR +| ename:VK_FORMAT_ASTC_12x12_UNORM_BLOCK ^|[eq]#12 {times} 12# ^|No ^| LDR +| ename:VK_FORMAT_ASTC_12x12_SRGB_BLOCK ^|[eq]#12 {times} 12# ^|Yes ^| LDR +ifdef::VK_EXT_texture_compression_astc_hdr[] +| ename:VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT ^|[eq]#4 {times} 4# ^|No ^| HDR +| ename:VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT ^|[eq]#5 {times} 4# ^|No ^| HDR +| ename:VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT ^|[eq]#5 {times} 5# ^|No ^| HDR +| ename:VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT ^|[eq]#6 {times} 5# ^|No ^| HDR +| ename:VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT ^|[eq]#6 {times} 6# ^|No ^| HDR +| ename:VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT ^|[eq]#8 {times} 5# ^|No ^| HDR +| ename:VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT ^|[eq]#8 {times} 6# ^|No ^| HDR +| ename:VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT ^|[eq]#8 {times} 8# ^|No ^| HDR +| ename:VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT ^|[eq]#10 {times} 5# ^|No ^| HDR +| ename:VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT ^|[eq]#10 {times} 6# ^|No ^| HDR +| ename:VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT ^|[eq]#10 {times} 8# ^|No ^| HDR +| ename:VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT ^|[eq]#10 {times} 10# ^|No ^| HDR +| ename:VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT ^|[eq]#12 {times} 10# ^|No ^| HDR +| ename:VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT ^|[eq]#12 {times} 12# ^|No ^| HDR +endif::VK_EXT_texture_compression_astc_hdr[] |==== ifdef::VK_EXT_astc_decode_mode[] diff --git a/chapters/VK_NVX_device_generated_commands/objecttable.txt b/chapters/VK_NVX_device_generated_commands/objecttable.txt index 7406193f..febcb9fd 100644 --- a/chapters/VK_NVX_device_generated_commands/objecttable.txt +++ b/chapters/VK_NVX_device_generated_commands/objecttable.txt @@ -319,6 +319,9 @@ include::{generated}/api/structs/VkObjectTableIndexBufferEntryNVX.txt[] **** * [[VUID-VkObjectTableIndexBufferEntryNVX-type-01371]] pname:type must: be ename:VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX + * [[VUID-VkObjectTableIndexBufferEntryNVX-indexType-02783]] + pname:indexType must: be ename:VK_INDEX_TYPE_UINT16, or + ename:VK_INDEX_TYPE_UINT32 **** include::{generated}/validity/structs/VkObjectTableIndexBufferEntryNVX.txt[] diff --git a/chapters/VK_NV_ray_tracing/raytracing-resources.txt b/chapters/VK_NV_ray_tracing/raytracing-resources.txt index 224f39fc..7ba0d3e1 100644 --- a/chapters/VK_NV_ray_tracing/raytracing-resources.txt +++ b/chapters/VK_NV_ray_tracing/raytracing-resources.txt @@ -131,6 +131,13 @@ flink:vkCmdBuildAccelerationStructureNV. ename:VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV bit set, then it must: not have the ename:VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV bit set + * [[VUID-VkAccelerationStructureInfoNV-scratch-02781]] + pname:scratch must: have been created with + ename:VK_BUFFER_USAGE_RAY_TRACING_BIT_NV usage flag + * [[VUID-VkAccelerationStructureInfoNV-instanceData-02782]] + If pname:instanceData is not dlink:VK_NULL_HANDLE, pname:instanceData + must: have been created with ename:VK_BUFFER_USAGE_RAY_TRACING_BIT_NV + usage flag **** include::{generated}/validity/structs/VkAccelerationStructureInfoNV.txt[] diff --git a/chapters/drawing.txt b/chapters/drawing.txt index 89f6fab7..64d8edbd 100644 --- a/chapters/drawing.txt +++ b/chapters/drawing.txt @@ -46,8 +46,11 @@ include::{generated}/api/structs/VkPipelineInputAssemblyStateCreateInfo.txt[] This enable only applies to indexed draws (flink:vkCmdDrawIndexed and flink:vkCmdDrawIndexedIndirect), and the special index value is either 0xFFFFFFFF when the pname:indexType parameter of - fname:vkCmdBindIndexBuffer is equal to ename:VK_INDEX_TYPE_UINT32, or - 0xFFFF when pname:indexType is equal to ename:VK_INDEX_TYPE_UINT16. + fname:vkCmdBindIndexBuffer is equal to ename:VK_INDEX_TYPE_UINT32, +ifdef::VK_EXT_index_type_uint8[] + 0xFF when pname:indexType is equal to ename:VK_INDEX_TYPE_UINT8_EXT, +endif::VK_EXT_index_type_uint8[] + or 0xFFFF when pname:indexType is equal to ename:VK_INDEX_TYPE_UINT16. Primitive restart is not allowed for "`list`" topologies. Restarting the assembly of primitives discards the most recent index values @@ -548,6 +551,11 @@ ifdef::VK_NV_ray_tracing[] * [[VUID-vkCmdBindIndexBuffer-indexType-02507]] pname:indexType must: not be ename:VK_INDEX_TYPE_NONE_NV. endif::VK_NV_ray_tracing[] +ifdef::VK_EXT_index_type_uint8[] + * [[VUID-vkCmdBindIndexBuffer-indexType-02765]] + If pname:indexType is ename:VK_INDEX_TYPE_UINT8_EXT, the + <> feature must: be enabled +endif::VK_EXT_index_type_uint8[] **** include::{generated}/validity/protos/vkCmdBindIndexBuffer.txt[] @@ -569,6 +577,10 @@ include::{generated}/api/enums/VkIndexType.txt[] ifdef::VK_NV_ray_tracing[] * ename:VK_INDEX_TYPE_NONE_NV specifies that no indices are provided. endif::VK_NV_ray_tracing[] +ifdef::VK_EXT_index_type_uint8[] + * ename:VK_INDEX_TYPE_UINT8_EXT specifies that indices are 8-bit unsigned + integer values. +endif::VK_EXT_index_type_uint8[] -- The parameters for each drawing command are specified directly in the @@ -643,9 +655,12 @@ byte size of the type specified by pname:indexType. Subsequent index values are retrieved from consecutive locations in the index buffer. Indices are first compared to the primitive restart value, then zero -extended to 32 bits (if the code:indexType is ename:VK_INDEX_TYPE_UINT16) -and have pname:vertexOffset added to them, before being supplied as the -code:vertexIndex value. +extended to 32 bits (if the code:indexType is +ifdef::VK_EXT_index_type_uint8[] +ename:VK_INDEX_TYPE_UINT8_EXT or +endif::VK_EXT_index_type_uint8[] +ename:VK_INDEX_TYPE_UINT16) and have pname:vertexOffset added to them, +before being supplied as the code:vertexIndex value. The primitives are drawn pname:instanceCount times with code:instanceIndex starting with pname:firstInstance and increasing sequentially for each diff --git a/chapters/extensions.txt b/chapters/extensions.txt index 34b38b1e..09568917 100644 --- a/chapters/extensions.txt +++ b/chapters/extensions.txt @@ -687,6 +687,23 @@ can do so retroactively if necessary. Extensions that are promoted are listed as being promoted in their extension appendices, with reference to where they were promoted to. +When an extension is promoted, any backwards compatibility aliases which +exist in the extension will *not* be promoted. + +[NOTE] +.Note +==== +As a hypothetical example, if the `<>` extension were +promoted to part of a future core version, the +ename:VK_COLOR_SPACE_SRGB_NONLINEAR_KHR token defined by that extension +would be promoted to etext:VK_COLOR_SPACE_SRGB_NONLINEAR. +However, the ename:VK_COLORSPACE_SRGB_NONLINEAR_KHR token aliases +ename:VK_COLOR_SPACE_SRGB_NONLINEAR_KHR. +The ename:VK_COLORSPACE_SRGB_NONLINEAR_KHR would not be promoted, because it +is a backwards compatibility alias that exists only due to a naming mistake +when the extension was initially published. +==== + [[extendingvulkan-compatibility-deprecation]] ==== Deprecation diff --git a/chapters/features.txt b/chapters/features.txt old mode 100644 new mode 100755 index ed11517d..b64fc3bc --- a/chapters/features.txt +++ b/chapters/features.txt @@ -2200,6 +2200,32 @@ include::{generated}/validity/structs/VkPhysicalDeviceCoverageReductionModeFeatu -- endif::VK_NV_coverage_reduction_mode[] +ifdef::VK_EXT_index_type_uint8[] + +[open,refpage='VkPhysicalDeviceIndexTypeUint8FeaturesEXT',desc='Structure describing whether uint8 index type can be used',type='structs'] +-- +The sname:VkPhysicalDeviceIndexTypeUint8FeaturesEXT structure is defined as: + +include::{generated}/api/structs/VkPhysicalDeviceIndexTypeUint8FeaturesEXT.txt[] + +The members of the sname:VkPhysicalDeviceIndexTypeUint8FeaturesEXT structure +describe the following features: + + * [[features-indexTypeUint8]] pname:indexTypeUint8 indicates that + ename:VK_INDEX_TYPE_UINT8_EXT can be used with + flink:vkCmdBindIndexBuffer. + +If the sname:VkPhysicalDeviceIndexTypeUint8FeaturesEXT structure is included +in the pname:pNext chain of slink:VkPhysicalDeviceFeatures2, it is filled +with values indicating whether the feature is supported. +sname:VkPhysicalDeviceIndexTypeUint8FeaturesEXT can: also be used in the +pname:pNext chain of slink:VkDeviceCreateInfo to enable features. + +include::{generated}/validity/structs/VkPhysicalDeviceIndexTypeUint8FeaturesEXT.txt[] +-- + +endif::VK_EXT_index_type_uint8[] + ifdef::VK_NV_shader_sm_builtins[] [open,refpage='VkPhysicalDeviceShaderSMBuiltinsFeaturesNV',desc='Structure describing the shader SM Builtins features that can be supported by an implementation',type='structs'] -- @@ -2284,6 +2310,103 @@ include::{generated}/validity/structs/VkPhysicalDeviceTexelBufferAlignmentFeatur endif::VK_EXT_texel_buffer_alignment[] +ifdef::VK_EXT_texture_compression_astc_hdr[] + +[open,refpage='VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT',desc='Structure describing ASTC HDR features that can be supported by an implementation',type='structs'] +-- +The sname:VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT structure is +defined as: + +include::{generated}/api/structs/VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT.txt[] + +The members of the +sname:VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT structure +describe the following features: + + * [[features-features-textureCompressionASTC_HDR]] + pname:textureCompressionASTC_HDR indicates whether all of the ASTC HDR + compressed texture formats are supported. + If this feature is enabled, then the + ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, + ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT and + ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT features must: + be supported in pname:optimalTilingFeatures for the following formats: ++ + ** ename:VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT + ** ename:VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT ++ +To query for additional properties, or if the feature is not enabled, +flink:vkGetPhysicalDeviceFormatProperties and +flink:vkGetPhysicalDeviceImageFormatProperties can: be used to check for +supported properties of individual formats as normal. + +If the sname:VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT structure +is included in the pname:pNext chain of slink:VkPhysicalDeviceFeatures2, it +is filled with values indicating whether each feature is supported. +sname:VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT can: also be used +in the pname:pNext chain of flink:vkCreateDevice to enable features. + +include::{generated}/validity/structs/VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT.txt[] +-- +endif::VK_EXT_texture_compression_astc_hdr[] + +ifdef::VK_EXT_line_rasterization[] +[open,refpage='VkPhysicalDeviceLineRasterizationFeaturesEXT',desc='Structure describing the line rasterization features that can be supported by an implementation',type='structs'] +-- +The sname:VkPhysicalDeviceLineRasterizationFeaturesEXT structure is defined +as: + +include::{generated}/api/structs/VkPhysicalDeviceLineRasterizationFeaturesEXT.txt[] + +The members of the sname:VkPhysicalDeviceLineRasterizationFeaturesEXT +structure describe the following features: + + * [[features-features-rectangularLines]] pname:rectangularLines indicates + whether the implementation supports <>. + * [[features-features-bresenhamLines]] pname:bresenhamLines indicates + whether the implementation supports + <>. + * [[features-features-smoothLines]] pname:smoothLines indicates whether + the implementation supports <>. + * [[features-features-stippledRectangularLines]] + pname:stippledRectangularLines indicates whether the implementation + supports <> with + ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT lines, or with + ename:VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT lines if + slink:VkPhysicalDeviceLimits::pname:strictLines is ename:VK_TRUE. + * [[features-features-stippledBresenhamLines]] + pname:stippledBresenhamLines indicates whether the implementation + supports <> with + ename:VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT lines. + * [[features-features-stippledSmoothLines]] pname:stippledSmoothLines + indicates whether the implementation supports + <> with + ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT lines. + +If the sname:VkPhysicalDeviceLineRasterizationFeaturesEXT structure is +included in the pname:pNext chain of slink:VkPhysicalDeviceFeatures2KHR, it +is filled with values indicating whether the feature is supported. +sname:VkPhysicalDeviceLineRasterizationFeaturesEXT can: also be used in the +pname:pNext chain of slink:VkDeviceCreateInfo to enable the feature. + +include::{generated}/validity/structs/VkPhysicalDeviceLineRasterizationFeaturesEXT.txt[] +-- +endif::VK_EXT_line_rasterization[] + [[features-requirements]] == Feature Requirements diff --git a/chapters/formats.txt b/chapters/formats.txt index eb3563f2..64fe63ac 100644 --- a/chapters/formats.txt +++ b/chapters/formats.txt @@ -591,6 +591,11 @@ include::{generated}/api/enums/VkFormat.txt[] compressed format where each 128-bit compressed texel block encodes a 4{times}4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. +ifdef::VK_EXT_texture_compression_astc_hdr[] + * ename:VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT specifies a four-component, + ASTC compressed format where each 128-bit compressed texel block encodes + a 4{times}4 rectangle of signed floating-point RGBA texel data. +endif::VK_EXT_texture_compression_astc_hdr[] * ename:VK_FORMAT_ASTC_5x4_UNORM_BLOCK specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5{times}4 rectangle of unsigned normalized RGBA texel data. @@ -598,6 +603,11 @@ include::{generated}/api/enums/VkFormat.txt[] compressed format where each 128-bit compressed texel block encodes a 5{times}4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. +ifdef::VK_EXT_texture_compression_astc_hdr[] + * ename:VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT specifies a four-component, + ASTC compressed format where each 128-bit compressed texel block encodes + a 5{times}4 rectangle of signed floating-point RGBA texel data. +endif::VK_EXT_texture_compression_astc_hdr[] * ename:VK_FORMAT_ASTC_5x5_UNORM_BLOCK specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5{times}5 rectangle of unsigned normalized RGBA texel data. @@ -605,6 +615,11 @@ include::{generated}/api/enums/VkFormat.txt[] compressed format where each 128-bit compressed texel block encodes a 5{times}5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. +ifdef::VK_EXT_texture_compression_astc_hdr[] + * ename:VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT specifies a four-component, + ASTC compressed format where each 128-bit compressed texel block encodes + a 5{times}5 rectangle of signed floating-point RGBA texel data. +endif::VK_EXT_texture_compression_astc_hdr[] * ename:VK_FORMAT_ASTC_6x5_UNORM_BLOCK specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6{times}5 rectangle of unsigned normalized RGBA texel data. @@ -612,6 +627,11 @@ include::{generated}/api/enums/VkFormat.txt[] compressed format where each 128-bit compressed texel block encodes a 6{times}5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. +ifdef::VK_EXT_texture_compression_astc_hdr[] + * ename:VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT specifies a four-component, + ASTC compressed format where each 128-bit compressed texel block encodes + a 6{times}5 rectangle of signed floating-point RGBA texel data. +endif::VK_EXT_texture_compression_astc_hdr[] * ename:VK_FORMAT_ASTC_6x6_UNORM_BLOCK specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6{times}6 rectangle of unsigned normalized RGBA texel data. @@ -619,6 +639,11 @@ include::{generated}/api/enums/VkFormat.txt[] compressed format where each 128-bit compressed texel block encodes a 6{times}6 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. +ifdef::VK_EXT_texture_compression_astc_hdr[] + * ename:VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT specifies a four-component, + ASTC compressed format where each 128-bit compressed texel block encodes + a 6{times}6 rectangle of signed floating-point RGBA texel data. +endif::VK_EXT_texture_compression_astc_hdr[] * ename:VK_FORMAT_ASTC_8x5_UNORM_BLOCK specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8{times}5 rectangle of unsigned normalized RGBA texel data. @@ -626,6 +651,11 @@ include::{generated}/api/enums/VkFormat.txt[] compressed format where each 128-bit compressed texel block encodes an 8{times}5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. +ifdef::VK_EXT_texture_compression_astc_hdr[] + * ename:VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT specifies a four-component, + ASTC compressed format where each 128-bit compressed texel block encodes + a 8{times}5 rectangle of signed floating-point RGBA texel data. +endif::VK_EXT_texture_compression_astc_hdr[] * ename:VK_FORMAT_ASTC_8x6_UNORM_BLOCK specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8{times}6 rectangle of unsigned normalized RGBA texel data. @@ -633,6 +663,11 @@ include::{generated}/api/enums/VkFormat.txt[] compressed format where each 128-bit compressed texel block encodes an 8{times}6 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. +ifdef::VK_EXT_texture_compression_astc_hdr[] + * ename:VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT specifies a four-component, + ASTC compressed format where each 128-bit compressed texel block encodes + a 8{times}6 rectangle of signed floating-point RGBA texel data. +endif::VK_EXT_texture_compression_astc_hdr[] * ename:VK_FORMAT_ASTC_8x8_UNORM_BLOCK specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8{times}8 rectangle of unsigned normalized RGBA texel data. @@ -640,6 +675,11 @@ include::{generated}/api/enums/VkFormat.txt[] compressed format where each 128-bit compressed texel block encodes an 8{times}8 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. +ifdef::VK_EXT_texture_compression_astc_hdr[] + * ename:VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT specifies a four-component, + ASTC compressed format where each 128-bit compressed texel block encodes + a 8{times}8 rectangle of signed floating-point RGBA texel data. +endif::VK_EXT_texture_compression_astc_hdr[] * ename:VK_FORMAT_ASTC_10x5_UNORM_BLOCK specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}5 rectangle of unsigned normalized RGBA texel data. @@ -647,6 +687,11 @@ include::{generated}/api/enums/VkFormat.txt[] compressed format where each 128-bit compressed texel block encodes a 10{times}5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. +ifdef::VK_EXT_texture_compression_astc_hdr[] + * ename:VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT specifies a four-component, + ASTC compressed format where each 128-bit compressed texel block encodes + a 10{times}5 rectangle of signed floating-point RGBA texel data. +endif::VK_EXT_texture_compression_astc_hdr[] * ename:VK_FORMAT_ASTC_10x6_UNORM_BLOCK specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}6 rectangle of unsigned normalized RGBA texel data. @@ -654,6 +699,11 @@ include::{generated}/api/enums/VkFormat.txt[] compressed format where each 128-bit compressed texel block encodes a 10{times}6 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. +ifdef::VK_EXT_texture_compression_astc_hdr[] + * ename:VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT specifies a four-component, + ASTC compressed format where each 128-bit compressed texel block encodes + a 10{times}6 rectangle of signed floating-point RGBA texel data. +endif::VK_EXT_texture_compression_astc_hdr[] * ename:VK_FORMAT_ASTC_10x8_UNORM_BLOCK specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}8 rectangle of unsigned normalized RGBA texel data. @@ -661,6 +711,11 @@ include::{generated}/api/enums/VkFormat.txt[] compressed format where each 128-bit compressed texel block encodes a 10{times}8 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. +ifdef::VK_EXT_texture_compression_astc_hdr[] + * ename:VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT specifies a four-component, + ASTC compressed format where each 128-bit compressed texel block encodes + a 10{times}8 rectangle of signed floating-point RGBA texel data. +endif::VK_EXT_texture_compression_astc_hdr[] * ename:VK_FORMAT_ASTC_10x10_UNORM_BLOCK specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10{times}10 rectangle of unsigned normalized RGBA texel data. @@ -668,6 +723,11 @@ include::{generated}/api/enums/VkFormat.txt[] compressed format where each 128-bit compressed texel block encodes a 10{times}10 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. +ifdef::VK_EXT_texture_compression_astc_hdr[] + * ename:VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT specifies a four-component, + ASTC compressed format where each 128-bit compressed texel block encodes + a 10{times}10 rectangle of signed floating-point RGBA texel data. +endif::VK_EXT_texture_compression_astc_hdr[] * ename:VK_FORMAT_ASTC_12x10_UNORM_BLOCK specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12{times}10 rectangle of unsigned normalized RGBA texel data. @@ -675,6 +735,11 @@ include::{generated}/api/enums/VkFormat.txt[] compressed format where each 128-bit compressed texel block encodes a 12{times}10 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. +ifdef::VK_EXT_texture_compression_astc_hdr[] + * ename:VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT specifies a four-component, + ASTC compressed format where each 128-bit compressed texel block encodes + a 12{times}10 rectangle of signed floating-point RGBA texel data. +endif::VK_EXT_texture_compression_astc_hdr[] * ename:VK_FORMAT_ASTC_12x12_UNORM_BLOCK specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12{times}12 rectangle of unsigned normalized RGBA texel data. @@ -682,6 +747,11 @@ include::{generated}/api/enums/VkFormat.txt[] compressed format where each 128-bit compressed texel block encodes a 12{times}12 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components. +ifdef::VK_EXT_texture_compression_astc_hdr[] + * ename:VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT specifies a four-component, + ASTC compressed format where each 128-bit compressed texel block encodes + a 12{times}12 rectangle of signed floating-point RGBA texel data. +endif::VK_EXT_texture_compression_astc_hdr[] ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] * ename:VK_FORMAT_G8B8G8R8_422_UNORM specifies a four-component, 32-bit format containing a pair of G components, an R component, and a B @@ -1863,71 +1933,114 @@ endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] Block size 16 bytes + 16 texels/block | ename:VK_FORMAT_ASTC_4x4_UNORM_BLOCK, + +ifdef::VK_EXT_texture_compression_astc_hdr[] + ename:VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT, + +endif::VK_EXT_texture_compression_astc_hdr[] ename:VK_FORMAT_ASTC_4x4_SRGB_BLOCK | ASTC_5x4 (128 bit) + Block size 16 bytes + 20 texels/block | ename:VK_FORMAT_ASTC_5x4_UNORM_BLOCK, + +ifdef::VK_EXT_texture_compression_astc_hdr[] + ename:VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT, + +endif::VK_EXT_texture_compression_astc_hdr[] ename:VK_FORMAT_ASTC_5x4_SRGB_BLOCK | ASTC_5x5 (128 bit) + Block size 16 bytes + 25 texels/block | ename:VK_FORMAT_ASTC_5x5_UNORM_BLOCK, + +ifdef::VK_EXT_texture_compression_astc_hdr[] + ename:VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT, + +endif::VK_EXT_texture_compression_astc_hdr[] ename:VK_FORMAT_ASTC_5x5_SRGB_BLOCK | ASTC_6x5 (128 bit) + Block size 16 bytes + 30 texels/block | ename:VK_FORMAT_ASTC_6x5_UNORM_BLOCK, + +ifdef::VK_EXT_texture_compression_astc_hdr[] + ename:VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT, + +endif::VK_EXT_texture_compression_astc_hdr[] + ename:VK_FORMAT_ASTC_6x5_SRGB_BLOCK | ASTC_6x6 (128 bit) + Block size 16 bytes + 36 texels/block | ename:VK_FORMAT_ASTC_6x6_UNORM_BLOCK, + +ifdef::VK_EXT_texture_compression_astc_hdr[] + ename:VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT, + +endif::VK_EXT_texture_compression_astc_hdr[] ename:VK_FORMAT_ASTC_6x6_SRGB_BLOCK | ASTC_8x5 (128 bit) + Block size 16 bytes + 40 texels/block | ename:VK_FORMAT_ASTC_8x5_UNORM_BLOCK, + +ifdef::VK_EXT_texture_compression_astc_hdr[] + ename:VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT, + +endif::VK_EXT_texture_compression_astc_hdr[] ename:VK_FORMAT_ASTC_8x5_SRGB_BLOCK | ASTC_8x6 (128 bit) + Block size 16 bytes + 48 texels/block | ename:VK_FORMAT_ASTC_8x6_UNORM_BLOCK, + +ifdef::VK_EXT_texture_compression_astc_hdr[] + ename:VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT, + +endif::VK_EXT_texture_compression_astc_hdr[] ename:VK_FORMAT_ASTC_8x6_SRGB_BLOCK | ASTC_8x8 (128 bit) + Block size 16 bytes + 64 texels/block | ename:VK_FORMAT_ASTC_8x8_UNORM_BLOCK, + +ifdef::VK_EXT_texture_compression_astc_hdr[] + ename:VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT, + +endif::VK_EXT_texture_compression_astc_hdr[] ename:VK_FORMAT_ASTC_8x8_SRGB_BLOCK | ASTC_10x5 (128 bit) + Block size 16 bytes + 50 texels/block | ename:VK_FORMAT_ASTC_10x5_UNORM_BLOCK, + +ifdef::VK_EXT_texture_compression_astc_hdr[] + ename:VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT, + +endif::VK_EXT_texture_compression_astc_hdr[] ename:VK_FORMAT_ASTC_10x5_SRGB_BLOCK | ASTC_10x6 (128 bit) + Block size 16 bytes + 60 texels/block | ename:VK_FORMAT_ASTC_10x6_UNORM_BLOCK, + +ifdef::VK_EXT_texture_compression_astc_hdr[] + ename:VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT, + +endif::VK_EXT_texture_compression_astc_hdr[] ename:VK_FORMAT_ASTC_10x6_SRGB_BLOCK | ASTC_10x8 (128 bit) + Block size 16 bytes + 80 texels/block | ename:VK_FORMAT_ASTC_10x8_UNORM_BLOCK, + +ifdef::VK_EXT_texture_compression_astc_hdr[] + ename:VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT, + +endif::VK_EXT_texture_compression_astc_hdr[] ename:VK_FORMAT_ASTC_10x8_SRGB_BLOCK | ASTC_10x10 (128 bit) + Block size 16 bytes + 100 texels/block | ename:VK_FORMAT_ASTC_10x10_UNORM_BLOCK, + +ifdef::VK_EXT_texture_compression_astc_hdr[] + ename:VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT, + +endif::VK_EXT_texture_compression_astc_hdr[] ename:VK_FORMAT_ASTC_10x10_SRGB_BLOCK | ASTC_12x10 (128 bit) + Block size 16 bytes + 120 texels/block | ename:VK_FORMAT_ASTC_12x10_UNORM_BLOCK, + +ifdef::VK_EXT_texture_compression_astc_hdr[] + ename:VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT, + +endif::VK_EXT_texture_compression_astc_hdr[] ename:VK_FORMAT_ASTC_12x10_SRGB_BLOCK | ASTC_12x12 (128 bit) + Block size 16 bytes + 144 texels/block | ename:VK_FORMAT_ASTC_12x12_UNORM_BLOCK, + +ifdef::VK_EXT_texture_compression_astc_hdr[] + ename:VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT, + +endif::VK_EXT_texture_compression_astc_hdr[] ename:VK_FORMAT_ASTC_12x12_SRGB_BLOCK | D16 (16 bit) + Block size 2 bytes + diff --git a/chapters/fragops.txt b/chapters/fragops.txt index 2559aba2..5454d77b 100644 --- a/chapters/fragops.txt +++ b/chapters/fragops.txt @@ -640,6 +640,11 @@ include code:SampleMask in its interface, the fragment coverage is not modified. Next, the fragment alpha and coverage values are modified based on the +ifdef::VK_EXT_line_rasterization[] +line coverage factor if the pname:lineRasterizationMode member of the +slink:VkPipelineRasterizationStateCreateInfo structure is +ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT, and the +endif::VK_EXT_line_rasterization[] pname:alphaToCoverageEnable and pname:alphaToOneEnable members of the slink:VkPipelineMultisampleStateCreateInfo structure. @@ -650,6 +655,15 @@ section). If that shader output has an integer or unsigned integer type, then these operations are skipped. +ifdef::VK_EXT_line_rasterization[] +If the pname:lineRasterizationMode member of the +slink:VkPipelineRasterizationStateCreateInfo structure is +ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT and the fragment +came from a line segment, then the alpha value is replaced by multiplying it +by the coverage factor for the fragment computed during +<>. +endif::VK_EXT_line_rasterization[] + If pname:alphaToCoverageEnable is enabled, a temporary coverage value with pname:rasterizationSamples bits is generated where each bit is determined by the fragment's alpha value. @@ -897,7 +911,7 @@ include::{generated}/api/enums/VkStencilFaceFlagBits.txt[] stencil state is updated. * ename:VK_STENCIL_FACE_BACK_BIT specifies that only the back set of stencil state is updated. - * ename:VK_STENCIL_FRONT_AND_BACK is the combination of + * ename:VK_STENCIL_FACE_FRONT_AND_BACK is the combination of ename:VK_STENCIL_FACE_FRONT_BIT and ename:VK_STENCIL_FACE_BACK_BIT, and specifies that both sets of stencil state are updated. diff --git a/chapters/limits.txt b/chapters/limits.txt index bf70e908..4d2de8e1 100644 --- a/chapters/limits.txt +++ b/chapters/limits.txt @@ -1005,7 +1005,8 @@ include::{generated}/validity/structs/VkPhysicalDeviceFloatControlsPropertiesKHR [open,refpage='VkShaderFloatControlsIndependenceKHR',desc='Enum specifying whether, and how, shader float controls can be set separately',type='enums'] -- -Values which may: be set in the shader float controls properties returned by +Values which may: be returned in the pname:denormBehaviorIndependence and +pname:roundingModeIndependence fields of slink:VkPhysicalDeviceFloatControlsPropertiesKHR are: include::{generated}/api/enums/VkShaderFloatControlsIndependenceKHR.txt[] @@ -2368,6 +2369,35 @@ include::{generated}/validity/structs/VkPhysicalDeviceTexelBufferAlignmentProper endif::VK_EXT_texel_buffer_alignment[] +ifdef::VK_EXT_line_rasterization[] + +[open,refpage='VkPhysicalDeviceLineRasterizationPropertiesEXT',desc='Structure describing line rasterization properties supported by an implementation',type='structs'] +-- +The sname:VkPhysicalDeviceLineRasterizationPropertiesEXT structure is +defined as: + +include::{generated}/api/structs/VkPhysicalDeviceLineRasterizationPropertiesEXT.txt[] + +The members of the sname:VkPhysicalDeviceLineRasterizationPropertiesEXT +structure describe the following implementation-dependent limits: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * [[limits-lineSubPixelPrecisionBits]] pname:lineSubPixelPrecisionBits is + the number of bits of subpixel precision in framebuffer coordinates + [eq]#x~f~# and [eq]#y~f~# when rasterizing <>. + +If the sname:VkPhysicalDeviceLineRasterizationPropertiesEXT structure is +included in the pname:pNext chain of slink:VkPhysicalDeviceProperties2, it +is filled with the implementation-dependent limits. + +include::{generated}/validity/structs/VkPhysicalDeviceLineRasterizationPropertiesEXT.txt[] +-- + +endif::VK_EXT_line_rasterization[] + + [[limits-minmax]] == Limit Requirements @@ -2550,6 +2580,9 @@ ifdef::VK_NV_ray_tracing[] | code:uint32_t | pname:maxTriangleCount | `<>` | code:uint32_t | pname:maxDescriptorSetAccelerationStructures | `<>` endif::VK_NV_ray_tracing[] +ifdef::VK_EXT_line_rasterization[] +| code:uint32_t | pname:lineSubPixelPrecisionBits | `<>` +endif::VK_EXT_line_rasterization[] |==== [[limits-required]] @@ -2787,6 +2820,9 @@ ifdef::VK_NV_ray_tracing[] | pname:maxTriangleCount | - | 2^29 | min | pname:maxDescriptorSetAccelerationStructures | - | 16 | min endif::VK_NV_ray_tracing[] +ifdef::VK_EXT_line_rasterization[] +| pname:lineSubPixelPrecisionBits | - | 4 | min +endif::VK_EXT_line_rasterization[] |==== 1:: diff --git a/chapters/pipelines.txt b/chapters/pipelines.txt index 347805d5..e9440a16 100644 --- a/chapters/pipelines.txt +++ b/chapters/pipelines.txt @@ -1103,6 +1103,25 @@ ifdef::VK_NV_mesh_shader[] any shader stage in the pipeline with a code:Xfb execution mode. endif::VK_NV_mesh_shader[] endif::VK_EXT_transform_feedback[] +ifdef::VK_EXT_line_rasterization[] + * [[VUID-VkGraphicsPipelineCreateInfo-lineRasterizationMode-02766]] + If the pname:lineRasterizationMode member of a + slink:VkPipelineRasterizationLineStateCreateInfoEXT structure chained to + the pname:pNext chain of pname:pRasterizationState is + ename:VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT or + ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT and if + rasterization is enabled, then the pname:alphaToCoverageEnable, + pname:alphaToOneEnable, and pname:sampleShadingEnable members of + pname:pMultisampleState must: all be ename:VK_FALSE + * [[VUID-VkGraphicsPipelineCreateInfo-stippledLineEnable-02767]] + If the pname:stippledLineEnable member of + slink:VkPipelineRasterizationLineStateCreateInfoEXT is ename:VK_TRUE and + no element of the pname:pDynamicStates member of pname:pDynamicState is + ename:VK_DYNAMIC_STATE_LINE_STIPPLE_EXT, then the + pname:lineStippleFactor member of + slink:VkPipelineRasterizationLineStateCreateInfoEXT must: be in the + range [eq]#[1,256]# +endif::VK_EXT_line_rasterization[] **** include::{generated}/validity/structs/VkGraphicsPipelineCreateInfo.txt[] @@ -1320,6 +1339,15 @@ ifdef::VK_NV_shading_rate_image[] ignored and must: be set dynamically with flink:vkCmdSetCoarseSampleOrderNV before any draw commands. endif::VK_NV_shading_rate_image[] +ifdef::VK_EXT_line_rasterization[] + * ename:VK_DYNAMIC_STATE_LINE_STIPPLE_EXT specifies that the + pname:lineStippleFactor and pname:lineStipplePattern state in + slink:VkPipelineRasterizationLineStateCreateInfoEXT will be ignored and + must: be set dynamically with flink:vkCmdSetLineStippleEXT before any + draws are performed with a pipeline state with + slink:VkPipelineRasterizationLineStateCreateInfoEXT member + pname:stippledLineEnable set to ename:VK_TRUE. +endif::VK_EXT_line_rasterization[] -- diff --git a/chapters/primsrast.txt b/chapters/primsrast.txt index 077b705e..93cd8fa6 100644 --- a/chapters/primsrast.txt +++ b/chapters/primsrast.txt @@ -1548,14 +1548,103 @@ vertex for the point. [[primsrast-lines]] == Line Segments -A line is drawn by generating a set of fragments overlapping a rectangle -centered on the line segment. -Each line segment has an associated width that controls the width of that -rectangle. +[open,refpage='VkPipelineRasterizationLineStateCreateInfoEXT',desc='Structure specifying parameters of a newly created pipeline line rasterization state',type='structs'] +-- + +Line segment rasterization options are controlled by the +slink:VkPipelineRasterizationLineStateCreateInfoEXT structure. + +The sname:VkPipelineRasterizationLineStateCreateInfoEXT structure is defined +as: + +include::{generated}/api/structs/VkPipelineRasterizationLineStateCreateInfoEXT.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:lineRasterizationMode selects the style of line rasterization and + is of type elink:VkLineRasterizationModeEXT. + * pname:stippledLineEnable enables <>. + * pname:lineStippleFactor is the repeat factor used in stippled line + rasterization. + * pname:lineStipplePattern is the bit pattern used in stippled line + rasterization. + +.Valid Usage +**** + * [[VUID-VkPipelineRasterizationLineStateCreateInfoEXT-lineRasterizationMode-02768]] + If pname:lineRasterizationMode is + ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT, then the + <> feature must: be enabled + * [[VUID-VkPipelineRasterizationLineStateCreateInfoEXT-lineRasterizationMode-02769]] + If pname:lineRasterizationMode is + ename:VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT, then the + <> feature must: be enabled + * [[VUID-VkPipelineRasterizationLineStateCreateInfoEXT-lineRasterizationMode-02770]] + If pname:lineRasterizationMode is + ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT, then the + <> feature must: be enabled + * [[VUID-VkPipelineRasterizationLineStateCreateInfoEXT-stippledLineEnable-02771]] + If pname:stippledLineEnable is ename:VK_TRUE and + pname:lineRasterizationMode is + ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT, then the + <> feature + must: be enabled + * [[VUID-VkPipelineRasterizationLineStateCreateInfoEXT-stippledLineEnable-02772]] + If pname:stippledLineEnable is ename:VK_TRUE and + pname:lineRasterizationMode is + ename:VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT, then the + <> feature must: + be enabled + * [[VUID-VkPipelineRasterizationLineStateCreateInfoEXT-stippledLineEnable-02773]] + If pname:stippledLineEnable is ename:VK_TRUE and + pname:lineRasterizationMode is + ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT, then the + <> feature must: be + enabled + * [[VUID-VkPipelineRasterizationLineStateCreateInfoEXT-stippledLineEnable-02774]] + If pname:stippledLineEnable is ename:VK_TRUE and + pname:lineRasterizationMode is + ename:VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT, then the + <> feature + must: be enabled and slink:VkPhysicalDeviceLimits::pname:strictLines + must: be ename:VK_TRUE +**** + +include::{generated}/validity/structs/VkPipelineRasterizationLineStateCreateInfoEXT.txt[] +-- + +[open,refpage='VkLineRasterizationModeEXT',desc='Line rasterization modes',type='enums'] +-- + +Possible values of +slink:VkPipelineRasterizationLineStateCreateInfoEXT::pname:lineRasterizationMode +are: + +include::{generated}/api/enums/VkLineRasterizationModeEXT.txt[] + + * ename:VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT is equivalent to + ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT if + slink:VkPhysicalDeviceLimits::pname:strictLines is ename:VK_TRUE, + otherwise lines are drawn as non-pname:strictLines parallelograms. + Both of these modes are defined in <>. + * ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT specifies lines drawn + as if they were rectangles extruded from the line + * ename:VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT specifies lines drawn by + determining which pixel diamonds the line intersects and exits, as + defined in <>. + * ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT specifies lines + drawn if they were rectangles extruded from the line, with alpha + falloff, as defined in <>. + +-- [open,refpage='vkCmdSetLineWidth',desc='Set the dynamic line width state',type='protos'] -- +Each line segment has an associated width. The line width is specified by the slink:VkPipelineRasterizationStateCreateInfo::pname:lineWidth property of the currently active pipeline, if the pipeline was not created with @@ -1602,8 +1691,16 @@ endif::VK_EXT_fragment_density_map[] [[primsrast-lines-basic]] === Basic Line Segment Rasterization -Rasterized line segments produce fragments which intersect a rectangle -centered on the line segment. +ifdef::VK_EXT_line_rasterization[] +If the pname:lineRasterizationMode member of +slink:VkPipelineRasterizationLineStateCreateInfoEXT is +ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT, rasterized +endif::VK_EXT_line_rasterization[] +ifndef::VK_EXT_line_rasterization[] +Rasterized +endif::VK_EXT_line_rasterization[] +line segments produce fragments which intersect a rectangle centered on the +line segment. Two of the edges are parallel to the specified line segment; each is at a distance of one-half the current width from that segment in directions perpendicular to the direction of the line. @@ -1710,6 +1807,219 @@ attributes. [[fig-non-strict-lines]] image::{images}/non_strict_lines.svg[align="center",title="Non strict lines",opts="{imageopts}"] +ifdef::VK_EXT_line_rasterization[] + +[[primsrast-lines-bresenham]] +=== Bresenham Line Segment Rasterization + +If pname:lineRasterizationMode is +ename:VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT, then the following rules +replace the line rasterization rules defined in <>. + +Line segment rasterization begins by characterizing the segment as either +_x-major_ or _y-major_. +x-major line segments have slope in the closed interval [eq]#[-1,1]#; all +other line segments are y-major (slope is determined by the segment's +endpoints). +We specify rasterization only for x-major segments except in cases where the +modifications for y-major segments are not self-evident. + +Ideally, Vulkan uses a _diamond-exit_ rule to determine those fragments that +are produced by rasterizing a line segment. +For each fragment [eq]#f# with center at framebuffer coordinates [eq]#x~f~# +and [eq]#y~f~#, define a diamond-shaped region that is the intersection of +four half planes: + +[latexmath] ++++++++++++++++++++ + R_f = \{ (x,y) \mid | x - x_f | + | y - y_f | < \frac{1}{2} \} ++++++++++++++++++++ + +Essentially, a line segment starting at [eq]#p~a~# and ending at [eq]#p~b~# +produces those fragments [eq]#f# for which the segment intersects +[eq]#R~f~#, except if [eq]#p~b~# is contained in [eq]#R~f~#. + +image::{images}/bresenham.svg[title="Visualization of Bresenham's algorithm",align="center",opts="{imageopts}"] + +To avoid difficulties when an endpoint lies on a boundary of [eq]#R~f~# we +(in principle) perturb the supplied endpoints by a tiny amount. +Let [eq]#p~a~# and [eq]#p~b~# have framebuffer coordinates [eq]#(x~a~, +y~a~)# and [eq]#(x~b~, y~b~)#, respectively. +Obtain the perturbed endpoints [eq]#p~a~'# given by [eq]#(x~a~, y~a~) - +({epsilon}, {epsilon}^2^)# and [eq]#p~b~'# given by [eq]#(x~b~, y~b~) - +({epsilon}, {epsilon}^2^)#. +Rasterizing the line segment starting at [eq]#p~a~# and ending at [eq]#p~b~# +produces those fragments [eq]#f# for which the segment starting at +[eq]#p~a~'# and ending on [eq]#p~b~'# intersects [eq]#R~f~#, except if +[eq]#p~b~'# is contained in [eq]#R~f~#. +[eq]#{epsilon}# is chosen to be so small that rasterizing the line segment +produces the same fragments when [eq]#{delta}# is substituted for +[eq]#{epsilon}# for any [eq]#0 < {delta} {leq} {epsilon}#. + +When [eq]#p~a~# and [eq]#p~b~# lie on fragment centers, this +characterization of fragments reduces to Bresenham's algorithm with one +modification: lines produced in this description are "half-open," meaning +that the final fragment (corresponding to [eq]#p~b~#) is not drawn. +This means that when rasterizing a series of connected line segments, shared +endpoints will be produced only once rather than twice (as would occur with +Bresenham's algorithm). + +Implementations may: use other line segment rasterization algorithms, +subject to the following rules: + + * The coordinates of a fragment produced by the algorithm must: not deviate + by more than one unit in either x or y framebuffer coordinates from a + corresponding fragment produced by the diamond-exit rule. + * The total number of fragments produced by the algorithm must: not differ + from that produced by the diamond-exit rule by no more than one. + * For an x-major line, two fragments that lie in the same + framebuffer-coordinate column must: not be produced (for a y-major line, + two fragments that lie in the same framebuffer-coordinate row must: not + be produced). + * If two line segments share a common endpoint, and both segments are + either x-major (both left-to-right or both right-to-left) or y-major + (both bottom-to-top or both top-to-bottom), then rasterizing both + segments must: not produce duplicate fragments. + Fragments also must: not be omitted so as to interrupt continuity of the + connected segments. + +The actual width [eq]#w# of ename:VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT +lines is determined by rounding the line width to the nearest integer, +clamping it to the implementation-dependent pname:lineWidthRange (with both +values rounded to the nearest integer), then clamping it to be no less than +1. + +ename:VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT line segments of width other +than one are rasterized by offsetting them in the minor direction (for an +x-major line, the minordirection is y, and for a y-major line, the minor +direction is x) and replicating fragments in the minor direction. +If the line segment has endpoints given by [eq]#(x~0~, y~0~)# and +[eq]#(x~1~, y~1~)# in framebuffer coordinates, the segment with endpoints +latexmath:[(x_0, y_0 - \frac{w-1}{2})] and latexmath:[(x_1, y_1 - +\frac{w-1}{2})] is rasterized, but instead of a single fragment, a column of +fragments of height w (a row of fragments of length w for a y-major segment) +is produced at each x (y for y-major) location. +The lowest fragment of this column is the fragment that would be produced by +rasterizing the segment of width 1 with the modified coordinates. + +When ename:VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT lines are being +rasterized, sample locations may: all be treated as being at the pixel +center (this may: affect attribute and depth interpolation). + +[[primsrast-lines-stipple]] +=== Line Stipple + +If the pname:stippledLineEnable member of +slink:VkPipelineRasterizationLineStateCreateInfoEXT is ename:VK_TRUE, then +lines are rasterized with a _line stipple_ determined by +pname:lineStippleFactor and pname:lineStipplePattern. +pname:lineStipplePattern is an unsigned 16-bit integer that determines which +fragments are to be drawn or discarded when the line is rasterized. +pname:lineStippleFactor is a count that is used to modify the effective line +stipple by causing each bit in pname:lineStipplePattern to be used +pname:lineStippleFactor times. + +Line stippling discards certain fragments that are produced by +rasterization. +The masking is achieved using three parameters: the 16-bit line stipple +pattern p, the line stipple factor r, and an integer stipple counter s. +Let + +[latexmath] ++++++++++++++++++++ + b = \lfloor \frac{s}{r} \rfloor \bmod 16 ++++++++++++++++++++ + +Then a fragment is produced if the b'th bit of p is 1, and discarded +otherwise. +The bits of p are numbered with 0 being the least significant and 15 being +the most significant. + +The initial value of s is zero. +For ename:VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT lines, s is incremented +after production of each fragment of a line segment (fragments are produced +in order, beginning at the starting point and working towards the ending +point). +For ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT and +ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT lines, the +rectangular region is subdivided into adjacent unit-length rectangles, and s +is incremented once for each rectangle. +Rectangles with a value of s such that the b'th bit of p is zero are +discarded. +If the last rectangle in a line segment is shorter than unit-length, then +the remainder may: carry over to the next line segment in the line strip +using the same value of s (this is the preferred behavior, for the stipple +pattern to appear more consistent through the strip). + +s is reset to 0 at the start of each strip (for line strips), and before +every line segment in a group of independent segments. + +If the line segment has been clipped, then the value of s at the beginning +of the line segment is implementation-dependent. + +[open,refpage='vkCmdSetLineStippleEXT',desc='Set the dynamic line width state',type='protos'] +-- + +The line stipple factor and pattern are specified by the +slink:VkPipelineRasterizationLineStateCreateInfoEXT::pname:lineStippleFactor +and +slink:VkPipelineRasterizationLineStateCreateInfoEXT::pname:lineStipplePattern +members of the currently active pipeline, if the pipeline was not created +with ename:VK_DYNAMIC_STATE_LINE_STIPPLE_EXT enabled. + +Otherwise, the line stipple factor and pattern are set by calling +fname:vkCmdSetLineStippleEXT: + +include::{generated}/api/protos/vkCmdSetLineStippleEXT.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:lineStippleFactor is the repeat factor used in stippled line + rasterization. + * pname:lineStipplePattern is the bit pattern used in stippled line + rasterization. + +.Valid Usage +**** + * [[VUID-vkCmdSetLineStippleEXT-None-02775]] + The bound graphics pipeline must: have been created with the + ename:VK_DYNAMIC_STATE_LINE_STIPPLE_EXT dynamic state enabled + * [[VUID-vkCmdSetLineStippleEXT-lineStippleFactor-02776]] + pname:lineStippleFactor must: be in the range [eq]#[1,256]# +**** + +include::{generated}/validity/protos/vkCmdSetLineStippleEXT.txt[] +-- + + +[[primsrast-lines-smooth]] +=== Smooth Lines + +If the pname:lineRasterizationMode member of +slink:VkPipelineRasterizationLineStateCreateInfoEXT is +ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT, then lines are +considered to be rectangles using the same geometry as for +ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT lines. +The rules for determining which pixels are covered are +implementation-dependent, and may: include nearby pixels where no sample +locations are covered or where the rectangle doesn't intersect the pixel at +all. +For each pixel that is considered covered, the fragment computes a coverage +value that approximates the area of the intersection of the rectangle with +the pixel square, and this coverage value is multiplied into the color +location 0's alpha value after fragment shading, as described in +<>. + +[NOTE] +.Note +==== +The details of the rasterization rules and area calculation are left +intentionally vague, to allow implementations to generate coverage and +values that are aesthetically pleasing. +==== + +endif::VK_EXT_line_rasterization[] [[primsrast-polygons]] == Polygons diff --git a/chapters/renderpass.txt b/chapters/renderpass.txt index 9968ea0e..ba525e99 100644 --- a/chapters/renderpass.txt +++ b/chapters/renderpass.txt @@ -1493,9 +1493,9 @@ ename:VK_IMAGE_LAYOUT_UNDEFINED layout. endif::VK_EXT_sample_locations[] -If two subpasses use the same attachment in different layouts, and both -layouts are read-only, no subpass dependency needs to be specified between -those subpasses. +If two subpasses use the same attachment, and both subpasses use the +attachment in a read-only layout, no subpass dependency needs to be +specified between those subpasses. If an implementation treats those layouts separately, it must: insert an implicit subpass dependency between those subpasses to separate the uses in each layout. @@ -2287,6 +2287,15 @@ include::{generated}/api/protos/vkCreateFramebuffer.txt[] * pname:pFramebuffer points to a slink:VkFramebuffer handle in which the resulting framebuffer object is returned. +.Valid Usage +**** + * [[VUID-vkCreateFramebuffer-pCreateInfo-02777]] + If pname:pCreateInfo->pname:flags does not include + ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, and pname:attachmentCount + is not `0`, each element of pname:pCreateInfo->pname:pAttachments must: + have been created on pname:device +**** + include::{generated}/validity/protos/vkCreateFramebuffer.txt[] -- @@ -2376,6 +2385,11 @@ slink:VkPipelineMultisampleStateCreateInfo::pname:rasterizationSamples. * [[VUID-VkFramebufferCreateInfo-attachmentCount-00876]] pname:attachmentCount must: be equal to the attachment count specified in pname:renderPass + * [[VUID-VkFramebufferCreateInfo-flags-02778]] + If pname:flags does not include + ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, and pname:attachmentCount + is not `0`, pname:pAttachments must be a valid pointer to an array of + pname:attachmentCount valid slink:VkImageView handles * [[VUID-VkFramebufferCreateInfo-pAttachments-00877]] If pname:flags does not include ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of @@ -2516,8 +2530,10 @@ ifdef::VK_VERSION_1_1,VK_KHR_multiview[] endif::VK_VERSION_1_1,VK_KHR_multiview[] ifdef::VK_VERSION_1_1,VK_KHR_maintenance1[] * [[VUID-VkFramebufferCreateInfo-pAttachments-00891]] - Each element of pname:pAttachments that is a 2D or 2D array image view - taken from a 3D image must: not be a depth/stencil format + If pname:flags does not include + ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of + pname:pAttachments that is a 2D or 2D array image view taken from a 3D + image must: not be a depth/stencil format endif::VK_VERSION_1_1,VK_KHR_maintenance1[] * [[VUID-VkFramebufferCreateInfo-flags-03188]] If pname:flags does not include @@ -2927,6 +2943,10 @@ record the commands for the first subpass of that render pass. .Valid Usage **** + * [[VUID-vkCmdBeginRenderPass2KHR-framebuffer-02779]] + Both the pname:framebuffer and pname:renderPass members of + pname:pRenderPassBegin must: have been created on the same + slink:VkDevice that pname:commandBuffer was allocated on * [[VUID-vkCmdBeginRenderPass2KHR-initialLayout-03094]] If any of the pname:initialLayout or pname:finalLayout member of the sname:VkAttachmentDescription structures or the pname:layout member of @@ -3070,11 +3090,6 @@ pass. the pname:renderPass member of the sname:VkFramebufferCreateInfo structure specified when creating pname:framebuffer. ifdef::VK_KHR_imageless_framebuffer[] - * [[VUID-VkRenderPassBeginInfo-pNext-03206]] - If the <> feature - is not enabled, and the pname:pNext chain includes an instance of - slink:VkRenderPassAttachmentBeginInfoKHR, its pname:attachmentCount - must: be zero * [[VUID-VkRenderPassBeginInfo-framebuffer-03207]] If pname:framebuffer was created with a slink:VkFramebufferCreateInfo::pname:flags value that did not include @@ -3089,11 +3104,19 @@ ifdef::VK_KHR_imageless_framebuffer[] the pname:pNext chain must: be equal to the value of slink:VkFramebufferAttachmentsCreateInfoKHR::pname:attachmentImageInfoCount used to create pname:framebuffer + * [[VUID-VkRenderPassBeginInfo-framebuffer-02780]] + If pname:framebuffer was created with a + slink:VkFramebufferCreateInfo::pname:flags value that included + ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of the + pname:pAttachments member of an instance of + slink:VkRenderPassAttachmentBeginInfoKHR included in the pname:pNext + chain must: have been created on the same slink:VkDevice as + pname:framebuffer and pname:renderPass * [[VUID-VkRenderPassBeginInfo-framebuffer-03209]] If pname:framebuffer was created with a slink:VkFramebufferCreateInfo::pname:flags value that included ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of the - pname:attachments member of an instance of + pname:pAttachments member of an instance of slink:VkRenderPassAttachmentBeginInfoKHR included in the pname:pNext chain must: be a slink:VkImageView of an image created with a value of slink:VkImageCreateInfo::pname:flags equal to the pname:flags member of @@ -3104,7 +3127,7 @@ ifdef::VK_KHR_imageless_framebuffer[] If pname:framebuffer was created with a slink:VkFramebufferCreateInfo::pname:flags value that included ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of the - pname:attachments member of an instance of + pname:pAttachments member of an instance of slink:VkRenderPassAttachmentBeginInfoKHR included in the pname:pNext chain must: be a slink:VkImageView of an image created with a value of slink:VkImageCreateInfo::pname:usage equal to the pname:usage member of @@ -3115,7 +3138,7 @@ ifdef::VK_KHR_imageless_framebuffer[] If pname:framebuffer was created with a slink:VkFramebufferCreateInfo::pname:flags value that included ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of the - pname:attachments member of an instance of + pname:pAttachments member of an instance of slink:VkRenderPassAttachmentBeginInfoKHR included in the pname:pNext chain must: be a slink:VkImageView with a width equal to the pname:width member of the corresponding element of @@ -3125,7 +3148,7 @@ ifdef::VK_KHR_imageless_framebuffer[] If pname:framebuffer was created with a slink:VkFramebufferCreateInfo::pname:flags value that included ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of the - pname:attachments member of an instance of + pname:pAttachments member of an instance of slink:VkRenderPassAttachmentBeginInfoKHR included in the pname:pNext chain must: be a slink:VkImageView with a height equal to the pname:height member of the corresponding element of @@ -3135,7 +3158,7 @@ ifdef::VK_KHR_imageless_framebuffer[] If pname:framebuffer was created with a slink:VkFramebufferCreateInfo::pname:flags value that included ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of the - pname:attachments member of an instance of + pname:pAttachments member of an instance of slink:VkRenderPassAttachmentBeginInfoKHR included in the pname:pNext chain must: be a slink:VkImageView of an image created with a value of slink:VkImageViewCreateInfo::pname:subresourceRange.pname:layerCount @@ -3146,7 +3169,7 @@ ifdef::VK_KHR_imageless_framebuffer[] If pname:framebuffer was created with a slink:VkFramebufferCreateInfo::pname:flags value that included ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of the - pname:attachments member of an instance of + pname:pAttachments member of an instance of slink:VkRenderPassAttachmentBeginInfoKHR included in the pname:pNext chain must: be a slink:VkImageView of an image created with a value of slink:VkImageFormatListCreateInfoKHR::pname:viewFormatCount equal to the @@ -3157,7 +3180,7 @@ ifdef::VK_KHR_imageless_framebuffer[] If pname:framebuffer was created with a slink:VkFramebufferCreateInfo::pname:flags value that included ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of the - pname:attachments member of an instance of + pname:pAttachments member of an instance of slink:VkRenderPassAttachmentBeginInfoKHR included in the pname:pNext chain must: be a slink:VkImageView of an image created with a set of elements in slink:VkImageFormatListCreateInfoKHR::pname:pViewFormats @@ -3169,7 +3192,7 @@ ifdef::VK_KHR_imageless_framebuffer[] If pname:framebuffer was created with a slink:VkFramebufferCreateInfo::pname:flags value that included ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of the - pname:attachments member of an instance of + pname:pAttachments member of an instance of slink:VkRenderPassAttachmentBeginInfoKHR included in the pname:pNext chain must: be a slink:VkImageView of an image created with a value of slink:VkImageViewCreateInfo::pname:format equal to the corresponding @@ -3178,7 +3201,7 @@ ifdef::VK_KHR_imageless_framebuffer[] If pname:framebuffer was created with a slink:VkFramebufferCreateInfo::pname:flags value that included ename:VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR, each element of the - pname:attachments member of an instance of + pname:pAttachments member of an instance of slink:VkRenderPassAttachmentBeginInfoKHR included in the pname:pNext chain must: be a slink:VkImageView of an image created with a value of slink:VkImageCreateInfo::pname:samples equal to the corresponding value diff --git a/images/bresenham.svg b/images/bresenham.svg new file mode 100644 index 00000000..d73b8318 --- /dev/null +++ b/images/bresenham.svg @@ -0,0 +1,488 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scripts/reflow_count.py b/scripts/reflow_count.py index 77ac9d62..5057c357 100644 --- a/scripts/reflow_count.py +++ b/scripts/reflow_count.py @@ -1,2 +1,2 @@ # The value to start tagging VU statements at, unless overridden by -nextvu -startVUID = 2765 +startVUID = 2784 diff --git a/xml/vk.xml b/xml/vk.xml index 67919a9a..0cb20d1c 100644 --- a/xml/vk.xml +++ b/xml/vk.xml @@ -154,7 +154,7 @@ server. // Vulkan 1.1 version number #define VK_API_VERSION_1_1 VK_MAKE_VERSION(1, 1, 0)// Patch version should always be set to 0 // Version of this file -#define VK_HEADER_VERSION 116 +#define VK_HEADER_VERSION 117 #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; @@ -201,7 +201,7 @@ typedef void CAMetalLayer; Bitmask types typedef VkFlags VkFramebufferCreateFlags; typedef VkFlags VkQueryPoolCreateFlags; - typedef VkFlags VkRenderPassCreateFlags; + typedef VkFlags VkRenderPassCreateFlags; typedef VkFlags VkSamplerCreateFlags; typedef VkFlags VkPipelineLayoutCreateFlags; typedef VkFlags VkPipelineCacheCreateFlags; @@ -237,7 +237,7 @@ typedef void CAMetalLayer; typedef VkFlags VkFormatFeatureFlags; typedef VkFlags VkQueryControlFlags; typedef VkFlags VkQueryResultFlags; - typedef VkFlags VkShaderModuleCreateFlags; + typedef VkFlags VkShaderModuleCreateFlags; typedef VkFlags VkEventCreateFlags; typedef VkFlags VkCommandPoolCreateFlags; typedef VkFlags VkCommandPoolResetFlags; @@ -331,6 +331,7 @@ typedef void CAMetalLayer; typedef VkFlags VkResolveModeFlagsKHR; typedef VkFlags VkPipelineRasterizationStateStreamCreateFlagsEXT; typedef VkFlags VkPipelineRasterizationDepthClipStateCreateFlagsEXT; + typedef VkFlags VkSwapchainImageUsageFlagsANDROID; Types which can be void pointers or class pointers, selected at compile time @@ -506,6 +507,8 @@ typedef void CAMetalLayer; + + WSI extensions @@ -562,6 +565,7 @@ typedef void CAMetalLayer; + Enumerated types in the header, but not used by the API @@ -1568,7 +1572,7 @@ typedef void CAMetalLayer; VkFramebufferCreateFlags flags VkRenderPass renderPass uint32_t attachmentCount - const VkImageView* pAttachments + const VkImageView* pAttachments uint32_t width uint32_t height uint32_t layers @@ -3023,6 +3027,10 @@ typedef void CAMetalLayer; void* pNext VkBool32 hostQueryReset + + uint64_t consumer + uint64_t producer + VkStructureType sType const void* pNext @@ -3030,6 +3038,17 @@ typedef void CAMetalLayer; int stride int format int usage + VkNativeBufferUsage2ANDROID usage2 + + + VkStructureType sType + const void* pNext + VkSwapchainImageUsageFlagsANDROID usage + + + VkStructureType sType + const void* pNext + VkBool32 sharedImage uint32_t numUsedVgprs @@ -3838,6 +3857,11 @@ typedef void CAMetalLayer; uint32_t attachmentCount const VkImageView* pAttachments + + VkStructureType sType + const void* pNext + VkBool32 textureCompressionASTC_HDR + VkStructureType sType void* pNext @@ -3976,6 +4000,11 @@ typedef void CAMetalLayer; const void* pNext VkPerformanceConfigurationTypeINTEL type + + VkStructureType sType + void* pNext + VkBool32 indexTypeUint8 + VkStructureType sType void* pNext @@ -4025,6 +4054,29 @@ typedef void CAMetalLayer; void* pNext uint32_t requiredSubgroupSize + + VkStructureType sType + void* pNext + VkBool32 rectangularLines + VkBool32 bresenhamLines + VkBool32 smoothLines + VkBool32 stippledRectangularLines + VkBool32 stippledBresenhamLines + VkBool32 stippledSmoothLines + + + VkStructureType sType + void* pNext + uint32_t lineSubPixelPrecisionBits + + + VkStructureType sType + const void* pNext + VkLineRasterizationModeEXT lineRasterizationMode + VkBool32 stippledLineEnable + uint32_t lineStippleFactor + uint16_t lineStipplePattern + Vulkan enumerant (token) definitions @@ -4801,7 +4853,8 @@ typedef void CAMetalLayer; - + + @@ -4844,6 +4897,9 @@ typedef void CAMetalLayer; + + + @@ -5294,6 +5350,14 @@ typedef void CAMetalLayer; + + + + + + + + @@ -7091,6 +7155,15 @@ typedef void CAMetalLayer; VkImageUsageFlags imageUsage int* grallocUsage + + VkResult vkGetSwapchainGrallocUsage2ANDROID + VkDevice device + VkFormat format + VkImageUsageFlags imageUsage + VkSwapchainImageUsageFlagsANDROID swapchainImageUsage + uint64_t* grallocConsumerUsage + uint64_t* grallocProducerUsage + VkResult vkAcquireImageANDROID VkDevice device @@ -7585,6 +7658,12 @@ typedef void CAMetalLayer; VkPerformanceParameterTypeINTEL parameter VkPerformanceValueINTEL* pValue + + void vkCmdSetLineStippleEXT + VkCommandBuffer commandBuffer + uint32_t lineStippleFactor + uint16_t lineStipplePattern + @@ -8303,14 +8382,22 @@ typedef void CAMetalLayer; VK_ANDROID_native_buffer is used between the Android Vulkan loader and drivers to implement the WSI extensions. It isn't exposed to applications and uses types that aren't part of Android's stable public API, so it is left disabled to keep it out of the standard Vulkan headers. - + + + + + + + + + @@ -8661,10 +8748,12 @@ typedef void CAMetalLayer; - + - - + + + + @@ -8869,10 +8958,26 @@ typedef void CAMetalLayer; - + - - + + + + + + + + + + + + + + + + + + @@ -10500,7 +10605,7 @@ typedef void CAMetalLayer; - + @@ -11058,10 +11163,19 @@ typedef void CAMetalLayer; - + - - + + + + + + + + + + + @@ -11097,10 +11211,13 @@ typedef void CAMetalLayer; - + - - + + + + + @@ -11208,7 +11325,8 @@ typedef void CAMetalLayer; - + + @@ -11223,7 +11341,7 @@ typedef void CAMetalLayer; - +