mirror of
https://github.com/status-im/Vulkan-Docs.git
synced 2025-02-26 04:55:12 +00:00
* 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>>`
237 lines
4.9 KiB
Ruby
237 lines
4.9 KiB
Ruby
# Copyright (c) 2016-2019 The Khronos Group Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
require 'asciidoctor/extensions' unless RUBY_ENGINE == 'opal'
|
|
|
|
include ::Asciidoctor
|
|
|
|
class SpecInlineMacroBase < Extensions::InlineMacroProcessor
|
|
use_dsl
|
|
using_format :short
|
|
end
|
|
|
|
class NormativeInlineMacroBase < SpecInlineMacroBase
|
|
def text
|
|
'normative'
|
|
end
|
|
|
|
def process parent, target, attributes
|
|
'<strong class="purple">' + text + '</strong>'
|
|
end
|
|
end
|
|
|
|
class LinkInlineMacroBase < SpecInlineMacroBase
|
|
def process parent, target, attributes
|
|
if parent.document.attributes['cross-file-links']
|
|
return Inline.new(parent, :anchor, target, :type => :link, :target => (target + '.html')).convert
|
|
else
|
|
return Inline.new(parent, :anchor, target, :type => :xref, :target => ('#' + target), :attributes => {'fragment' => target, 'refid' => target}).convert
|
|
end
|
|
end
|
|
end
|
|
|
|
class CodeInlineMacroBase < SpecInlineMacroBase
|
|
def process parent, target, attributes
|
|
'<code>' + target + '</code>'
|
|
end
|
|
end
|
|
|
|
class StrongInlineMacroBase < SpecInlineMacroBase
|
|
def process parent, target, attributes
|
|
'<code>' + target + '</code>'
|
|
end
|
|
end
|
|
|
|
class ParamInlineMacroBase < SpecInlineMacroBase
|
|
def process parent, target, attributes
|
|
'<code>' + target + '</code>'
|
|
end
|
|
end
|
|
|
|
class CanInlineMacro < NormativeInlineMacroBase
|
|
named :can
|
|
match /can:(\w*)/
|
|
|
|
def text
|
|
'can'
|
|
end
|
|
end
|
|
|
|
class CannotInlineMacro < NormativeInlineMacroBase
|
|
named :cannot
|
|
match /cannot:(\w*)/
|
|
|
|
def text
|
|
'cannot'
|
|
end
|
|
end
|
|
|
|
class MayInlineMacro < NormativeInlineMacroBase
|
|
named :may
|
|
match /may:(\w*)/
|
|
|
|
def text
|
|
'may'
|
|
end
|
|
end
|
|
|
|
class MustInlineMacro < NormativeInlineMacroBase
|
|
named :must
|
|
match /must:(\w*)/
|
|
|
|
def text
|
|
'must'
|
|
end
|
|
end
|
|
|
|
class OptionalInlineMacro < NormativeInlineMacroBase
|
|
named :optional
|
|
match /optional:(\w*)/
|
|
|
|
def text
|
|
'optional'
|
|
end
|
|
end
|
|
|
|
class RequiredInlineMacro < NormativeInlineMacroBase
|
|
named :required
|
|
match /required:(\w*)/
|
|
|
|
def text
|
|
'required'
|
|
end
|
|
end
|
|
|
|
class ShouldInlineMacro < NormativeInlineMacroBase
|
|
named :should
|
|
match /should:(\w*)/
|
|
|
|
def text
|
|
'should'
|
|
end
|
|
end
|
|
|
|
class ReflinkInlineMacro < LinkInlineMacroBase
|
|
named :reflink
|
|
match /reflink:(\w+)/
|
|
end
|
|
|
|
class FlinkInlineMacro < LinkInlineMacroBase
|
|
named :flink
|
|
match /flink:(\w+)/
|
|
end
|
|
|
|
class FnameInlineMacro < StrongInlineMacroBase
|
|
named :fname
|
|
match /fname:(\w+)/
|
|
end
|
|
|
|
class FtextInlineMacro < StrongInlineMacroBase
|
|
named :ftext
|
|
match /ftext:([\w\*]+)/
|
|
end
|
|
|
|
class SnameInlineMacro < CodeInlineMacroBase
|
|
named :sname
|
|
match /sname:(\w+)/
|
|
end
|
|
|
|
class SlinkInlineMacro < LinkInlineMacroBase
|
|
named :slink
|
|
match /slink:(\w+)/
|
|
end
|
|
|
|
class StextInlineMacro < CodeInlineMacroBase
|
|
named :stext
|
|
match /stext:([\w\*]+)/
|
|
end
|
|
|
|
class EnameInlineMacro < CodeInlineMacroBase
|
|
named :ename
|
|
match /ename:(\w+)/
|
|
end
|
|
|
|
class ElinkInlineMacro < LinkInlineMacroBase
|
|
named :elink
|
|
match /elink:(\w+)/
|
|
end
|
|
|
|
class EtextInlineMacro < CodeInlineMacroBase
|
|
named :etext
|
|
match /etext:([\w\*]+)/
|
|
end
|
|
|
|
class PnameInlineMacro < ParamInlineMacroBase
|
|
named :pname
|
|
match /pname:(\w+(\.\w+)*)/
|
|
end
|
|
|
|
class PtextInlineMacro < ParamInlineMacroBase
|
|
named :ptext
|
|
match /ptext:([\w\*]+(\.[\w\*]+)*)/
|
|
end
|
|
|
|
class DnameInlineMacro < CodeInlineMacroBase
|
|
named :dname
|
|
match /dname:(\w+)/
|
|
end
|
|
|
|
class DlinkInlineMacro < LinkInlineMacroBase
|
|
named :dlink
|
|
match /dlink:(\w+)/
|
|
end
|
|
|
|
class TnameInlineMacro < CodeInlineMacroBase
|
|
named :tname
|
|
match /tname:(\w+)/
|
|
end
|
|
|
|
class TlinkInlineMacro < LinkInlineMacroBase
|
|
named :tlink
|
|
match /tlink:(\w+)/
|
|
end
|
|
|
|
class BasetypeInlineMacro < CodeInlineMacroBase
|
|
named :basetype
|
|
match /basetype:(\w+)/
|
|
end
|
|
|
|
class CodeInlineMacro < CodeInlineMacroBase
|
|
named :code
|
|
match /code:(\w+(\.\w+)*)/
|
|
end
|
|
|
|
# The tag: and attr: macros are only used in registry.txt
|
|
|
|
class TagInlineMacro < StrongInlineMacroBase
|
|
named :tag
|
|
match /tag:(\w+)/
|
|
end
|
|
|
|
class AttrInlineMacro < StrongInlineMacroBase
|
|
named :attr
|
|
match /attr:(\w+)/
|
|
end
|
|
|
|
# Does nothing - just markup that we've considered the use case
|
|
class UndefinedInlineMacro < SpecInlineMacroBase
|
|
named :undefined
|
|
match /undefined:/
|
|
|
|
def process parent, target, attributes
|
|
'undefined'
|
|
end
|
|
end
|
|
|