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