2019-10-06 12:42:12 -07:00
|
|
|
include::{generated}/meta/VK_NV_clip_space_w_scaling.txt[]
|
Change log for February 27, 2017 Vulkan 1.0.42 spec update:
* Bump API patch number and header version number to 42 for this update
(the first anniversary edition).
Github Issues:
* Changed asciidoctor macros so cross-page links in the standalone
reference pages function properly (public issue 462).
Internal Issues:
* Clarified host visibility discussion for slink:VkMemoryType,
flink:vkInvalidateMappedMemoryRanges, elink:VkAccessFlagBits, and the
<<synchronization-framebuffer-regions,Framebuffer Region Dependencies>>
section, removing duplicated information and adding a central definition
in the access types section (internal issue 552).
* Change description of
slink:vkGetPhysicalDeviceSurfacePresentModesKHR::pname:pPresentModes to
return an array of values, not structures (internal issue 699).
New Extensions:
* Add a NOTE to the <<extensions,Layers & Extensions>> chapter describing
the experimental status of `KHX` extensions.
* Add new Khronos, Khronos Experimental, and vendor Vulkan extensions for
release at GDC:
** VK_KHR_descriptor_update_template
** VK_KHR_push_descriptor
** VK_KHX_device_group
** VK_KHX_device_group_creation
** VK_KHX_external_memory
** VK_KHX_external_memory_capabilities
** VK_KHX_external_memory_fd
** VK_KHX_external_memory_win32
** VK_KHX_external_semaphore
** VK_KHX_external_semaphore_capabilities
** VK_KHX_external_semaphore_fd
** VK_KHX_external_semaphore_win32
** VK_KHX_multiview
** VK_KHX_win32_keyed_mutex
** VK_EXT_discard_rectangles
** VK_MVK_ios_surface
** VK_MVK_macos_surface
** VK_NVX_multiview_per_view_attributes
** VK_NV_clip_space_w_scaling
** VK_NV_geometry_shader_passthrough
** VK_NV_sample_mask_override_coverage
** VK_NV_viewport_array2
** VK_NV_viewport_swizzle
* Add new GLSL vendor extensions to support new builtin variables:
** GL_EXT_device_group
** GL_EXT_multiview
2017-02-26 22:54:26 -08:00
|
|
|
|
|
|
|
*Last Modified Date*::
|
|
|
|
2017-02-15
|
|
|
|
*Contributors*::
|
2017-07-11 17:57:41 -07:00
|
|
|
- Eric Werness, NVIDIA
|
|
|
|
- Kedarnath Thangudu, NVIDIA
|
|
|
|
|
Change log for February 27, 2017 Vulkan 1.0.42 spec update:
* Bump API patch number and header version number to 42 for this update
(the first anniversary edition).
Github Issues:
* Changed asciidoctor macros so cross-page links in the standalone
reference pages function properly (public issue 462).
Internal Issues:
* Clarified host visibility discussion for slink:VkMemoryType,
flink:vkInvalidateMappedMemoryRanges, elink:VkAccessFlagBits, and the
<<synchronization-framebuffer-regions,Framebuffer Region Dependencies>>
section, removing duplicated information and adding a central definition
in the access types section (internal issue 552).
* Change description of
slink:vkGetPhysicalDeviceSurfacePresentModesKHR::pname:pPresentModes to
return an array of values, not structures (internal issue 699).
New Extensions:
* Add a NOTE to the <<extensions,Layers & Extensions>> chapter describing
the experimental status of `KHX` extensions.
* Add new Khronos, Khronos Experimental, and vendor Vulkan extensions for
release at GDC:
** VK_KHR_descriptor_update_template
** VK_KHR_push_descriptor
** VK_KHX_device_group
** VK_KHX_device_group_creation
** VK_KHX_external_memory
** VK_KHX_external_memory_capabilities
** VK_KHX_external_memory_fd
** VK_KHX_external_memory_win32
** VK_KHX_external_semaphore
** VK_KHX_external_semaphore_capabilities
** VK_KHX_external_semaphore_fd
** VK_KHX_external_semaphore_win32
** VK_KHX_multiview
** VK_KHX_win32_keyed_mutex
** VK_EXT_discard_rectangles
** VK_MVK_ios_surface
** VK_MVK_macos_surface
** VK_NVX_multiview_per_view_attributes
** VK_NV_clip_space_w_scaling
** VK_NV_geometry_shader_passthrough
** VK_NV_sample_mask_override_coverage
** VK_NV_viewport_array2
** VK_NV_viewport_swizzle
* Add new GLSL vendor extensions to support new builtin variables:
** GL_EXT_device_group
** GL_EXT_multiview
2017-02-26 22:54:26 -08:00
|
|
|
Virtual Reality (VR) applications often involve a post-processing step to
|
2017-12-11 20:02:07 +01:00
|
|
|
apply a "`barrel`" distortion to the rendered image to correct the
|
|
|
|
"`pincushion`" distortion introduced by the optics in a VR device.
|
Change log for February 27, 2017 Vulkan 1.0.42 spec update:
* Bump API patch number and header version number to 42 for this update
(the first anniversary edition).
Github Issues:
* Changed asciidoctor macros so cross-page links in the standalone
reference pages function properly (public issue 462).
Internal Issues:
* Clarified host visibility discussion for slink:VkMemoryType,
flink:vkInvalidateMappedMemoryRanges, elink:VkAccessFlagBits, and the
<<synchronization-framebuffer-regions,Framebuffer Region Dependencies>>
section, removing duplicated information and adding a central definition
in the access types section (internal issue 552).
* Change description of
slink:vkGetPhysicalDeviceSurfacePresentModesKHR::pname:pPresentModes to
return an array of values, not structures (internal issue 699).
New Extensions:
* Add a NOTE to the <<extensions,Layers & Extensions>> chapter describing
the experimental status of `KHX` extensions.
* Add new Khronos, Khronos Experimental, and vendor Vulkan extensions for
release at GDC:
** VK_KHR_descriptor_update_template
** VK_KHR_push_descriptor
** VK_KHX_device_group
** VK_KHX_device_group_creation
** VK_KHX_external_memory
** VK_KHX_external_memory_capabilities
** VK_KHX_external_memory_fd
** VK_KHX_external_memory_win32
** VK_KHX_external_semaphore
** VK_KHX_external_semaphore_capabilities
** VK_KHX_external_semaphore_fd
** VK_KHX_external_semaphore_win32
** VK_KHX_multiview
** VK_KHX_win32_keyed_mutex
** VK_EXT_discard_rectangles
** VK_MVK_ios_surface
** VK_MVK_macos_surface
** VK_NVX_multiview_per_view_attributes
** VK_NV_clip_space_w_scaling
** VK_NV_geometry_shader_passthrough
** VK_NV_sample_mask_override_coverage
** VK_NV_viewport_array2
** VK_NV_viewport_swizzle
* Add new GLSL vendor extensions to support new builtin variables:
** GL_EXT_device_group
** GL_EXT_multiview
2017-02-26 22:54:26 -08:00
|
|
|
The barrel distorted image has lower resolution along the edges compared to
|
|
|
|
the center.
|
|
|
|
Since the original image is rendered at high resolution, which is uniform
|
|
|
|
across the complete image, a lot of pixels towards the edges do not make it
|
|
|
|
to the final post-processed image.
|
|
|
|
|
|
|
|
This extension provides a mechanism to render VR scenes at a non-uniform
|
|
|
|
resolution, in particular a resolution that falls linearly from the center
|
|
|
|
towards the edges.
|
2017-10-27 01:33:31 +02:00
|
|
|
This is achieved by scaling the [eq]#w# coordinate of the vertices in the
|
|
|
|
clip space before perspective divide.
|
|
|
|
The clip space [eq]#w# coordinate of the vertices can: be offset as of a
|
|
|
|
function of [eq]#x# and [eq]#y# coordinates as follows:
|
Change log for February 27, 2017 Vulkan 1.0.42 spec update:
* Bump API patch number and header version number to 42 for this update
(the first anniversary edition).
Github Issues:
* Changed asciidoctor macros so cross-page links in the standalone
reference pages function properly (public issue 462).
Internal Issues:
* Clarified host visibility discussion for slink:VkMemoryType,
flink:vkInvalidateMappedMemoryRanges, elink:VkAccessFlagBits, and the
<<synchronization-framebuffer-regions,Framebuffer Region Dependencies>>
section, removing duplicated information and adding a central definition
in the access types section (internal issue 552).
* Change description of
slink:vkGetPhysicalDeviceSurfacePresentModesKHR::pname:pPresentModes to
return an array of values, not structures (internal issue 699).
New Extensions:
* Add a NOTE to the <<extensions,Layers & Extensions>> chapter describing
the experimental status of `KHX` extensions.
* Add new Khronos, Khronos Experimental, and vendor Vulkan extensions for
release at GDC:
** VK_KHR_descriptor_update_template
** VK_KHR_push_descriptor
** VK_KHX_device_group
** VK_KHX_device_group_creation
** VK_KHX_external_memory
** VK_KHX_external_memory_capabilities
** VK_KHX_external_memory_fd
** VK_KHX_external_memory_win32
** VK_KHX_external_semaphore
** VK_KHX_external_semaphore_capabilities
** VK_KHX_external_semaphore_fd
** VK_KHX_external_semaphore_win32
** VK_KHX_multiview
** VK_KHX_win32_keyed_mutex
** VK_EXT_discard_rectangles
** VK_MVK_ios_surface
** VK_MVK_macos_surface
** VK_NVX_multiview_per_view_attributes
** VK_NV_clip_space_w_scaling
** VK_NV_geometry_shader_passthrough
** VK_NV_sample_mask_override_coverage
** VK_NV_viewport_array2
** VK_NV_viewport_swizzle
* Add new GLSL vendor extensions to support new builtin variables:
** GL_EXT_device_group
** GL_EXT_multiview
2017-02-26 22:54:26 -08:00
|
|
|
|
Change log for September 8, 2019 Vulkan 1.1.122 spec update:
* Update release number to 122.
Internal Issues:
* Add style guide language on not using standalone `+` signs (internal
issue 736); not using leading whitespace for markup (internal issue
747); and on keeping descriptions of a single API in a contiguous block
of markup (internal issue 949), and apply them to the specification.
* Add a glossary definition of "`constant integral expression`", pointing
to the SPIR-V "`constant instruction`" definition (internal issue 1225).
* Many minor edits to improve writing style consistency and capture
additional style guidelines (internal issue 1553).
* Clarify that <<fragops-depth-write, depth writes are not performed>> if
there is no depth framebuffer attachment (internal issue 1771).
* Allow implementations to use rectangular line style of interpolation for
<<primsrast-lines-bresenham, wide Bresenham lines>>, though replicating
attributes is still preferred. Clarify that code:FragCoord is not
replicated (internal issue 1772).
* Resolve a contradiction in valid usage statements for
slink:VkImageCreateInfo and slink:VkImageStencilUsageCreateInfoEXT
(internal issue 1773).
* Add style guide discussion of markup for indented equations, and use
markup workaround for asciidoctor 2 compatibility (internal issue 1793).
* Deprecate the `<<VK_EXT_validation_flags>>` extension in `vk.xml` and
the extension appendix (internal issue 1801).
* Add a new checker script `scripts/xml_consistency.py`. This is not
currently run as part of internal CI (internal merge request 3285).
* Correct "`an`" -> "`a`" prepositions where needed (internal merge
request 3334).
* Clarify that the <<features-uniformBufferStandardLayout,
pname:uniformBufferStandardLayout>> feature is only required when the
extension defining it is supported (internal merge request 3341).
* Bring scripts into closer sync with OpenXR, mainly through conversion of
comments to docstrings where appropriate, and add gen-scripts-docs.sh
(internal merge request 3324).
* Correct pname:maxDrawMeshTasksCount to 2^16^-1 in the <<limits-required,
Required Limits>> table (internal merge requests 3361).
New Extensions
* `<<VK_IMG_format_pvrtc>>` (public issue 512).
2019-09-08 20:41:02 -07:00
|
|
|
[eq]#w' = w {plus} Ax {plus} By#
|
Change log for February 27, 2017 Vulkan 1.0.42 spec update:
* Bump API patch number and header version number to 42 for this update
(the first anniversary edition).
Github Issues:
* Changed asciidoctor macros so cross-page links in the standalone
reference pages function properly (public issue 462).
Internal Issues:
* Clarified host visibility discussion for slink:VkMemoryType,
flink:vkInvalidateMappedMemoryRanges, elink:VkAccessFlagBits, and the
<<synchronization-framebuffer-regions,Framebuffer Region Dependencies>>
section, removing duplicated information and adding a central definition
in the access types section (internal issue 552).
* Change description of
slink:vkGetPhysicalDeviceSurfacePresentModesKHR::pname:pPresentModes to
return an array of values, not structures (internal issue 699).
New Extensions:
* Add a NOTE to the <<extensions,Layers & Extensions>> chapter describing
the experimental status of `KHX` extensions.
* Add new Khronos, Khronos Experimental, and vendor Vulkan extensions for
release at GDC:
** VK_KHR_descriptor_update_template
** VK_KHR_push_descriptor
** VK_KHX_device_group
** VK_KHX_device_group_creation
** VK_KHX_external_memory
** VK_KHX_external_memory_capabilities
** VK_KHX_external_memory_fd
** VK_KHX_external_memory_win32
** VK_KHX_external_semaphore
** VK_KHX_external_semaphore_capabilities
** VK_KHX_external_semaphore_fd
** VK_KHX_external_semaphore_win32
** VK_KHX_multiview
** VK_KHX_win32_keyed_mutex
** VK_EXT_discard_rectangles
** VK_MVK_ios_surface
** VK_MVK_macos_surface
** VK_NVX_multiview_per_view_attributes
** VK_NV_clip_space_w_scaling
** VK_NV_geometry_shader_passthrough
** VK_NV_sample_mask_override_coverage
** VK_NV_viewport_array2
** VK_NV_viewport_swizzle
* Add new GLSL vendor extensions to support new builtin variables:
** GL_EXT_device_group
** GL_EXT_multiview
2017-02-26 22:54:26 -08:00
|
|
|
|
|
|
|
In the intended use case for viewport position scaling, an application
|
2017-12-15 21:01:02 +01:00
|
|
|
should use a set of four viewports, one for each of the four quadrants of a
|
Change log for February 27, 2017 Vulkan 1.0.42 spec update:
* Bump API patch number and header version number to 42 for this update
(the first anniversary edition).
Github Issues:
* Changed asciidoctor macros so cross-page links in the standalone
reference pages function properly (public issue 462).
Internal Issues:
* Clarified host visibility discussion for slink:VkMemoryType,
flink:vkInvalidateMappedMemoryRanges, elink:VkAccessFlagBits, and the
<<synchronization-framebuffer-regions,Framebuffer Region Dependencies>>
section, removing duplicated information and adding a central definition
in the access types section (internal issue 552).
* Change description of
slink:vkGetPhysicalDeviceSurfacePresentModesKHR::pname:pPresentModes to
return an array of values, not structures (internal issue 699).
New Extensions:
* Add a NOTE to the <<extensions,Layers & Extensions>> chapter describing
the experimental status of `KHX` extensions.
* Add new Khronos, Khronos Experimental, and vendor Vulkan extensions for
release at GDC:
** VK_KHR_descriptor_update_template
** VK_KHR_push_descriptor
** VK_KHX_device_group
** VK_KHX_device_group_creation
** VK_KHX_external_memory
** VK_KHX_external_memory_capabilities
** VK_KHX_external_memory_fd
** VK_KHX_external_memory_win32
** VK_KHX_external_semaphore
** VK_KHX_external_semaphore_capabilities
** VK_KHX_external_semaphore_fd
** VK_KHX_external_semaphore_win32
** VK_KHX_multiview
** VK_KHX_win32_keyed_mutex
** VK_EXT_discard_rectangles
** VK_MVK_ios_surface
** VK_MVK_macos_surface
** VK_NVX_multiview_per_view_attributes
** VK_NV_clip_space_w_scaling
** VK_NV_geometry_shader_passthrough
** VK_NV_sample_mask_override_coverage
** VK_NV_viewport_array2
** VK_NV_viewport_swizzle
* Add new GLSL vendor extensions to support new builtin variables:
** GL_EXT_device_group
** GL_EXT_multiview
2017-02-26 22:54:26 -08:00
|
|
|
Cartesian coordinate system.
|
|
|
|
Each viewport is set to the dimension of the image, but is scissored to the
|
|
|
|
quadrant it represents.
|
2017-10-27 01:33:31 +02:00
|
|
|
The application should specify [eq]#A# and [eq]#B# coefficients of the
|
|
|
|
[eq]#w#-scaling equation above, that have the same value, but different
|
|
|
|
signs, for each of the viewports.
|
|
|
|
The signs of [eq]#A# and [eq]#B# should match the signs of [eq]#x# and
|
|
|
|
[eq]#y# for the quadrant that they represent such that the value of [eq]#w'#
|
|
|
|
will always be greater than or equal to the original [eq]#w# value for the
|
|
|
|
entire image.
|
Change log for September 8, 2019 Vulkan 1.1.122 spec update:
* Update release number to 122.
Internal Issues:
* Add style guide language on not using standalone `+` signs (internal
issue 736); not using leading whitespace for markup (internal issue
747); and on keeping descriptions of a single API in a contiguous block
of markup (internal issue 949), and apply them to the specification.
* Add a glossary definition of "`constant integral expression`", pointing
to the SPIR-V "`constant instruction`" definition (internal issue 1225).
* Many minor edits to improve writing style consistency and capture
additional style guidelines (internal issue 1553).
* Clarify that <<fragops-depth-write, depth writes are not performed>> if
there is no depth framebuffer attachment (internal issue 1771).
* Allow implementations to use rectangular line style of interpolation for
<<primsrast-lines-bresenham, wide Bresenham lines>>, though replicating
attributes is still preferred. Clarify that code:FragCoord is not
replicated (internal issue 1772).
* Resolve a contradiction in valid usage statements for
slink:VkImageCreateInfo and slink:VkImageStencilUsageCreateInfoEXT
(internal issue 1773).
* Add style guide discussion of markup for indented equations, and use
markup workaround for asciidoctor 2 compatibility (internal issue 1793).
* Deprecate the `<<VK_EXT_validation_flags>>` extension in `vk.xml` and
the extension appendix (internal issue 1801).
* Add a new checker script `scripts/xml_consistency.py`. This is not
currently run as part of internal CI (internal merge request 3285).
* Correct "`an`" -> "`a`" prepositions where needed (internal merge
request 3334).
* Clarify that the <<features-uniformBufferStandardLayout,
pname:uniformBufferStandardLayout>> feature is only required when the
extension defining it is supported (internal merge request 3341).
* Bring scripts into closer sync with OpenXR, mainly through conversion of
comments to docstrings where appropriate, and add gen-scripts-docs.sh
(internal merge request 3324).
* Correct pname:maxDrawMeshTasksCount to 2^16^-1 in the <<limits-required,
Required Limits>> table (internal merge requests 3361).
New Extensions
* `<<VK_IMG_format_pvrtc>>` (public issue 512).
2019-09-08 20:41:02 -07:00
|
|
|
Since the offset to [eq]#w#, ([eq]#Ax {plus} By#), is always positive, and
|
2017-10-27 01:33:31 +02:00
|
|
|
increases with the absolute values of [eq]#x# and [eq]#y#, the effective
|
|
|
|
resolution will fall off linearly from the center of the image to its edges.
|
Change log for February 27, 2017 Vulkan 1.0.42 spec update:
* Bump API patch number and header version number to 42 for this update
(the first anniversary edition).
Github Issues:
* Changed asciidoctor macros so cross-page links in the standalone
reference pages function properly (public issue 462).
Internal Issues:
* Clarified host visibility discussion for slink:VkMemoryType,
flink:vkInvalidateMappedMemoryRanges, elink:VkAccessFlagBits, and the
<<synchronization-framebuffer-regions,Framebuffer Region Dependencies>>
section, removing duplicated information and adding a central definition
in the access types section (internal issue 552).
* Change description of
slink:vkGetPhysicalDeviceSurfacePresentModesKHR::pname:pPresentModes to
return an array of values, not structures (internal issue 699).
New Extensions:
* Add a NOTE to the <<extensions,Layers & Extensions>> chapter describing
the experimental status of `KHX` extensions.
* Add new Khronos, Khronos Experimental, and vendor Vulkan extensions for
release at GDC:
** VK_KHR_descriptor_update_template
** VK_KHR_push_descriptor
** VK_KHX_device_group
** VK_KHX_device_group_creation
** VK_KHX_external_memory
** VK_KHX_external_memory_capabilities
** VK_KHX_external_memory_fd
** VK_KHX_external_memory_win32
** VK_KHX_external_semaphore
** VK_KHX_external_semaphore_capabilities
** VK_KHX_external_semaphore_fd
** VK_KHX_external_semaphore_win32
** VK_KHX_multiview
** VK_KHX_win32_keyed_mutex
** VK_EXT_discard_rectangles
** VK_MVK_ios_surface
** VK_MVK_macos_surface
** VK_NVX_multiview_per_view_attributes
** VK_NV_clip_space_w_scaling
** VK_NV_geometry_shader_passthrough
** VK_NV_sample_mask_override_coverage
** VK_NV_viewport_array2
** VK_NV_viewport_swizzle
* Add new GLSL vendor extensions to support new builtin variables:
** GL_EXT_device_group
** GL_EXT_multiview
2017-02-26 22:54:26 -08:00
|
|
|
|
|
|
|
=== New Object Types
|
|
|
|
|
|
|
|
None.
|
|
|
|
|
|
|
|
=== New Enum Constants
|
|
|
|
|
|
|
|
* Extending elink:VkStructureType:
|
|
|
|
** ename:VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV
|
|
|
|
* Extending elink:VkDynamicState:
|
Change log for November 12, 2018 Vulkan 1.1.92 spec update:
* Update release number to 92.
Public Issues:
* Move and modify valid usage statements dealing with pname:aspectMask in
flink:vkCmdClearColorImage, flink:vkCmdClearDepthStencilImage, and
slink:VkClearAttachment, so they are in places where all necessary
information is available (public issue 529).
* Fix math markup in <<textures-texel-anisotropic-filtering, Texel
Anisotropic Filtering>> (public pull request 840).
* Fix misspellings (public pull request 845).
Internal Issues:
* Add installation instructions and a Makefile "`chunked`" target for
chunked HTML generation (internal issue 1352).
* Fix pipeline mesh diagram style; also fix a minor bug in the classic
pipeline diagram where vertex/index buffers wrongly fed into the vertex
shader (internal issue 1436).
* Make asciidoctor ERROR output raise an error, and don't suppress
executed command output from CI make invocation (internal issue 1454).
* Minor typo fixes and clarifications for `VK_NV_raytracing`.
* Cleanup extension-specific properties
** Remove duplicated documentation for pname:maxDiscardRectangles,
pname:pointClippingBehavior, and pname:maxVertexAttribDivisor (they
shouldn't be documented with the other members of
slink:VkPhysicalDeviceLimits at all).
** Remove duplicate anchor for pname:maxVertexAttribDivisor
** Consistently document stext:VkPhysicalDevice<Extension>PropertiesKHR
*** Always document pname:sType/pname:pNext (was inconsistent before)
*** Always mention chaining to slink:VkPhysicalDeviceProperties2 (and not
as slink:VkPhysicalDeviceProperties2KHR)
*** Always include Valid Usage statements last
* Update Makefile 'checklinks' target and associated scripts, and fix
markup problems identified by checkLinks.py, so that we can rely on the
checklinks script as part of Gitlab CI.
2018-11-12 04:40:40 -08:00
|
|
|
** ename:VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV
|
Change log for February 27, 2017 Vulkan 1.0.42 spec update:
* Bump API patch number and header version number to 42 for this update
(the first anniversary edition).
Github Issues:
* Changed asciidoctor macros so cross-page links in the standalone
reference pages function properly (public issue 462).
Internal Issues:
* Clarified host visibility discussion for slink:VkMemoryType,
flink:vkInvalidateMappedMemoryRanges, elink:VkAccessFlagBits, and the
<<synchronization-framebuffer-regions,Framebuffer Region Dependencies>>
section, removing duplicated information and adding a central definition
in the access types section (internal issue 552).
* Change description of
slink:vkGetPhysicalDeviceSurfacePresentModesKHR::pname:pPresentModes to
return an array of values, not structures (internal issue 699).
New Extensions:
* Add a NOTE to the <<extensions,Layers & Extensions>> chapter describing
the experimental status of `KHX` extensions.
* Add new Khronos, Khronos Experimental, and vendor Vulkan extensions for
release at GDC:
** VK_KHR_descriptor_update_template
** VK_KHR_push_descriptor
** VK_KHX_device_group
** VK_KHX_device_group_creation
** VK_KHX_external_memory
** VK_KHX_external_memory_capabilities
** VK_KHX_external_memory_fd
** VK_KHX_external_memory_win32
** VK_KHX_external_semaphore
** VK_KHX_external_semaphore_capabilities
** VK_KHX_external_semaphore_fd
** VK_KHX_external_semaphore_win32
** VK_KHX_multiview
** VK_KHX_win32_keyed_mutex
** VK_EXT_discard_rectangles
** VK_MVK_ios_surface
** VK_MVK_macos_surface
** VK_NVX_multiview_per_view_attributes
** VK_NV_clip_space_w_scaling
** VK_NV_geometry_shader_passthrough
** VK_NV_sample_mask_override_coverage
** VK_NV_viewport_array2
** VK_NV_viewport_swizzle
* Add new GLSL vendor extensions to support new builtin variables:
** GL_EXT_device_group
** GL_EXT_multiview
2017-02-26 22:54:26 -08:00
|
|
|
|
|
|
|
=== New Enums
|
|
|
|
|
|
|
|
None.
|
|
|
|
|
|
|
|
=== New Structures
|
|
|
|
|
|
|
|
* slink:VkViewportWScalingNV
|
|
|
|
* slink:VkPipelineViewportWScalingStateCreateInfoNV
|
|
|
|
|
|
|
|
=== New Functions
|
|
|
|
|
|
|
|
* flink:vkCmdSetViewportWScalingNV
|
|
|
|
|
|
|
|
=== Issues
|
|
|
|
|
2017-07-11 17:57:41 -07:00
|
|
|
1) Is the pipeline struct name too long?
|
|
|
|
|
|
|
|
*RESOLVED*: It fits with the naming convention.
|
|
|
|
|
|
|
|
2) Separate W scaling section or fold into coordinate transformations?
|
|
|
|
|
|
|
|
*RESOLVED*: Leaving it as its own section for now.
|
Change log for February 27, 2017 Vulkan 1.0.42 spec update:
* Bump API patch number and header version number to 42 for this update
(the first anniversary edition).
Github Issues:
* Changed asciidoctor macros so cross-page links in the standalone
reference pages function properly (public issue 462).
Internal Issues:
* Clarified host visibility discussion for slink:VkMemoryType,
flink:vkInvalidateMappedMemoryRanges, elink:VkAccessFlagBits, and the
<<synchronization-framebuffer-regions,Framebuffer Region Dependencies>>
section, removing duplicated information and adding a central definition
in the access types section (internal issue 552).
* Change description of
slink:vkGetPhysicalDeviceSurfacePresentModesKHR::pname:pPresentModes to
return an array of values, not structures (internal issue 699).
New Extensions:
* Add a NOTE to the <<extensions,Layers & Extensions>> chapter describing
the experimental status of `KHX` extensions.
* Add new Khronos, Khronos Experimental, and vendor Vulkan extensions for
release at GDC:
** VK_KHR_descriptor_update_template
** VK_KHR_push_descriptor
** VK_KHX_device_group
** VK_KHX_device_group_creation
** VK_KHX_external_memory
** VK_KHX_external_memory_capabilities
** VK_KHX_external_memory_fd
** VK_KHX_external_memory_win32
** VK_KHX_external_semaphore
** VK_KHX_external_semaphore_capabilities
** VK_KHX_external_semaphore_fd
** VK_KHX_external_semaphore_win32
** VK_KHX_multiview
** VK_KHX_win32_keyed_mutex
** VK_EXT_discard_rectangles
** VK_MVK_ios_surface
** VK_MVK_macos_surface
** VK_NVX_multiview_per_view_attributes
** VK_NV_clip_space_w_scaling
** VK_NV_geometry_shader_passthrough
** VK_NV_sample_mask_override_coverage
** VK_NV_viewport_array2
** VK_NV_viewport_swizzle
* Add new GLSL vendor extensions to support new builtin variables:
** GL_EXT_device_group
** GL_EXT_multiview
2017-02-26 22:54:26 -08:00
|
|
|
|
|
|
|
=== Examples
|
|
|
|
|
|
|
|
[source,c++]
|
|
|
|
--------------------------------------
|
|
|
|
|
|
|
|
VkViewport viewports[4];
|
|
|
|
VkRect2D scissors[4];
|
|
|
|
VkViewportWScalingNV scalings[4];
|
|
|
|
|
|
|
|
for (int i = 0; i < 4; i++) {
|
|
|
|
int x = (i & 2) ? 0 : currentWindowWidth / 2;
|
|
|
|
int y = (i & 1) ? 0 : currentWindowHeight / 2;
|
|
|
|
|
|
|
|
viewports[i].x = 0;
|
|
|
|
viewports[i].y = 0;
|
|
|
|
viewports[i].width = currentWindowWidth;
|
|
|
|
viewports[i].height = currentWindowHeight;
|
|
|
|
viewports[i].minDepth = 0.0f;
|
|
|
|
viewports[i].maxDepth = 1.0f;
|
|
|
|
|
|
|
|
scissors[i].offset.x = x;
|
|
|
|
scissors[i].offset.y = y;
|
|
|
|
scissors[i].extent.width = currentWindowWidth/2;
|
|
|
|
scissors[i].extent.height = currentWindowHeight/2;
|
|
|
|
|
|
|
|
const float factor = 0.15;
|
|
|
|
scalings[i].xcoeff = ((i & 2) ? -1.0 : 1.0) * factor;
|
|
|
|
scalings[i].ycoeff = ((i & 1) ? -1.0 : 1.0) * factor;
|
|
|
|
}
|
|
|
|
|
|
|
|
VkPipelineViewportWScalingStateCreateInfoNV vpWScalingStateInfo = { VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV };
|
|
|
|
|
|
|
|
vpWScalingStateInfo.viewportWScalingEnable = VK_TRUE;
|
|
|
|
vpWScalingStateInfo.viewportCount = 4;
|
|
|
|
vpWScalingStateInfo.pViewportWScalings = &scalings[0];
|
|
|
|
|
|
|
|
VkPipelineViewportStateCreateInfo vpStateInfo = { VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO };
|
|
|
|
vpStateInfo.viewportCount = 4;
|
|
|
|
vpStateInfo.pViewports = &viewports[0];
|
|
|
|
vpStateInfo.scissorCount = 4;
|
|
|
|
vpStateInfo.pScissors = &scissors[0];
|
|
|
|
vpStateInfo.pNext = &vpWScalingStateInfo;
|
|
|
|
|
|
|
|
--------------------------------------
|
|
|
|
|
|
|
|
Example shader to read from a w-scaled texture:
|
|
|
|
|
|
|
|
[source,c++]
|
|
|
|
--------------------------------------
|
|
|
|
|
|
|
|
// Vertex Shader
|
|
|
|
// Draw a triangle that covers the whole screen
|
|
|
|
const vec4 positions[3] = vec4[3](vec4(-1, -1, 0, 1),
|
|
|
|
vec4( 3, -1, 0, 1),
|
|
|
|
vec4(-1, 3, 0, 1));
|
|
|
|
out vec2 uv;
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
vec4 pos = positions[ gl_VertexID ];
|
|
|
|
gl_Position = pos;
|
|
|
|
uv = pos.xy;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Fragment Shader
|
|
|
|
uniform sampler2D tex;
|
|
|
|
uniform float xcoeff;
|
|
|
|
uniform float ycoeff;
|
|
|
|
out vec4 Color;
|
|
|
|
in vec2 uv;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
// Handle uv as if upper right quadrant
|
|
|
|
vec2 uvabs = abs(uv);
|
|
|
|
|
|
|
|
// unscale: transform w-scaled image into an unscaled image
|
|
|
|
// scale: transform unscaled image int a w-scaled image
|
|
|
|
float unscale = 1.0 / (1 + xcoeff * uvabs.x + xcoeff * uvabs.y);
|
|
|
|
//float scale = 1.0 / (1 - xcoeff * uvabs.x - xcoeff * uvabs.y);
|
|
|
|
|
|
|
|
vec2 P = vec2(unscale * uvabs.x, unscale * uvabs.y);
|
|
|
|
|
|
|
|
// Go back to the right quadrant
|
|
|
|
P *= sign(uv);
|
|
|
|
|
|
|
|
Color = texture(tex, P * 0.5 + 0.5);
|
|
|
|
}
|
|
|
|
--------------------------------------
|
|
|
|
|
|
|
|
=== Version History
|
|
|
|
|
|
|
|
* Revision 1, 2017-02-15 (Eric Werness)
|
|
|
|
- Internal revisions
|