Vulkan-Docs/appendices/VK_KHR_sampler_mirror_clamp_to_edge.txt
Jon Leech 59750fe4c7 Change log for August 25, 2019 Vulkan 1.1.121 spec update:
* Update release number to 121.

Github Issues:

  * Add missing `structextends` attribute in `vk.xml` for
    slink:VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR (public
    issue 1018).
  * Change attributes of flink:vkCmdCopyAccelerationStructureNV,
    flink:vkCmdWriteAccelerationStructuresPropertiesNV,
    flink:vkCmdBuildAccelerationStructureNV, and flink:vkCmdTraceRaysNV to
    require that these commands execute outside renderpasses (public issue
    1021).
  * Add an issue to the `<<VK_EXT_buffer_device_address>>` appendix
    discussing the introduction of new names and aliasing by equivalent old
    names (public pull request 1024).

Internal Issues:

  * Protect the `VK_KHR_sampler_mirror_clamp_to_edge` extension with
    asciidoctor conditionals, and remove it from the core-only specification
    builds, where it had previously been force-included in the Makefile. It
    is now treated like any other extension (internal issue 1776).
  * Edit some asciidoctor anchor names starting with `features-features-` to
    just start with `features-`, since the old chapters was split into 3
    pieces. There are still some mild naming inconsistencies with anchors
    which may be addressed in the future (internal issue 1792).
  * Add `KHR` alias for the non-suffixed extension token
    ename:VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE, for compatibility
    with naming rules for extensions (internal issue 1796).
  * Clarify requirements for external memory in NOTEs for
    sname:VkExternalMemoryBufferCreateInfo, and valid usage statements for
    flink:vkBindBufferMemory, slink:VkBindBufferMemoryInfo,
    flink:vkBindImageMemory, and slink:VkBindImageMemoryInfo (internal merge
    request 3301).
  * Make extension version numbers in `vk.xml` and extension appendices
    consistent. In a few cases, we could not recover history at this
    granularity, and left the summary of a version's change undefined
    (internal merge request 3323).
  * Fix invocation of `CodeInlineMacro` in the Ruby extension backing the
    `code:` macro, which was delegating to the wrong base class (internal
    merge request 3331).
  * Modify `reg.py` to do a better job of recognizing equivalent <enum>
    definitions.
  * Add a `sortorder` attribute to XML feature and extension tags.

New Extensions

  * `<<VK_AMD_device_coherent_memory>>`
2019-08-25 03:57:09 -07:00

79 lines
2.7 KiB
Plaintext

// Copyright (c) 2014-2019 Khronos Group. This work is licensed under a
// Creative Commons Attribution 4.0 International License; see
// http://creativecommons.org/licenses/by/4.0/
include::meta/VK_KHR_sampler_mirror_clamp_to_edge.txt[]
*Last Modified Date*::
2019-08-17
*Contributors*::
- Tobias Hector, Imagination Technologies
- Jon Leech, Khronos
`VK_KHR_sampler_mirror_clamp_to_edge` extends the set of sampler address
modes to include an additional mode
(ename:VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE) that effectively uses a
texture map twice as large as the original image in which the additional
half of the new image is a mirror image of the original image.
This new mode relaxes the need to generate images whose opposite edges match
by using the original image to generate a matching "`mirror image`".
This mode allows the texture to be mirrored only once in the negative s, t,
and r directions.
=== New Enum Constants
* Extending elink:VkSamplerAddressMode:
** ename:VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE
=== Example
Creating a sampler with the new address mode in each dimension
[source,c++]
----------------------------------------
VkSamplerCreateInfo createInfo =
{
VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO // sType
// Other members set to application-desired values
};
createInfo.addressModeU = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE;
createInfo.addressModeV = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE;
createInfo.addressModeW = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE;
VkSampler sampler;
VkResult result = vkCreateSampler(
device,
&createInfo,
&sampler);
----------------------------------------
=== Issues
1) Why are both KHR and core versions of the
ename:VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE token present?
*RESOLVED*: This functionality was intended to be required in Vulkan 1.0.
We realized shortly before public release that not all implementations could
support it, and moved the functionality into an optional extension, but did
not apply the KHR extension suffix.
Adding a KHR-suffixed alias of the non-suffixed enum has been done to comply
with our own naming rules.
In a related change, before spec revision 1.1.121 this extension was
hardwiring into the spec Makefile so it was always included with the
Specification, even in the core-only versions.
This has now been reverted, and it is treated as any other extension.
=== Version History
* Revision 1, 2016-02-16 (Tobias Hector)
- Initial draft
* Revision 2, 2019-08-14 (Jon Leech)
- Add KHR-suffixed alias of non-suffixed enum.
* Revision 3, 2019-08-17 (Jon Leech)
- Add an issue explaining the reason for the extension API not being
suffixed with KHR.