1Revision history for SPIRV-Tools 2 3v2019.2-dev 2019-01-07 4 - Start v2019.2-dev 5 6v2019.1 2019-01-07 7 - General: 8 - Created a new tool called spirv-reduce. 9 - Add cmake option to turn off SPIRV_TIMER_ENABLED (#2103) 10 - New optimization pass to update the memory model from GLSL450 to VulkanKHR. 11 - Recognize OpTypeAccelerationStructureNV as a type instruction and ray tracing storage classes. 12 - Fix GCC8 build. 13 - Add --target-env flag to spirv-opt. 14 - Add --webgpu-mode flag to run optimizations for webgpu. 15 - The output disassembled line number stead of byte offset in validation errors. (#2091) 16 - Optimizer 17 - Added the instrumentation passes for bindless validation. 18 - Added passes to help preserve OpLine information (#2027) 19 - Add basic support for EXT_fragment_invocation_density (#2100) 20 - Fix invalid OpPhi generated by merge-return. (#2172) 21 - Constant and type manager have been turned into analysies. (#2251) 22 Fixes: 23 - #2018: Don't inline functions with a return in a structured CFG contstruct. 24 - #2047: Fix bug in folding when volatile stores are present. 25 - #2053: Fix check for when folding floating pointer values is allowed. 26 - #2130: Don't inline recursive functions. 27 - #2202: Handle multiple edges between two basic blocks in SSA-rewriter. 28 - #2205: Don't unswitch a latch condition during loop unswitch. 29 - #2245: Don't fold branch in loop unswitch. Run dead branch elimination to fold them. 30 - #2204: Fix eliminate common uniform to place OpPhi instructions correctly. 31 - #2247: Fix type mismatches caused by scalar replacement. 32 - #2248: Fix missing OpPhi after merge return. 33 - #2211: After merge return, fix invalid continue target. 34 - #2210: Fix loop invariant code motion to not place code between merge instruction and branch. 35 - #2258: Handle CompositeInsert with no indices in VDCE. 36 - #2261: Have replace load size handle extact with no index. 37 - Validator 38 - Changed the naming convention of outputing ids with names in diagnostic messages. 39 - Added validation rules for UniformConstant variables in Vulkan. 40 - #1949: Validate uniform variable type in Vulkan 41 - Ensure for OpVariable that result type and storage class operand agree (#2052) 42 - Validator: Support VK_EXT_scalar_block_layout 43 - Added Vulkan memory model semantics validation 44 - Added validation checkes spefic to WebGPU environment. 45 - Add support for VK_EXT_Transform_feedback capabilities (#2088) 46 - Add validation for OpArrayLength. (#2117) 47 - Ensure that function parameter's type is not void (#2118) 48 - Validate pointer variables (#2111) 49 - Add check for QueueFamilyKHMR memory scope (#2144) 50 - Validate PushConstants annotation and type (#2140) 51 - Allow Float16/Int8 for Vulkan 1.0 (#2153) 52 - Check binding annotations in resource variables (#2151, #2167) 53 - Validate OpForwardPointer (#2156) 54 - Validate operation for OpSpecConstantOp (#2260) 55 Fixes: 56 - #2049: Allow InstanceId for NV ray tracing 57 - Reduce 58 - Initial commit wit a few passes to reduce test cases. 59 - Validation is run after each reduction step. 60 Fixes: 61 62 63v2018.6 2018-11-07 64 - General: 65 - Added support for the Nvidia Turing and ray tracing extensions. 66 - Make C++11 the CXX standard in CMakeLists.txt. 67 - Enabled a parallel build for MSVC. 68 - Enable pre-compiled headers for MSVC. 69 - Added a code of conduct. 70 - EFFCEE and RE2 are now required when build the tests. 71 - Optimizer 72 - Unrolling loops marked for unrolling in the legalization passes. 73 - Improved the compile time of loop unrolling. 74 - Changee merge-return to create a dummy loop around the function. 75 - Small improvement to merge-blocks to allow it to merge more often. 76 - Enforce an upper bound for the ids, and add option to set it. 77 - #1966: Report error if there are unreachable block before running merge return 78 Fixes: 79 - #1917: Allow 0 (meaning unlimited) as a parameter to --scalar-replacement 80 - #1915: Improve handling of group decorations. 81 - #1942: Fix incorrect uses of the constant manager. Avoids type mismatches in generated code. 82 - #1997: Fix dead branch elimination when there is a loop in folded selection. 83 - #1991: Fixes legality check in if-conversion. 84 - #1987: Add nullptr check to array copy propagation. 85 - #1984: Better handling of OpUnreachable in ADCE. 86 - #1983: Run merge return on reachable functions only. 87 - #1956: Handled atomic operations in ADCE. 88 - #1963: Fold integer divisions by 0 to 0. 89 - #2019: Handle MemberDecorateStringGOOGLE in ADCE and strip reflect. 90 - Validator 91 - Added validation for OpGroupNonUniformBallotBitCount. 92 - Added validation for the Vulkan memory model. 93 - Added support for VK_KHR_shader_atddomic_int64. 94 - Added validation for execution modes. 95 - Added validation for runtime array layouts. 96 - Added validation for 8-bit storage. 97 - Added validation of OpPhi instructions with pointer result type. 98 - Added checks for the Vulkan memory model. 99 - Validate MakeTexelAvailableKHR and MakeTexelVisibleKHR 100 - Allow atomic function pointer for OpenCL. 101 - FPRounding mode checks were implemented. 102 - Added validation for the id bound with an option to set the max id bound. 103 Fixes: 104 - #1882: Improve the validation of decorations to reduce memory usage. 105 - #1891: Fix an potential infinite loop in dead-branch-elimination. 106 - #1405: Validate the storage class of boolean objects. 107 - #1880: Identify arrays of type void as invalid. 108 - #487: Validate OpImageTexelPointer. 109 - #1922: Validate OpPhi instructions are at the start of a block correctly. 110 - #1923: Validate function scope variable are at the start of the entry block. 111 112v2018.5 2018-09-07 113 - General: 114 - Support SPV_KHR_vulkan_memory_model 115 - Update Dim capabilities, to match SPIR-V 1.3 Rev 4 116 - Automated build bots no run tests for the VS2013 case 117 - Support Chromium GN build 118 - Use Kokoro bots: 119 - Disable Travis-CI bots 120 - Disable AppVeyor VisualStudio Release builds. Keep VS 2017 Debug build 121 - Don't check export symbols on OSX (Darwin): some installations don't have 'objdump' 122 - Reorganize source files and namespaces 123 - Fixes for ClangTidy, and whitespace (passes 'git cl presumit --all -uf') 124 - Fix unused param compile warnings/errors when Effcee not present 125 - Avoid including time headers when timer functionality is disabled 126 - Avoid too-stringent warnings flags for Clang on Windows 127 - Internal refactoring 128 - Add hooks for automated fuzzing 129 - Add testing of command line executables 130 - #1688: Use binary mode on stdin; fixes "spirv-dis <foo.spv" on Windows 131 - Optimizer 132 - The optimizer validates the module before it begins 133 - Add API to register passes by string name 134 - Fold a vector shuffle feeding a vector shuffle 135 - Add -combine-access-chains transform 136 - Refactor how IRContext is handled by passes 137 - Improve bookkeeping for instruction result type and result id 138 - Fix over-duplication of decorations 139 - Fix handling of exits from selections in dead-branch elimination, and dead code 140 elimination. 141 - Fix handling of certain kinds of flow control in merge-return 142 Fixes: 143 - #1721: Fix size bug when folding vector shuffles 144 - #1722: Fix size infinite loop when folding vector shuffles 145 - #1724: Fix finding a constant of a specific type 146 - #1727: Dead branch elim: Reorder blocks if needed to satisfy dominance rule 147 - #1729: Handle VariablePointers cases in various optimizations 148 - #1731: Fix vector shuffle with literal id indicating undef value 149 - #1736: Fix handling of decorations and phis in merge-return 150 - #1787: Fix handling of decorations related to access chains 151 - #1865: Avoid leaking memory for SPIR-V constant values 152 - Validator 153 - Improve error messages 154 - Avoid platform-dependent traversal ordering, to ensure consistent messages 155 - Use libspirv::Instruction where possible 156 - Add option to skip all block layout checks 157 - Validate all type IDs 158 - Validate uses of OpFunction 159 - Validate uses of OpTypeFunction 160 - Disallow a struct containing its own type https://crbug.com/874372 161 - #1685: Vulkan permits non-monotonic offsets for block members 162 - #1697: Enforce block layout rules even when using relaxed block layout option 163 - #1719: Fix line number for vector shuffle valiation error 164 - #1789: Avoid assertion failure when validating some functions 165 - #1800: Fix validation of OpCopyMemorySized 166 - #1822: Stop enforcing struct member offset montonicity 167 - #1831: Disallow void members in structs 168 169v2018.4 2018-07-08 170 - General: 171 - Support SPV_KHR_8bit_storage 172 - Add gclient and presubmit configurations 173 - Enable Kokoro build bots (#1625) 174 - Group tests into fewer executables, reduces load on CI 175 - Port test script to Python 3 176 - Symbol export tests respect SPIRV_SKIP_TESTS 177 - #1596: Operand lookup succeeds if enabled by a capability 178 - #1624: Instruction lookup succeeds if enabled by a capability 179 - Refactoring namespaces: 180 - #1678: Change libspirv to spvtools 181 - Code in source/utils moved into spvtools::utils 182 - Code in source/comp moved into spvtools::comp 183 - Optimizer: 184 - Remove insert-extract-elim pass. Use simplification pass instead. 185 - Preserve instruction-to-block mapping in most passes, to reduce runtime. 186 - Small vector optimization for operands 187 - Add pass to move Private variables to Function. Increase opportunity to optimize. 188 - Fixes: 189 #1120: Check static uses of entry point interfaces 190 #1372: Avoid merging some structs, to preserve names for reflection 191 #1577: Scalar replacement uses only undecorated types. 192 #1578: Fix handling of forward-pointer types, and types embedding pointers 193 to themselves. 194 #1591: Inliner: Callee variable with initializer should have a store at the call site. 195 #1634: Fix crash: Use type id in vector type lookup 196 #1649: Fix assert in compact-ids pass 197 Fix constant folder: ensure it uses the right type 198 #1659: Folding rules added to IRContext. Avoids leak. 199 - Validator 200 - Add work-in-progress WebGPU environment. Disallows OpUndef 201 - #670, #1581: Improve error messages; disassemble instruction 202 - #491: Check structured switches 203 - #937: Check layout rules for Block and BufferBlock in Uniform, StorageBuffer, PushConstant 204 - #1281: Check invalid branches into structured constructs 205 - #1522: Disallow array-of-arrays with DescriptorSets 206 - #1577: Allow duplicate pointer types. 207 - #1581: Better messages: output ID names along with numbers in more cases. 208 - #1597: Check Vulkan 1.1 capabilities 209 - #1618: Check invalid exit from structured case construct 210 - #1622: Run IdPass before DataRulesPass 211 - #1632: Reduce test time by artificially lowering limits in limit test 212 - #1638: Block-decorated structs member order must respect offset order 213 - #1657: Improve CFG validation diagnostics 214 - Khronos SPIR-V #337: GLSL.std.450 Refract instruction Eta param can be any float scalar. 215 - #1606: PushConstant Blocks follow storage-buffer layout rules 216 - #1664: Check layout of StorageBuffer variables with Block decoration, using storage buffer 217 rules 218 - #1666: Layout validation should permit {vec3; float} packing 219 - #1637, #1668: Layout validation uses RowMajor, ArrayStride, MatrixStride properly 220 - Linker 221 - Avoid buffer overrun when creating OpModuleProcessed 222 223v2018.3 2018-05-25 224 - General: 225 - Support SPV_EXT_descriptor_indexing 226 - Support SPV_GOOGLE_decorate_string 227 - Support SPV_GOOGLE_hlsl_functionality1 228 - Support SPV_NV_shader_subgroup_partitioned 229 - Use "unified1" grammar from SPIRV-Headers 230 - Simplify support for new extensions. Assembler, disassembler, and simple validation 231 support is automatic if new tokens are introduced with appropriate extension 232 attributes in the "unified1" SPIR-V core grammar. 233 - Disassembler: Emit more digits on floating point, to reliably reproduce all 234 significand bits. (Use std::max_digits10 instead of std::digits10) 235 - Fix compilation for old XCode versions: Explicit construction required for std::set. 236 - Optimizer: 237 - Add --strip-reflect 238 - Add --time-report 239 - Add --loop-fission 240 - Add lop fusion. 241 - Add loop peeling pass and internal utility. 242 - Improve optimizer runtime. 243 - Merge-return now works with structured control flow. 244 - New (faster) SSA rewriter to convert local loads and stores to SSA IDs and phis. 245 Can replace load/store elimination passes. 246 - Fix instruction folding case: insertion that feeds and extract, when the extract 247 remains. 248 - Fold OpDot. 249 - Fold OpFNegate. 250 - Fold multply and divide of same value. 251 - Fold FClamp feeding a compare. 252 - Fold OpLoad feeding an extract, to reduce excessive copying. (#1547) 253 - Fold Fmix feeding an extract. 254 - Use simplification pass instead of insert-extract elimination. 255 - Constant fold OpVectorTimesScalar. 256 - Copy propagate arrays, in simple cases. 257 - Aggressive dead code elimination: Can remove more instructions, e.g. derivatives. 258 - Aggressive dead code elimination: Remove Workgroup variables that are written but not read. 259 - Better handling of OpImageTexelPointer 260 - Initial utilities for scalar evolution. 261 - Add Vector dead code elimination. 262 - Each pass can only run once. 263 - Allow code hosting in if-conversion. 264 - Add external interface for adding a PassToken, so external code can make their own 265 passes. 266 - Fixes: 267 #1404: Don't optimize away the compute compute workgroup size constant. 268 #1407: Remove a bad assertion 269 #1456: Fix bug in SSA rewriter related to variables updated in loops. 270 #1487: Fix long runtime in Dead insertion elimination: Don't revist select phi nodes. 271 #1492: Aggressive dead code elimination can remove OpDecorateStringGOOGLE. 272 #1527: Fix inlining of functions having OpKill and OpUnreachable. 273 #1559: Fix assert failure in reduce-load-size pass. 274 #1556: Aggressive dead code elimination: Fix handling of OpCopyMemory. 275 - Validator: 276 - Check Vulkan built-in variables 277 - Check Vulkan-specific atomic result type rule. 278 - Relax control barrier check for SPIR-V 1.3. Fixes #1427 279 - Check OpPhi. 280 - Check OpMemoryModel. 281 - Stop checking sizes derived from spec-constants. 282 - Re-enable checks for OpUConvert. 283 - Vulkan: Fix check for PrimitiveId: Permit as Input in fragment shader. 284 - Validate binary version for the given target environment. 285 - Add tests for OpBranch checks. 286 - Vulkan 1.1: Check scope for non-uniform subgroup operations. 287 - Fix checks for SPV_AMD_gpu_shader_int16. 288 - Fix logical layout check for OpDecorateId. 289 - Fix checks for ViewportIndex & Layer for Vulkan and SPV_EXT_shader_viewport_index_layer. 290 - Fixes: 291 #1470: Vulkan: Don't restrict WorkgroupSize to Input storage class. 292 #1469: Vulkan: Permit Subgroup memory scope for Vulkan 1.1. 293 #1472: Per-vertex variable validation fixes. 294 #1483: Valdiate barrier execution scopes for Vulkan 1.1. 295 - Fixes: 296 #898: Linker properly removes FuncParamAttr from imported symbols. 297 #924, #1174: Fix handling of decoration groups in optimizer, linker. 298 299v2018.2 2018-03-07 300 - General: 301 - Support SPIR-V 1.3 and Vulkan 1.1. 302 - Default target environment is now SPIR-V 1.3. For command-line tools, 303 use the --target-env option to override the default. Examples: 304 # Generate a SPIR-V 1.0 binary instead of SPIR-V 1.3 305 spirv-as --target-env spv1.0 a.spvasm -o a.spv 306 spirv-as --target-env vulkan1.0 a.spvasm -o a.spv 307 # Validate as Vulkan 1.0 308 spirv-val --target-env vulkan1.0 a.spv 309 - Support SPV_GOOGLE_decorate_string and SPV_GOOGLE_hlsl_functionality1 310 - Fixes: 311 - Fix Android.mk build. Compilation was failing due to missing definitions of 312 SpvCapabilityFloat16ImageAMD and other enumerated values. 313 - Optimizer: Avoid generating duplicate names when merging types. 314 - #1375: Validator: SPV_AMD_gpu_shaer_half_float implicitly allows declaration 315 of the 16-bit floating point type. 316 - #1376: Optimizer: Avoid folding half-precision float. 317 318v2018.1 2018-03-02 319 - General: 320 - Support Visual Studio 2013 again. (Continue support for VS 2015 and VS 2017.) 321 - Support building SPIRV-Tools as a shared library. 322 - Improve the HLSL legalization optimization recipe. #1311 323 - Optimizer: 324 - General speedups. 325 - Remove generic dead code elimination functionality from transforms: 326 --eliminate-local-single-block 327 --eliminate-local-single-store 328 --eliminate-local-multi-store 329 To recover the previous behaviour, a recipe using those transforms should now 330 also invoke the --eliminate-dead-code-aggressive transform. 331 - Improve folding, including coverage for floating point, OpSelect, and arithmetic 332 with non-trivial constant operands. 333 - Add loop-invariant code motion pass. 334 - Add loop-unrolling pass, for honouring unroll hits. 335 - Add loop-unswitch pass. 336 - Add instruction simplification pass. 337 - Aggressive dead code elimination: Understands capability hierarchy when finding 338 instructions it can eliminate (combinators). (PR #1268) 339 - CCP can now fold floating point arithmetic. #1311 340 - Validator: 341 - Validate barrier instructions. 342 - Check Vulkan-specific rules for atomics. 343 - Check Vulkan prohibition of Location or Component decorations on BuiltIn variables. 344 - Linker: 345 - Add --verify-ids option 346 - Add option to allow a resulting module to be partially linked. 347 - Handle OpModuleProcessed (instructions in SPIR-V layout section 7c) 348 - Fixes: 349 - #1265: Optimizer: Fix use-after free bug in if-conversion. (Fix object lifecycle bug 350 in type manager.) 351 - #1282: Fix new warnings found by GCC 8.0.1. 352 - #1285: Optimizer: Fix random failures during inlining. (Dangling references in DefUseManager) 353 - #1295: Optimizer: Fix incorrect handling of Phi nodes in CCP. 354 - #1300: Fix CCP: avoid bad CCP transitions and unsettled values. 355 - #1304: Avoid static-duration variables of class type (with constructors). 356 - #1323: Fix folding of an insert composite feeding a composite extract. 357 - #1339: Fix CCP: Handle OpConstantNull boolean values as conditions. 358 - #1341: DCEInst: Keep atomic instructions (and some others with side effects). 359 - #1354: Don't fold integer division. 360 - #1357: Support OpConstantNull in folding. 361 - #1361: CCP: Fix handling of non-constant module-scope values 362 363v2018.0 2018-02-02 364 - General 365 - VisualStudio 2013 is no longer supported. VisualStudio 2015 is supported. 366 - Use "include/unified1" directory from SPIRV-Headers. Requires recent SPIRV-Headers source. 367 - Disassembler: spirv-dis adds --color option to force color disassembly. 368 - Optimizer: 369 - Add pass to eliminate dead insertions. 370 - Aggressive dead code elimination now removes OpSwitch constructs. 371 - Block merging occurs in more cases. 372 - Add driver workaround transform: replace OpUnreachable with harmless branch to merge. 373 - Improve instruction folding framework. 374 - Add loop analysis. 375 - Add scalar replacement of aggregates to size-optimization recipe. 376 - Add pass to replace instructions invalid for a shader stage, with a harmless value. 377 This changes the semantics of the program! Not for general use! 378 - Rearragne and add passes to performance-optimization recipe, to produce better results. 379 - Validator: 380 - Validate OpenCL extended instructions. 381 - Shaders can't perform atomics on floats. 382 - Validate memory semantics values in atomics. 383 - Validate instruction-adjacency constraints, e.g. OpPhi predecessors, merge instructions 384 immediately precede branches. 385 - Fixes: 386 - PR 1198: Optimizer: Fix CCP in presence of matrix constants. 387 - #1199: Optimizer: Fix CCP: don't propagate spec constants. 388 - #1203: Optimizer: Fix common uniform elim bug introduced by refactoring. 389 - #1210: Optimizer: Aggressive dead code elimination: Fix 'break' identification. 390 - #1212: Optimizer: Aggressive dead code elimination: Was skipping too many instructions. 391 - #1214: Optimizer: Aggressive dead code elimination: Fix infinite loop. 392 - #1228: Optimizer: Fix CCP: Handling of varying Phi nodes; was resulting in infinite loop. 393 - #1245: Optimizer: Dead branch elimination: Avoid a null pointer dereference. 394 - #1250: Optimizer: Dead branch elimination: Avoid spuriously reporting a change. 395 396v2017.3 2018-01-12 397 - General: 398 - Support DebugInfo extended instruction set, targeted at OpenCL environments. 399 See the SPIR-V Registry. 400 - Generate a SPIRV-Tools.pc file for pkg-config. 401 - Optimizer: 402 - Progress for legalization of code generated from HLSL (issue #1118): 403 - Add --legalize-hlsl option to run transforms used to transform intermediate 404 code generated by HLSL to SPIR-V for Vulkan compilers. Those compilers 405 normally run these transforms automatically. This option is used for developing 406 those transforms. 407 - Add Private-to-Function variable conversion for modules with logical 408 addressing. 409 - Add --ccp: SSA Conditional Constant Propagation (CCP) 410 - Add --print-all to show disassembly for each optimization pass. 411 - Internal: Add loop descriptors and post-order tree iterator. 412 - Generalized dead branch elimination 413 - Aggressive dead code elimination (ADCE) now removes dead functions and 414 module-scope variables. 415 - Vector extract/insert elimination now optimizes through some cases of 416 VectorShuffle, and GLSL.std.450 Mix extended instruction. 417 - Validator: 418 - Add validation for GLSL.std.450 extended instruction set. 419 - Check out of bounds composite accesses, where that's statically computable. 420 Fixes #1112. 421 - Check upper bits of literal numbers that aren't a multiple of 32-bits wide. 422 - More validation of primitive instructions 423 - Add optional "relaxed" checking logical addressing mode to permit some 424 cases of pointer-to-pointer. Contributes to HLSL legalization (issue #1118). 425 - Fixes: 426 #1100: Validator: Image operand Sample can be used with OpImageSparseFetch, 427 OpImageSparseRead. 428 #1108: Remove duplicates transform was incorrectly removing non-duplicate 429 decorations. 430 #1111: Optimizer's type manager could reference deleted memory. 431 #1112: Fix decoration equality check, e.g. it is now symmetric. 432 #1129: Validator now disallows Dim=SupbassData for OpImageSparseRead. 433 #1143: Fix CCP: Was generating incorrect code for loops. 434 #1153: Fix CCP crash. 435 #1154: Optimizer's internal instruction-to-block mappings were sometimes 436 inconsistent. 437 #1159: Fix CCP infinite loop. 438 #1168: Fix dead branch elimination intermittently generating incorrect code. 439 Fixes https://github.com/KhronosGroup/glslang/issues/1205 440 #1186: Fix validation of PackDouble2x32 and UnpackDouble2x32 441 442v2017.2 2017-12-15 443 - General: 444 - Support OpenCL 1.2, 2.0 target environments, including embedded profiles 445 - Add CONTRIBUTING.md 446 - Fix exit status code for spirv-link 447 - Disassember: Enable emitting ANSI colour codes to a string 448 - Library avoids polluting global namespace. The libraries can export C and C++ 449 symbols starting with "spv", or in a C++ namespace. Add a test for this. 450 - Linux release builds include debug information, for easier profiling 451 - Build bots no longer test VisualStudio 2013 452 - Testing dependency RE2 requires VisualStudio 2015 or later 453 - Build bots check code formatting 454 - Optimizer: 455 - Add --skip-validation to spirv-opt 456 - Add dominance tree analysis 457 - Add generic value propagation engine 458 - Add global redundancy elimination within a function 459 - Add scalar replacement of function-scope variables of composite type 460 - Aggressive dead code elimination: Remove empty loops 461 - Killing an instruction notifies the IRContext 462 - IRContext::KillInst deletes the instruction 463 - Move CFG analysis to IRContext 464 - Add constant manager 465 - Fix: Don't consider derivative instructions as combinators. 466 - Fix: Don't delete an instruction twice in local dead-code-elimination 467 - Fix: Don't consider derivative instructions as combinators. 468 - Validator: 469 - Finish checking of image instructions (Section 3.32.10) 470 - Check sparse image instructions 471 - Check OpTypeImage, OpTypeSampleImage 472 - Check composite instructions (Section 3.32.12) 473 - Check atomic instructions (Section 3.32.18) 474 - Check OpEmitStreamVertex, OpEndStreamPrimitive instructions 475 - Re-enable validation of OpCopyObject 476 - OpKill, image ImplicitLod and QueryLod instructions can only be used in Fragment 477 shaders. 478 - Fixes for image instruction validation: 479 - Lod image operand only usable with ExplicitLod and OpImageFetch 480 - ExplicitLod Lod image operand must be float scalar 481 - OpImageFectch Lod image operand must be int scalar 482 - OpImageGather component operand must be 32-bits (integer scalar) 483 - OpImageQuerySizeLod Lod must be integer scalar 484 - Fixes: 485 #622: Remove names and decorations when inlining 486 #989: Aggressive dead code elim: Don't optimize away live breaks from a loop 487 #991: Fix validation of SPV_AMD_shader_ballot 488 #1004: Use after free of an instruction, in remove-duplicates transform 489 #1007: OpImageRead not required to return 4-component vector 490 #1009: OpImageRead can return scalar int/float types 491 #1011: OpImageWrite should allow scalar int/float texel types 492 #1012: Fix validat Dref type check 493 #1017: Load-store elimination considers variable initializations 494 #1034: Fix Windows debug build: operator< should be a weak ordering 495 #1083: Inlining: Set parent (function) for each inlined basic block. 496 #1075: Aggressive dead code elimination: Was leaving dangling references to 497 removed blocks. 498 499v2017.1 2017-11-23 500 - Update README with details on the public_spirv_tools_dev@khronos.org mailing list. 501 - General: 502 - Automatically deploy built artifacts to GitHub Releases 503 - Add a Linker (module combiner). Under development. 504 - Add Android.mk for Android NDK builds. 505 - Add the 'effcee' library as an optional dependency for use in tests. 506 Eventually it will be a required dependency, once downstream projects have 507 a chance to adjust. Requires 're2' library. 508 - Avoid static-duration variables of class type (with constructors). 509 - Hack around bugs in gcc-4.8.1 template handling 510 - Faster opcode lookup 511 - Validator: 512 - Recognize extensions listed on SPIR-V registry, 513 through #25 SPV_AMD_shader_fragment_mask 514 - Validator issues an info message when it sees an unrecognized extension. 515 - Type check basic arithmetic operations 516 - Type check carry/extended arithmetic operations 517 - Type check vector arithmetic operations 518 - Type check Relational and Logical instructions 519 - Type check Bit instructions 520 - Check type uniqueness rules 521 - Check conversion instructions 522 - Check image instructions 523 - Check derivative instructions 524 - Check OpVectorShuffle 525 - Check OpBranchConditional 526 - OpModuleProcessed is only allowed after debug names section and before annotations 527 section. 528 - Checks the right kind of return is called for each function (void or non-void). 529 - Add option to relax type check when storing structs (--relax-store-struct) 530 - Optimizer: 531 - Refactoring internal representation of the module, including: 532 - IRContext: owns a module and manages analyses 533 - Instructions are owned by intrusive lists, and have unique IDs 534 - BasicBlock owns its instruction list. 535 - DefUseManager: change representation of uses, for faster processing 536 on large modules. 537 - Add high level recipes: -O, -Os, and -Oconfig 538 Recipes for -O and -Os are under development. 539 - Add eliminate-dead-function transform 540 - Add strength reduction transform: For now, convert multiply by power of 2 541 to a bit shift. 542 - Add CFG cleanup transform 543 - Add removal of dead module-scope variables 544 - Add merge-return transform for modules without structured control flow 545 - Add redundancy elimination within a basic block (local value numbering) 546 - Extract-insert elimination: 547 - Recognize the case where the first instruction in the sequence is an 548 OpCompositeConstruct or OpConstantComposite 549 - Handle some cases of nested structs 550 - Dead branch elimination now can eliminate entire selection constructs 551 when all arms are dead. 552 - Compressing codec: 553 - Updated algorithm to 1.01, 1.02, 1.03 554 - Not built by default. Use -DSPIRV_BUILD_COMPRESSION=ON to build. 555 - Codec can be parameterized by a customized model. 556 - Fixes: 557 #728: Fix decoration of inlined functions 558 #798: spirv-as should fail when given unrecognized long option 559 #800: Inliner: Fix inlining function into header of multi-block loop 560 #824: Eliminate-local-multi-store: Fix a crash 561 #826: Elimiante-local-multi-store: Fix a crash 562 #827: Fix crash when compact-ids transform runs before another transform. 563 #834: Add Cmake option to build the compressing codec. Off by default. 564 #911: Fix classification of Line and NoLine instructions 565 566v2017.0 2017-09-01 567 - Update README to describe that assembler, disassembler, and binary parser support 568 are based on grammar files from the SPIRV-Headers repository. 569 570v2016.7 2017-09-01 571 - Add SPIR-V 1.2 572 - OpenCL 2.2 support is now based on SPIR-V 1.2 573 - Support AMD extensions in assembler, disassembler: 574 SPV_AMD_gcn_shader 575 SPV_AMD_shader_ballot 576 SPV_AMD_shader_explicit_vertex_parameter 577 SPV_AMD_shader_trinary_minmax 578 SPV_AMD_gpu_shader_half_float 579 SPV_AMD_texture_gather_bias_lod 580 SPV_AMD_gpu_shader_int16 581 - Optimizer: Add support for: 582 - Inline all function calls in entry points. 583 - Flatten decoration groups. Fixes #602 584 - Id compaction (minimize Id bound). Fixes #624 585 - Eliminate redundant composite insert followed by extract 586 - Simplify access chains to local variables 587 - Eliminate local variables with a single store, if possible 588 - Eliminate local variables with a several stores, if possible 589 - Eliminate loads and stores in same block to local variables 590 - Eliminate redundant insert/extract to composite values 591 - Aggressive dead instruction elimination 592 - Eliminate dead branches 593 - Merge blocks when the second can only be preceded by the first 594 - Eliminate ommon uniform loads 595 - Assembler: Add option to preserve numeric ids. Fixes #625 596 - Add build target spirv-tools-vimsyntax to generate spvasm.vim, a SPIR-V 597 assembly syntax file for Vim. 598 - Version string: Allow overriding of wall clock timestamp with contents 599 of environment variable SOURCE_DATE_EPOCH. 600 - Validator implements relaxed rules for SPV_KHR_16bit_storage. 601 - CMake installation rules use GNUInstallDirs. For example, libraries 602 will be installed into a lib64 directory if that's the norm for the 603 current system. 604 - Fixes: 605 #500: Parameterize validator limit checks 606 #508: Support compilation under CYGWIN 607 #517: Fix validation when continue (or case) contstruct is also the head of a 608 nested control construct. 609 #551: If a merge block is reachable, it must be *strictly* dominated by its 610 header. 611 #548: Validator: Error when the reserved OpImageSparseSampleProj* opcodes 612 are used. 613 #611: spvtools::Optimizer was failing to save the module to the output 614 binary vector when all passes succeded without changes. 615 #629: The inline-entry-points-all optimization could generate invalidly 616 structured code when the inlined function had early returns. 617 #697: Optimizer's Instruction::ForEachInId method was skipping semantics-id 618 and scope-id. 619 #755: Inliner: Fix inlining of callee with single Return appearing before 620 the end of the function. 621 #776: Fix dead branch elimination in presence of complex but dead control 622 flow. 623 #781: SPV_KHR_variable_pointers allows duplicate pointer types 624 #782: Inliner: Fix remapping of non-label forward references in callee 625 #787: Inliner: Fix remapping of inlined entry block when called from 626 single block loop. 627 #790: Inliner: Fix remapping of inlined entry block when callee has 628 multiple returns. 629 630v2016.6 2016-12-13 631 - Published the C++ interface for assembling, disassembling, validation, and 632 optimization. 633 - Support SPV_KHR_shader_draw_parameters in assembler, disassembler, parser. 634 - Validator: 635 - Add validator API accepting raw binary words 636 - Increased coverage: 637 - Checks "Data rules" in Universal Validation Rules, section 2.16.1 638 - WIP: Universal Limits. 639 - The minimum mandated upper bounds are checked. 640 - TODO: Parameterize the validator to allow larger limits accepted by 641 a more than minimally capable implementation. 642 - OpSampledImage checks 643 - OpConstantComposite checks 644 - Id bound check 645 - Disasssembler: 646 - Generates friendly GLSL-based names for more builtin variables 647 - Generates friendly names for numeric OpConstant values 648 - Vendor tool info extracted from SPIR-V XML registry file. 649 - Fixes issues: 650 #429: Validator: Allow OpTypeForwardPointer and OpTypeStruct to reference 651 undefined IDs 652 #482: Validator: OpVariable initializer can be an ID of a module-scope variable 653 654v2016.5 2016-09-16 655 - Support SPV_KHR_shader_ballot in assembler, disassembler, parser. 656 - Disassembler: Generate friendly names for built-in variables. 657 - Partial fixes: 658 #359: Add Emacs helper for automatically diassembling/assembling a SPIR-V 659 binary on file load/save. 660 - Fixes: 661 #414: Validator: Allow OpUndef for composite constants 662 #415: Validator: Phi can use its own value in some cases. 663 664v2016.4 2016-09-01 665 - Relicensed under Apache 2.0 666 - Add optimization passes (in API and spirv-opt command) 667 - Fold spec constants defined with OpSpecConstantOp and 668 OpSpecConstantComposite to normal constants with fixed value(s). 669 - Fixes issues: 670 #318: Relicensed under Apache 2.0 671 672v2016.3 2016-08-24 673 - Add target environment enums for OpenCL 2.1, OpenCL 2.2, 674 OpenGL 4.0, OpenGL 4.1, OpenGL 4.2, OpenGL 4.3, OpenGL 4.5. 675 - Add spirv-cfg, an experimental tool to dump the control flow graph 676 as a GraphiViz "dot" graph 677 - Add optimization pass: Eliminate dead constants. 678 - Add spirv-lesspipe.sh filter utility 679 - Fixes issues: 680 #288: Check def-use dominance rules for OpPhi (variable,parent) operands 681 #339: Allow OpUndef in types-constants-global-vars section, as required 682 by SPIR-V 1.0 Rev7, 1.1 Rev 3. 683 #340: Avoid race on mkdir during build 684 #365: Relax PointSize, ClipDistance, CullDistance capability check in all 685 environments not just Vulkan 1.0. 686 687v2016.2 2016-08-05 688 - Validator is incomplete 689 - Checks ID use block is dominated by definition block 690 - Add optimization passes (in API and spirv-opt command) 691 - Strip debug info instructions 692 - Freeze spec constant to their default values 693 - Allow INotEqual as operation for OpSpecConstantOp 694 - Fixes bugs: 695 #270: validator: crash when continue construct is unreachable 696 #279: validator: infinite loop when analyzing some degenerate control 697 flow graphs 698 #286: validator: don't incorrectly generate def-use error for 699 (variable,parent) parameters to OpPhi 700 #290: disassembler: never generate bare % for an identifier 701 #295: validator: def-use dominance check should ignore unreachable uses 702 #276: validator: allow unreachable continue constructs 703 #297: validator: allow an unreachable block to branch to a reachable 704 merge block 705 706v2016.1 2016-07-19 707 - Fix https://github.com/KhronosGroup/SPIRV-Tools/issues/261 708 Turn off ClipDistance and CullDistance capability checks for Vulkan. 709 - The disassembler can emit friendly names based on debug info (OpName 710 instructions), and will infer somewhat friendly names for most types. 711 This is turned on by default for the spirv-dis command line tool. 712 - Updated to support SPIR-V 1.1 rev 2 713 - Input StorageClass, Sampled1D capability, and SampledBuffer capability 714 do not require Shader capability anymore. 715 716v2016.0 2016-07-04 717 718 - Adds v<year>.<index> versioning, with "-dev" indicating 719 work in progress. The intent is to more easly report 720 and summarize functionality when SPIRV-Tools is incorporated 721 in downstream projects. 722 723 - Summary of functionality (See the README.md for more): 724 - Supports SPIR-V 1.1 Rev 1 725 - Supports SPIR-V 1.0 Rev 5 726 - Supports GLSL std450 extended instructions 1.0 Rev 3 727 - Supports OpenCL extended instructions 1.0 Rev 2 728 - Assembler, disassembler are complete 729 - Supports floating point widths of 16, 32, 64 bits 730 - Supports integer widths up to 64 bits 731 - Validator is incomplete 732 - Checks capability requirements in most cases 733 - Checks module layout constraints 734 - Checks ID use-definition ordering constraints, 735 ignoring control flow 736 - Checks some control flow graph rules 737 - Optimizer is introduced, with few available transforms. 738 - Supported on Linux, OSX, Android, Windows 739 740 - Fixes bugs: 741 - #143: OpenCL pow and pown arguments 742