diff --git a/ChangeLog.txt b/ChangeLog.txt
index fdc9f809..00e200de 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1394,11 +1394,11 @@ Internal Issues:
Other Issues:
- * Reflowed text of the entire spec using the 'reflow' Makefile gater,
- to (hopefully) reduce future internal git churn as edits are made
- and extensions added in return for one-time pain. This has no
- perceptible change on the spec outputs but considerable changes on
- the asciidoc source (internal issue 367).
+ * Reflowed text of the entire spec using the 'reflow' Makefile target, to
+ (hopefully) reduce future internal git churn as edits are made and
+ extensions added in return for one-time pain. This has no perceptible
+ effect on the spec outputs, but considerable changes on the asciidoc
+ source (internal issue 367).
-----------------------------------------------------
@@ -1558,3 +1558,43 @@ Internal Issues:
validity. Doesn't affect output, other than some statements
appearing in another block now (internal issue 513).
+-----------------------------------------------------
+
+Change log for November 11, 2016 Vulkan 1.0.33 spec update:
+
+ * Bump API patch number and header version number to 33 for this update.
+
+Github Issues:
+
+ * Added implicit external synchronization parameters to
+ vkBegin/EndCommandBuffer, and fixed missing command pool host
+ synchronization from per-command lists (public issue 398).
+ * Started using git tags including the spec release number, such as
+ 'v1.0.32-core', instead of tags including the date of release, such as
+ 'v1.0-core-20161025' (public issue 405).
+
+Internal Issues:
+
+ * Add validity constraint for
+ slink:VkImportMemoryWin32HandleInfoNV::pname:handle (internal issue
+ #480).
+ * Add scripts to compare two Vulkan HTML specifications, derived from W3
+ htmldiff service (internal issue 525).
+ * Relax requirement that memoryTypeBits can't depend on format, to allow
+ it to differ only for depth/stencil formats (internal issue 544).
+ * Add a new generator script to create a simple extension loader for
+ Vulkan based on +vk.xml+ (internal issue 558).
+ * Add the overlooked requirement that buffer and image memory
+ alignment requirements must be a power of two in the
+ <
-2016/08/25 - Update for the single-branch model.
+2016-08-25 - Update for the single-branch model.
-2016/07/10 - Update for current state of spec and ref page generation.
+2016-07-10 - Update for current state of spec and ref page generation.
-2015/11/11 - Add new can etc. macros and DBLATEXPREFIX variable.
+2015-11-11 - Add new can etc. macros and DBLATEXPREFIX variable.
-2015/09/21 - Convert document to asciidoc and rename to README.md
+2015-09-21 - Convert document to asciidoc and rename to README.md
in the hope the gitlab browser will render it in some fashion.
-2015/09/21 - Add descriptions of LaTeX+MathJax math support for all
+2015-09-21 - Add descriptions of LaTeX+MathJax math support for all
output formats.
-2015/09/02 - Added Cygwin package info.
+2015-09-02 - Added Cygwin package info.
-2015/09/02 - Initial version documenting macros, required toolchain
+2015-09-02 - Initial version documenting macros, required toolchain
components and versions, etc.
Tip: if the document uses the W3C convention on linking to its previous version, you can specify only the address of the new document — the previous link will be automatically detected.
+This service relies on GNU diff. The found differences are roughly marked as follow: +
diff --git a/doc/specs/vulkan/appendices/VK_KHR_android_surface/vk_khr_android_surface.txt b/doc/specs/vulkan/appendices/VK_KHR_android_surface/vk_khr_android_surface.txt index b3f80e64..e38090e8 100644 --- a/doc/specs/vulkan/appendices/VK_KHR_android_surface/vk_khr_android_surface.txt +++ b/doc/specs/vulkan/appendices/VK_KHR_android_surface/vk_khr_android_surface.txt @@ -11,7 +11,7 @@ *Registered Extension Number*:: 9 *Last Modified Date*:: - 2016-14-01 + 2016-01-14 *Revision*:: 6 *IP Status*:: diff --git a/doc/specs/vulkan/appendices/VK_KHR_surface/vk_khr_surface.txt b/doc/specs/vulkan/appendices/VK_KHR_surface/vk_khr_surface.txt index 34d68bf7..334a4cb9 100644 --- a/doc/specs/vulkan/appendices/VK_KHR_surface/vk_khr_surface.txt +++ b/doc/specs/vulkan/appendices/VK_KHR_surface/vk_khr_surface.txt @@ -11,7 +11,7 @@ *Registered Extension Number*:: 1 *Last Modified Date*:: - 2016-14-01 + 2016-08-25 *Revision*:: 25 *IP Status*:: diff --git a/doc/specs/vulkan/chapters/VK_EXT_debug_marker.txt b/doc/specs/vulkan/chapters/VK_EXT_debug_marker.txt index c361d990..91d4424f 100644 --- a/doc/specs/vulkan/chapters/VK_EXT_debug_marker.txt +++ b/doc/specs/vulkan/chapters/VK_EXT_debug_marker.txt @@ -44,8 +44,7 @@ The sname:VkDebugMarkerObjectNameInfoEXT structure is defined as: include::../api/structs/VkDebugMarkerObjectNameInfoEXT.txt[] - * pname:sType is the type of this structure and must: be - ename:VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT. + * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:objectType is a elink:VkDebugReportObjectTypeEXT specifying the type of the object to be named. @@ -90,8 +89,7 @@ The sname:VkDebugMarkerObjectTagInfoEXT structure is defined as: include::../api/structs/VkDebugMarkerObjectTagInfoEXT.txt[] - * pname:sType is the type of this structure and must: be - ename:VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT. + * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:objectType is a elink:VkDebugReportObjectTypeEXT specifying the type of the object to be named. @@ -200,8 +198,7 @@ The sname:VkDebugMarkerMarkerInfoEXT structure is defined as: include::../api/structs/VkDebugMarkerMarkerInfoEXT.txt[] - * pname:sType is the type of this structure and must: be - ename:VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT. + * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:pMarkerName is a pointer to a null-terminated UTF-8 string that contains the name of the marker. diff --git a/doc/specs/vulkan/chapters/VK_KHR_android_surface/platformCreateSurface_android.txt b/doc/specs/vulkan/chapters/VK_KHR_android_surface/platformCreateSurface_android.txt index 50240340..df6e5fb3 100644 --- a/doc/specs/vulkan/chapters/VK_KHR_android_surface/platformCreateSurface_android.txt +++ b/doc/specs/vulkan/chapters/VK_KHR_android_surface/platformCreateSurface_android.txt @@ -55,8 +55,7 @@ The sname:VkAndroidSurfaceCreateInfoKHR structure is defined as: include::../../api/structs/VkAndroidSurfaceCreateInfoKHR.txt[] - * pname:sType is the type of this structure and must: be - ename:VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR. + * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:flags is reserved for future use. * pname:window is a pointer to the code:ANativeWindow to associate the diff --git a/doc/specs/vulkan/chapters/VK_KHR_display/display.txt b/doc/specs/vulkan/chapters/VK_KHR_display/display.txt index edb05f8a..b3bc07cd 100644 --- a/doc/specs/vulkan/chapters/VK_KHR_display/display.txt +++ b/doc/specs/vulkan/chapters/VK_KHR_display/display.txt @@ -277,8 +277,7 @@ The sname:VkDisplayModeCreateInfoKHR structure is defined as: include::../../api/structs/VkDisplayModeCreateInfoKHR.txt[] - * pname:sType is the type of this structure and must: be - ename:VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR. + * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:flags is reserved for future use, and must: be zero. * pname:parameters is a sname:VkDisplayModeParametersKHR structure @@ -413,8 +412,7 @@ The sname:VkDisplaySurfaceCreateInfoKHR structure is defined as: include::../../api/structs/VkDisplaySurfaceCreateInfoKHR.txt[] - * pname:sType is the type of this structure and must: be - ename:VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR. + * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:flags is reserved for future use, and must: be zero. * pname:displayMode is the mode to use when displaying this surface. diff --git a/doc/specs/vulkan/chapters/VK_KHR_display_swapchain/display_swapchain_present.txt b/doc/specs/vulkan/chapters/VK_KHR_display_swapchain/display_swapchain_present.txt index 875d2da6..099477e3 100644 --- a/doc/specs/vulkan/chapters/VK_KHR_display_swapchain/display_swapchain_present.txt +++ b/doc/specs/vulkan/chapters/VK_KHR_display_swapchain/display_swapchain_present.txt @@ -14,8 +14,7 @@ The sname:VkDisplayPresentInfoKHR structure is defined as: include::../../api/structs/VkDisplayPresentInfoKHR.txt[] - * pname:sType is the type of this structure and must: be - ename:VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR. + * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:srcRect is a rectangular region of pixels to present. It must: be a subset of the image being presented. diff --git a/doc/specs/vulkan/chapters/VK_KHR_mir_surface/platformCreateSurface_mir.txt b/doc/specs/vulkan/chapters/VK_KHR_mir_surface/platformCreateSurface_mir.txt index b5691efb..309f5957 100644 --- a/doc/specs/vulkan/chapters/VK_KHR_mir_surface/platformCreateSurface_mir.txt +++ b/doc/specs/vulkan/chapters/VK_KHR_mir_surface/platformCreateSurface_mir.txt @@ -29,8 +29,7 @@ The sname:VkMirSurfaceCreateInfoKHR structure is defined as: include::../../api/structs/VkMirSurfaceCreateInfoKHR.txt[] - * pname:sType is the type of this structure and must: be - ename:VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR. + * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:flags is reserved for future use. * pname:connection and pname:surface are pointers to the diff --git a/doc/specs/vulkan/chapters/VK_KHR_swapchain/wsi.txt b/doc/specs/vulkan/chapters/VK_KHR_swapchain/wsi.txt index 95f8bd0f..da2d4b87 100644 --- a/doc/specs/vulkan/chapters/VK_KHR_swapchain/wsi.txt +++ b/doc/specs/vulkan/chapters/VK_KHR_swapchain/wsi.txt @@ -90,8 +90,7 @@ The sname:VkSwapchainCreateInfoKHR structure is defined as: include::../../api/structs/VkSwapchainCreateInfoKHR.txt[] - * pname:sType is the type of this structure and must: be - ename:VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR. + * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:flags is reserved for future use, and must: be zero. * pname:surface is the surface that the swapchain will present images to. @@ -678,8 +677,7 @@ The sname:VkPresentInfoKHR structure is defined as: include::../../api/structs/VkPresentInfoKHR.txt[] - * pname:sType is the type of this structure and must: be - ename:VK_STRUCTURE_TYPE_PRESENT_INFO_KHR. + * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:waitSemaphoreCount is the number of semaphores to wait for before issuing the present request. diff --git a/doc/specs/vulkan/chapters/VK_KHR_wayland_surface/platformCreateSurface_wayland.txt b/doc/specs/vulkan/chapters/VK_KHR_wayland_surface/platformCreateSurface_wayland.txt index 415f83fb..739b1126 100644 --- a/doc/specs/vulkan/chapters/VK_KHR_wayland_surface/platformCreateSurface_wayland.txt +++ b/doc/specs/vulkan/chapters/VK_KHR_wayland_surface/platformCreateSurface_wayland.txt @@ -29,8 +29,7 @@ The sname:VkWaylandSurfaceCreateInfoKHR structure is defined as: include::../../api/structs/VkWaylandSurfaceCreateInfoKHR.txt[] - * pname:sType is the type of this structure and must: be - ename:VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR. + * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:flags is reserved for future use. * pname:display and pname:surface are pointers to the Wayland diff --git a/doc/specs/vulkan/chapters/VK_KHR_win32_surface/platformCreateSurface_win32.txt b/doc/specs/vulkan/chapters/VK_KHR_win32_surface/platformCreateSurface_win32.txt index 05ad5824..f2e10551 100644 --- a/doc/specs/vulkan/chapters/VK_KHR_win32_surface/platformCreateSurface_win32.txt +++ b/doc/specs/vulkan/chapters/VK_KHR_win32_surface/platformCreateSurface_win32.txt @@ -29,8 +29,7 @@ The sname:VkWin32SurfaceCreateInfoKHR structure is defined as: include::../../api/structs/VkWin32SurfaceCreateInfoKHR.txt[] - * pname:sType is the type of this structure and must: be - ename:VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR. + * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:flags is reserved for future use. * pname:hinstance and pname:hwnd are the Win32 code:HINSTANCE and diff --git a/doc/specs/vulkan/chapters/VK_KHR_xcb_surface/platformCreateSurface_xcb.txt b/doc/specs/vulkan/chapters/VK_KHR_xcb_surface/platformCreateSurface_xcb.txt index 4372294b..6cf326c3 100644 --- a/doc/specs/vulkan/chapters/VK_KHR_xcb_surface/platformCreateSurface_xcb.txt +++ b/doc/specs/vulkan/chapters/VK_KHR_xcb_surface/platformCreateSurface_xcb.txt @@ -30,8 +30,7 @@ The sname:VkXcbSurfaceCreateInfoKHR structure is defined as: include::../../api/structs/VkXcbSurfaceCreateInfoKHR.txt[] - * pname:sType is the type of this structure and must: be - ename:VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR. + * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:flags is reserved for future use. * pname:connection is a pointer to an code:xcb_connection_t to the X diff --git a/doc/specs/vulkan/chapters/VK_KHR_xlib_surface/platformCreateSurface_xlib.txt b/doc/specs/vulkan/chapters/VK_KHR_xlib_surface/platformCreateSurface_xlib.txt index 04ab7b08..e01c8008 100644 --- a/doc/specs/vulkan/chapters/VK_KHR_xlib_surface/platformCreateSurface_xlib.txt +++ b/doc/specs/vulkan/chapters/VK_KHR_xlib_surface/platformCreateSurface_xlib.txt @@ -30,8 +30,7 @@ The sname:VkXlibSurfaceCreateInfoKHR structure is defined as: include::../../api/structs/VkXlibSurfaceCreateInfoKHR.txt[] - * pname:sType is the type of this structure and must: be - ename:VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR. + * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:flags is reserved for future use. * pname:dpy is a pointer to an Xlib code:Display connection to the X diff --git a/doc/specs/vulkan/chapters/VK_NV_external_memory_win32/import_memory_win32.txt b/doc/specs/vulkan/chapters/VK_NV_external_memory_win32/import_memory_win32.txt index b886d680..8ae12c26 100644 --- a/doc/specs/vulkan/chapters/VK_NV_external_memory_win32/import_memory_win32.txt +++ b/doc/specs/vulkan/chapters/VK_NV_external_memory_win32/import_memory_win32.txt @@ -19,22 +19,30 @@ include::../../api/structs/VkImportMemoryWin32HandleInfoNV.txt[] // refBegin VkExternalMemoryHandleTypeFlagBitsNV - Bitmask specifying memory handle types include::../../api/enums/VkExternalMemoryHandleTypeFlagBitsNV.txt[] -- - * pname:handle is a Windows code:HANDLE referring to the memory. ** if pname:handleType is ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV or - ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV, - pname:handle must: be a valid handle returned by - flink:vkGetMemoryWin32HandleNV or, in the case of - ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV, a handle + ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV, the + handle is one returned by flink:vkGetMemoryWin32HandleNV or, in the + case of ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV, one duplicated from such a handle using `DuplicateHandle()`. ** if pname:handleType is - ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV, pname:handle - must: be a valid NT handle returned by - `IDXGIResource1::ftext:CreateSharedHandle()` or a handle duplicated + ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV, the handle is + a valid NT handle returned by + `IDXGIResource1::ftext:CreateSharedHandle()`, or a handle duplicated from such a handle using `DuplicateHandle()`. ** if pname:handleType is - ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV, - pname:handle must: be a valid handle returned by - `IDXGIResource::GetSharedHandle()`. + ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV, the handle + is one returned by `IDXGIResource::GetSharedHandle()`. + * pname:handle is a Windows code:HANDLE referring to the memory. + +If pname:handleType is 0, this structure is ignored by consumers of the +slink:VkMemoryAllocateInfo structure it is chained from. + +.Valid Usage +**** + * pname:handleType must: not have more than one bit set. + * pname:handle must: be a valid handle to memory, obtained as specified by + pname:handleType. +**** include::../../validity/structs/VkImportMemoryWin32HandleInfoNV.txt[] diff --git a/doc/specs/vulkan/chapters/resources.txt b/doc/specs/vulkan/chapters/resources.txt index a1e0904b..443ac940 100644 --- a/doc/specs/vulkan/chapters/resources.txt +++ b/doc/specs/vulkan/chapters/resources.txt @@ -1761,16 +1761,25 @@ flink:vkGetImageMemoryRequirements: pname:memoryTypeBits returned for code:usage1 must: be a subset of the bits set in pname:memoryTypeBits returned for code:usage2, for all values of pname:flags. + * The pname:alignment member is a power of two. * The pname:alignment member is identical for all sname:VkBuffer objects created with the same combination of values for the pname:usage and pname:flags members in the sname:VkBufferCreateInfo structure passed to fname:vkCreateBuffer. - * The pname:memoryTypeBits member is identical for all sname:VkImage - objects created with the same combination of values for the pname:tiling - member and the ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT bit of the - pname:flags member and the ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT - of the pname:usage member in the sname:VkImageCreateInfo structure - passed to fname:vkCreateImage. + * For images created with a color format, the pname:memoryTypeBits member + is identical for all sname:VkImage objects created with the same + combination of values for the pname:tiling member, the + ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT bit of the pname:flags member, + and the ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT of the pname:usage + member in the sname:VkImageCreateInfo structure passed to + fname:vkCreateImage. + * For images created with a depth/stencil format, the pname:memoryTypeBits + member is identical for all sname:VkImage objects created with the same + combination of values for the pname:format member, the pname:tiling + member, the ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT bit of the + pname:flags member, and the + ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT of the pname:usage member + in the sname:VkImageCreateInfo structure passed to fname:vkCreateImage. * If the memory requirements are for a sname:VkImage, the pname:memoryTypeBits member must: not refer to a sname:VkMemoryType with a pname:propertyFlags that has the diff --git a/doc/specs/vulkan/genRelease b/doc/specs/vulkan/genRelease index 73b1917c..bdadb426 100755 --- a/doc/specs/vulkan/genRelease +++ b/doc/specs/vulkan/genRelease @@ -47,4 +47,4 @@ buildBranch('1.0', print('echo Info: post-generation cleanup') -createTags(buildOnFriday()) +createTags(releaseNum(), buildOnFriday()) diff --git a/doc/specs/vulkan/genspec.py b/doc/specs/vulkan/genspec.py index ff140de7..c27a7852 100644 --- a/doc/specs/vulkan/genspec.py +++ b/doc/specs/vulkan/genspec.py @@ -60,6 +60,10 @@ allExtensions = KHRextensions + [ 'VK_NV_glsl_shader' ] +# Return the Vulkan release number, used for tags +def releaseNum(): + return '$REVISION' + # Return a date for the current, or upcoming if not already, Friday, # which is when releases happen def buildOnFriday(): @@ -154,12 +158,15 @@ def buildBranch(targetDir, extensions, apititle, miscSrc, miscDst, needRefSources) # Commands to tag the git branches -# tagdate = date to tag the tree with when done -def createTags(tagdate): +# releaseNum = release number of this spec update, to tag the tree with +# tagdate = date (used to be used to tag the tree with) +def createTags(releaseNum, tagdate): # Tag date in YYYYMMDD format now = tagdate.strftime('%Y%m%d') print('echo To tag the spec branch for this release, execute the command:') - print('echo git tag -a -m \\"Tag Vulkan API specification for', now, - 'release\\"', 'v1.0-core-' + now) + print('echo git tag -a -m \\"Tag Vulkan API specification for 1.0.' + + releaseNum, 'release\\"', 'v1.0.' + releaseNum + '-core') + #print('echo git tag -a -m \\"Tag Vulkan API specification for', now, + # 'release\\"', 'v1.0-core-' + now) diff --git a/doc/specs/vulkan/scripts/README.md b/doc/specs/vulkan/scripts/README.md new file mode 100644 index 00000000..2e40f5a9 --- /dev/null +++ b/doc/specs/vulkan/scripts/README.md @@ -0,0 +1,26 @@ +HTML Diff Script for Vulkan +=========================== + +This is a first cut at a script to compare Vulkan HTML specifications. Usage +is simply 'htmldiff file1.html file2.html > diff.html'. The script does not +copy CSS and images requires by the input specs, so it's best to generate +the output in the same directory as one of the inputs. + +The scripts used require Python and Perl. Additionally, the python +'utidylib' module and the underlying libtidy C library are required, +which may make it challenging to run the scripts on non-Linux platforms +- I haven't checked and those requirements cannot be easily removed. On +Debian Linux, it may be necessary to install the 'python-utidylib' and +'libtidy' packages if they are not already present. I haven't checked +dependencies for other Linux distributions but they are probably +similar. + +The scripts are taken from the code backing the + + http://services.w3.org/htmldiff + +website. 'htmldiff' is the Python driver script. 'htmldiff.pl' is the +Perl script which generates the diff after preprocessing of the input +HTML by 'htmldiff'. 'htmldiff.orig' is the original Python script from +the website, modified to run at the command line instead of as a CGI +script. diff --git a/doc/specs/vulkan/scripts/htmldiff b/doc/specs/vulkan/scripts/htmldiff new file mode 100755 index 00000000..8525d1ca --- /dev/null +++ b/doc/specs/vulkan/scripts/htmldiff @@ -0,0 +1,78 @@ +#!/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"", 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]) + + p = Popen(['htmldiff.pl', 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) diff --git a/doc/specs/vulkan/scripts/htmldiff.orig b/doc/specs/vulkan/scripts/htmldiff.orig new file mode 100755 index 00000000..3b17e872 --- /dev/null +++ b/doc/specs/vulkan/scripts/htmldiff.orig @@ -0,0 +1,242 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +""" $Id: htmldiff,v 1.62 2016/10/06 10:46:19 dom Exp $ +""" + +import atexit +import cgi +import http_auth +import httplib +import os +import re +import surbl +import sys +import tempfile +import tidy +import urlparse + +from subprocess import Popen, PIPE + +CONTENT_TYPE = "text/html;charset=utf-8" + +Page = """ + + +
+ + +
+