Jon Leech 1d67e47f14 Change log for June 4, 2017 Vulkan 1.0.51 spec update:
* Bump API patch number and header version number to 51 for this update.

Github Issues:

  * Add Valid Usage statement to flink:vkCmdResolveImage to require that
    source and destination image formats match (public issue 492).
  * Specify that a code:char* parameter must: be a valid null-terminated
    string in the <<fundamentals-implicit-validity, implicit valid usage>>
    section (public issue 494).
  * Removed unnecessary VU for slink:VkPhysicalDeviceFeatures which is
    covered by ename:VK_ERROR_FEATURE_NOT_PRESENT already (public issue
    496).
  * Clarify valid usage of pname:pQueueFamilyIndices in
    slink:VkBufferCreateInfo, slink:VkImageCreateInfo, and
    slink:VkSwapchainCreateInfoKHR (public issue 501).
  * Document that dependencies of enabled extensions must also be enabled in
    the <<extended-functionality-extensions-dependencies, Extension
    Dependencies>> section (public issue 507).

Internal Issues:

  * Change slink:VkMappedMemoryRange valid usage to allow pname:offset +
    pname:size == size of the allocation. Also, if ename:VK_WHOLE_SIZE is
    used, require the end of the mapping to be aligned to a multiple of
    pname:nonCoherentAtomSize (internal issue 611).
  * Add issue to `VK_KHR_win32_surface` about reusing window objects from a
    different graphics API or Vulkan ICD (internal issue 639).
  * Require locations on user in/out in `GL_KHR_vulkan_glsl` (internal issue
    783).
  * Added version info to the json validation output, and updated the schema
    to match (internal issue 838).
  * Restructure enumerated type descriptions separately from the command or
    structure they are used in, allowing better reference page generation
    (internal issue 841).
  * Re-sort extension appendices to be in alphabetical order within each
    author ID section.
  * Fix enum naming and clarify behavior for
    `VK_NVX_device_generated_commands` extension.

New Extensions:
2017-06-04 20:48:43 -07:00

82 lines
2.8 KiB
Python
Executable File

#!/usr/bin/python
#
# Modified from the htmldiff script developed by Dominique HazaC+l-Massieux
# for the http://services.w3.org/htmldiff website. That script did not
# include a copyright statement.
import atexit
import os
import re
import sys
import tempfile
import tidy
from subprocess import Popen, PIPE
def tidyFile(filename):
ifp = open(filename, 'r')
# option for tidy
options = dict(tidy_mark=0,show_warnings=0,quiet=1,char_encoding='utf8')
html5 = re.search(r"<!doctype\s+html\s*>", ifp.read(4096),
re.IGNORECASE)
ifp.seek(0)
html5_options = {'add_xml_space': 'no',
'output_xhtml': 'no',
'tidy_mark': 'no',
'new_blocklevel_tags': 'article,aside,canvas,dialog,details,figcaption,figure,footer,header,hgroup,menu,nav,section,main,summary,math,semantics,mrow,mfenced,mtable,mtr,mtd,mi,mn,msub,mo,mfrac,munderover,mtext,svg,g,image,rect,text,desc,line,path,polygon,ellipse,tspan,defs,feoffset,fecolormatrix,filter,fegaussianblur,feblend,marker,circle',
'new_inline_tags': 'video,audio,canvas,ruby,rt,rp,time,meter,progress,track,source,emu-val,emu-nt,emu-t,mark',
'break_before_br': 'no',
'vertical_space': 'no',
'enclose_text': 'no',
'numeric_entities': 'yes',
'wrap': '1000',
'wrap_attributes': 'no',
'drop_empty_paras': 'no'
}
if html5:
options.update(html5_options)
newtidy = tidy.parseString(ifp.read(), **options)
if len(newtidy.errors) > 0:
if not html5:
ifp.seek(0)
options.update(html5_options)
newtidy = tidy.parseString(ifp.read(), **options)
ifp.close()
fp = tempfile.NamedTemporaryFile(
mode='w+', prefix='htmldiff-', suffix='.html')
atexit.register(fp.close)
fp.write(str(newtidy))
fp.flush()
fp.seek(0)
# sys.stderr.write('tidyFile: tempfile name %s\n' % fp.name)
if (newtidy.errors):
sys.stderr.write('tidyFile: tidy.parseString error: %s\n' % str(newtidy.errors))
return fp
if __name__ == '__main__':
if (len(sys.argv) < 3):
sys.stderr.write('tidy: need args file1 file2\n')
sys.exit(1)
refdoc = tidyFile(sys.argv[1])
newdoc = tidyFile(sys.argv[2])
scriptdir = os.path.abspath(os.path.dirname(sys.argv[0]))
perlscript = os.path.join(scriptdir, 'htmldiff.pl')
p = Popen([perlscript, refdoc.name, newdoc.name],
stdin=PIPE, stdout=PIPE, stderr=PIPE)
sys.stdout.flush()
sys.stderr.flush()
(out, err) = p.communicate()
p.stdin.close()
if err:
sys.stderr.write('htmldiff: An error occured when running htmldiff.pl on the documents:', str(err))
exit(1)
else:
print(out)