1Revision history for SPIRV-Tools 2 3v2020.7-dev 2020-12-07 4 - Start v2020.7-dev 5 6v2020.6 2020-12-07 7 - General 8 CMake: Add SPIRV_TOOLS_BUILD_STATIC flag (#3910) 9 - Disassembler 10 Add some context comments to disassembly. (#3847) 11 - Optimizer 12 - Take new (raytracing) termination instructions into account. (#4050) 13 - Do run DCE if SPV_KHR_ray_query is used. (#4047) 14 - Handle 8-bit index in elim dead member (#4043) 15 - Add texel buffer out-of-bounds checking instrumentation (#4038) 16 - Update MeshShadingNV dependencies (and land Ray tracing updates) (#4028) 17 - Fix buffer oob instrumentation for matrix refs (#4025) 18 - Fix SSA re-writing in the presence of variable pointers. (#4010) 19 - Add support to prevent functions from being inlined if they have 20 DontInline flag (#3858) 21 - Add SPV_EXT_shader_image_int64 (#3852) 22 - Support SPV_KHR_fragment_shading_rate (#3943) 23 - Fix use-after-move in val/validate.cpp (#3848) 24 - Debug Info 25 - properly preserve DebugValue indexes operand (#4022) 26 - Add DebugValue for invisible store in single_store_elim (#4002) 27 - Propagate OpLine to all applied instructions in spirv-opt (#3951) 28 - Add DebugValue for DebugDecl invisible to value assignment (#3973) 29 - Add DebugValue for function param regardless of scope (#3923) 30 - Debug info preservation in convert-local-access-chains pass (#3835) 31 - Debug info preservation in redundancy-elimination pass (#3839) 32 - Debug info preservation in if-conversion pass (#3861) 33 - Validator 34 - Add validation support for the ray tracing built-in variables (#4041) 35 - Use less stack space when validating Vulkan builtins (#4019) 36 - Fix SPV_KHR_fragment_shading_rate VUID label (#4014) 37 - Label Layer and ViewportIndex VUIDs (#4013) 38 - Allow the ViewportIndex and Layer built-ins on SPIR-V 1.5 (#3986) 39 - Fix validation of OpPhi instructions (#3919) 40 - Fuzz 41 - Fix facts arising from CompositeConstruct (#4034) 42 - Do not flatten conditionals that create synonyms (#4030) 43 - Add support for reining in rogue fuzzer passes (#3987) 44 - Fix assertion failure in FuzzerPassAddCompositeExtract (#3995) 45 - Fix invalid equation facts (#4009) 46 - Fix bugs in TransformationFlattenConditionalBranch (#4006) 47 - Fix bug related to transformation applicability (#3990) 48 - Add expand vector reduction transformation (#3869) 49 - Add FuzzerPassAddCompositeExtract (#3904) 50 - Fix mismatch with shrinker step limit (#3985) 51 - Fix off-by-one error in replayer (#3982) 52 - Get order right for OpSelect arguments (#3974) 53 - Do not add synonym-creating loops in dead blocks (#3975) 54 - Skip OpTypeSampledImage when propagating up (#3976) 55 - Pass OpUndef in function call if needed (#3978) 56 - Fix off-by-one in TransformationCompositeConstruct (#3979) 57 - Tolerate absent ids in data synonym fact management (#3966) 58 - Fix to id availability (#3971) 59 - Fix operand types (#3962) 60 - Don't flatten conditional if condition is irrelevant (#3944) 61 - Do not produce OpPhis of type OpTypeSampledImage (#3964) 62 - Restrict fuzzer pass to reachable blocks (#3970) 63 - Handle more types when extending OpPhi instructions (#3969) 64 - Skip early terminator wrappers when merging returns (#3968) 65 - Avoid irrelevant constants in synonym-creating loops (#3967) 66 - Skip dead blocks in FuzzerPassAddOpPhiSynonyms (#3965) 67 - Avoid the type manager when looking for struct types (#3963) 68 - Fix to TransformationDuplicateRegionWithSelection (#3941) 69 - Skip OpFunction when replacing irrelevant ids (#3932) 70 - Use component-wise selectors when flattening conditional branches (#3921) 71 - Avoid void struct member when outlining functions (#3936) 72 - Do not allow Block-decorated structs when adding parameters (#3931) 73 - Fix to operand id type (#3937) 74 - Handle dead blocks in TransformationEquationInstruction (#3933) 75 - Do not allow sampled image load when flattening conditionals (#3930) 76 - Take care of OpPhi instructions when inlining (#3939) 77 - Fix to TransformationInlineFunction (#3913) 78 - Wrap early terminators before merging returns (#3925) 79 - Lower probability of adding bit instruction synonyms (#3917) 80 - Fix handling of OpPhi in FlattenConditionalBranch (#3916) 81 - Avoid creating blocks without parents (#3908) 82 - Do not allow creation of constants of block-decorated structs (#3903) 83 - Fixes related to irrelevant ids (#3901) 84 - Fix to transformation that adds a synonym via a loop (#3898) 85 - Fix to duplicate region with selection (#3896) 86 - Do not expose synonym facts for non-existent ids (#3891) 87 - Do not add synonyms involving irrelevant ids (#3890) 88 - Do not replace irrelevant ids that are not in blocks (#3892) 89 - Wrap OpKill and similar in function calls (#3884) 90 - Integrate spirv-reduce with shrinker (#3849) 91 - Report fresh ids in transformations (#3856) 92 - Support OpNot bit instruction case (#3841) 93 - Return IR and transformation context after replay (#3846) 94 95v2020.5 2020-09-22 96 - General 97 - Enable building with BUILD_SHARED_LIBS=1 (#3490) 98 - Avoid using /MP4 for clang on windows. (#3662) 99 - Fix compiler error on macOS with XCode12. (#3836) 100 - Optimizer 101 - Preserve OpenCL.DebugInfo.100 through private-to-local pass (#3571) 102 - Preserve debug info in scalar replacement pass (#3461) 103 - Debug info preservation in loop-unroll pass (#3548) 104 - Preserve debug info in dead-insert-elim pass (#3652) 105 - Improve non-semantic instruction handling in the optimizer (#3693) 106 - Let ADCE pass check DebugScope (#3703) 107 - Add undef for inlined void function (#3720) 108 - Fix SSA-rewrite to remove DebugDeclare for variables without loads (#3719) 109 - Handle DebugScope in compact-ids pass (#3724) 110 - Add buffer oob check to bindless instrumentation (#3800) 111 - Validator 112 - Update OpenCL capabilities validation (#3149) 113 - Validator support for non-semantic clspv reflection (#3618) 114 - OpenCL.DebugInfo.100 DebugTypeArray with variable size (#3549) 115 - Only validation locations for appropriate execution models (#3656) 116 - Validate more OpenCL.DebugInfo.100 instructions (#3684) 117 - Allow DebugTypeTemplate for Type operand (#3702) 118 - spirv-val: Add Vulkan VUID labels to BuiltIn (#3756) 119 - Allow SPV_KHR_8bit_storage extension. (#3780) 120 - Validate SPIRV Version number when parsing binary header (#3834) 121 - Reduce 122 - Support reducing a specific function (#3774) 123 - Fuzz 124 - adds TransformationReplaceCopyObjectWithStoreLoad (#3567) 125 - adds TransformationReplaceCopyMemoryWithLoadStore (#3575) 126 - adds TransformationReplaceLoadStoreWithCopyMemory (#3586) 127 - Implement the OpOuterProduct linear algebra case (#3617) 128 - Pass to replace int operands with ints of opposite signedness (#3612) 129 - TransformationMoveInstructionDown (#3477) 130 - Add TransformationMakeVectorOperationDynamic (#3597) 131 - TransformationReplaceAddSubMulWithCarryingExtended (#3598) 132 - FuzzerPassPropagateInstructionsUp (#3478) 133 - add FuzzerPassAddCompositeInserts (#3606) 134 - Add inline function transformation (#3517) 135 - Transformation to replace the use of an irrelevant id (#3697) 136 - Add SPIRV_FUZZ_PROTOC_COMMAND (#3789) 137 - Add TransformationDuplicateRegionWithSelection (#3773) 138 - Transformation to flatten conditional branch (#3667) 139 - Handle OpPhis in TransformationInlineFunction (#3833) 140 - Create synonym of int constant using a loop (#3790) 141 - Support dead blocks in TransformationAddSynonym (#3832) 142 - Linker 143 144v2020.4 2020-07-22 145 - General 146 - Changed variable names to be more descriptive (#3433) 147 - Add support to GPU-AV instrumentation for Task and Mesh shaders (#3512) 148 - Permit Simple and GLSL450 memory model in WEBGPU_0 (#3463) 149 - Support SPV_KHR_terminate_invocation (#3568) 150 - Optimizer 151 - Preserving debug information in optimizations 152 (#3389,#3420,#3425,#3356,#3459,#3444,#3492,#3451,#3497i,#3498,#3542) 153 - Eliminate branches with condition of OpConstantNull (#3438) 154 - Use structured order to unroll loops. (#3443) 155 - Updated desc_sroa to support flattening structures (#3448) 156 - Support OpCompositeExtract pattern in desc_sroa (#3456) 157 - Fix ADCE pass bug for mulitple entries (#3470) 158 - Sink pointer instructions in merge return (#3569) 159 - Validator 160 - Validate location assignments (#3308) 161 - Fix reachability in the validator (#3541) 162 - Reduce 163 - Fuzz 164 - Add support for OpSpecConstant* (#3373) 165 - Add replace linear algebra instruction transformation (#3402) 166 - Implement vector shuffle fuzzer pass (#3412) 167 - Swap operands in OpBranchConditional (#3423) 168 - Permute OpPhi instruction operands (#3421) 169 - Add FuzzerPassAddCopyMemoryInstructions (#3391) 170 - TransformationInvertComparisonOperator (#3475) 171 - Add variables with workgroup storage class (#3485) 172 - Add image sample unused components transformation (#3439) 173 - TransformationReplaceParameterWithGlobal (#3434) 174 - Support adding dead break from back-edge block (#3519) 175 - Fuzzer pass to interchange zero-like constants (#3524) 176 - Linker 177 178v2020.3 2020-05-27 179 - General 180 - Prevent Effcee from installing things when building spirv-tools with testing enabled (#3256) 181 - Update acorn version (#3294) 182 - If SPIRV-Headers is in our tree, include it as subproject (#3299) 183 - allow cross compiling for Windows Store, UWP, etc. (#3330) 184 - Optimizer 185 - Remove deprecated interfaces from instrument passes (#3361) 186 - Preserve debug info in inline pass (#3349) 187 - Handle more cases in dead member elim (#3289) 188 - Preserve debug info in eliminate-dead-functions (#3251) 189 - Fix Struct CFG analysis for single block loop (#3293) 190 - Add tests for recently added command line option (#3297) 191 - Consider sampled images as read-only storage (#3295) 192 - Allow various validation options to be passed to spirv-opt (#3314) 193 - Add debug information analysis (#3305) 194 - Preserve debug info for wrap-opkill (#3331) 195 - refactor inlining pass (#3328) 196 - Add unrolling to performance passes (#3082) 197 - Validator 198 - Add validation support for ImageGatherBiasLodAMD (#3363) 199 - Validate ShaderCallKHR memory scope (#3332) 200 - Validate Buffer and BufferBlock apply only to struct types (#3259) 201 - Reduce 202 - increase default step limit (#3327) 203 - Remove unused uniforms and similar (#3321) 204 - Fuzz 205 - Add support for StorageBuffer (#3348) 206 - Add validator options (#3254) 207 - Limit adding of new variables to 'basic' types (#3257) 208 - Transformation to add OpConstantNull (#3273) 209 - Handling of more fuzzing opportunities (#3277, #3280, #3281, #3290, #3292) 210 - Respect rules for OpSampledImage (#3287) 211 - Do not outline regions that produce pointer outputs (#3291) 212 - Linker 213 214v2020.2 2020-03-26 215 - General: 216 - Support extended instructions in the vscode language server 217 - Make spvOpcodeString part of the public API (#3174) 218 - Added guide to writing a spirv-fuzz fuzzer pass (#3190) 219 - Add support for KHR_ray_{query,tracing} extensions (#3235) 220 - Optimizer 221 - Debug Printf support (#3215) 222 - Add data structure for DebugScope, DebugDeclare in spirv-opt (#3183) 223 - Fix identification of Vulkan images and buffers (#3253) 224 - Validator 225 - Add support for SPV_AMD_shader_image_load_store_lod (#3186) 226 - Add validation rules for OpenCL.DebugInfo.100 extension (#3133) 227 - Adding WebGPU specific Workgroup scope rule (#3204) 228 - Disallow phis of images, samplers and sampled images (#3246) 229 - Reduce 230 - Fuzz 231 - Fuzzer passes to add local and global variables (#3175) 232 - Add fuzzer passes to add loads/stores (#3176) 233 - Fuzzer pass to add function calls (#3178) 234 - Fuzzer pass that adds access chains (#3182) 235 - Fuzzer pass to add equation instructions (#3202) 236 - Add swap commutable operands transformation (#3205) 237 - Add fuzzer pass to permute function parameters (#3212) 238 - Allow OpPhi operand to be replaced with a composite synonym (#3221) 239 - Linker 240 241v2020.1 2020-02-03 242 - General: 243 - Add support for SPV_KHR_non_semantic_info (#3110) 244 - Support OpenCL.DebugInfo.100 extended instruction set (#3080) 245 - Added support for Vulkan 1.2 246 - Add API function to better handle getting the necessary environment (#3142) 247 - Clarify mapping of target env to SPIR-V version (#3150) 248 - Implement constant folding for many transcendentals (#3166) 249 - Optimizer 250 - Change default version for CreatInstBindlessCheckPass to 2 (#3096, #3119) 251 - Better handling of OpLine on merge blocks (#3130) 252 - Use placeholder switch instead of placeholder loop in MergeReturn pass. (#3151) 253 - Handle TimeAMD in AmdExtensionToKhrPass. (#3168) 254 - Validator 255 - Fix structured exit validation (#3141) 256 - Reduce 257 - Fuzz 258 - Fuzzer pass to merge blocks (#3097) 259 - Transformation to add a new function to a module (#3114) 260 - Add fuzzer pass to perform module donation (#3117) 261 - Fuzzer passes to create and branch to new dead blocks (#3135) 262 - Fuzzer pass to add composite types (#3171) 263 - Linker: 264 - Remove names and decorations of imported symbols (#3081) 265 266v2019.5 2019-12-11 267 - General: 268 - Export SPIRV-Tools targets on installation 269 - SPIRV-Tools support for SPIR-V 1.5 (#2865) 270 - Add WebGPU SPIR-V Assembler in JavaScript. (#2876) 271 - Add Bazel build configuration. (#2891) 272 - Add support for building with emscripten (#2948) 273 - Update SPIR-V binary header test for SPIR-V 1.5 (#2967) 274 - Add fuzzer for spirv-as call path (#2976) 275 - Improved CMake install step. (#2963) 276 - Add fuzzer for spirv-dis call path (#2977) 277 - Ensure timestamp does not vary with timezone. (#2982) 278 - Add a vscode extension for SPIR-V disassembly files (#2987) 279 - Add iOS as a supported platform (#3001) 280 - utils/vscode: Add SPIR-V language server support 281 - Respect CMAKE_INSTALL_LIBDIR in installed CMake files (#3054) 282 - Permit the debug instructions in WebGPU SPIR-V (#3063) 283 - Add support for Fuchsia. (#3062) 284 - Optimizer 285 - Add descriptor array scalar replacement (#2742) 286 - Add pass to wrap OpKill in a function call (#2790) 287 - Fold FMix during constant folding. (#2818) 288 - Add pass to replace AMD shader ballot extension (#2811) 289 - Add pass to make Float32 operation relax precision (#2808) 290 - Add pass to make relax precision operation Float16 (#2808) 291 - Add pass to replace uses of 3 AMD extensions (#2814) 292 - Fold Min, Max, and Clamp instructions. (#2836) 293 - Better handling of OpKill in continues (#2842,#2922,#2933) 294 - Enable OpTypeCooperativeMatrix specialization (#2927) 295 - Support constant-folding UConvert and SConvert (#2960) 296 - Update Offset to ConstOffset bitmask if operand is constant. (#3024) 297 - Improve RegisterSizePasses (#3059) 298 - Folding: perform add and sub on mismatched integer types (#3084) 299 - Graphics robust access: use signed clamp (#3073) 300 Fixes: 301 - Instrument: Fix version 2 output record write for tess eval shaders. (#2782) 302 - Instrument: Add support for Buffer Device Address extension (#2792) 303 - Fix check for changed binary in API call. (#2798) 304 - For WebGPU<->Vulkan optimization, set correct execution environment (#2834) 305 - Handle OpConstantNull in copy-prop-arrays. (#2870) 306 - Use OpReturn* in wrap-opkill (#2886) 307 - Validator 308 - Add generic builtin validation of target (#2843) 309 - Extra resource interface validation (#2864) 310 - Adding valilidation checks for OpEntryPoint duplicate names and execution mode (#2862) 311 - Relaxed bitcast with pointers (#2878) 312 - Validate physical storage buffer restrictions (#2930) 313 - Add SPV_KHR_shader_clock validation (#2879, #3013) 314 - Validate that selections are structured (#2962) 315 - Disallow use of OpCompositeExtract/OpCompositeInsert with no indices (#2980) 316 - Check that derivatives operate on 32-bit values (#2983) 317 - Validate array stride does not cause overlap (#3028) 318 - Validate nested constructs (#3068) 319 Fixes: 320 - Fix validation of constant matrices (#2794) 321 - Update "remquor" validation 322 - Only allow previously declared forward refs in structs (#2920) 323 - Reduce 324 - Remove relaxed precision decorations (#2797) 325 - Reduce/fuzz: improve command line args (#2932) 326 - Improve remove unref instr pass (#2945) 327 Fixes: 328 - Fuzz 329 - Fix add-dead-break and add-dead-continue passes to respect dominance (#2838) 330 - Add fuzzer pass to copy objects (#2853) 331 - Add fuzzer pass to replace ids with synonyms (#2857) 332 - Allow validation during spirv-fuzz replay (#2873) 333 - Employ the "swarm testing" idea in spirv-fuzz (#2890) 334 - reduce/fuzz: improve command line args (#2932) 335 - option to convert shader into a form that renders red (#2934) 336 - Add fuzzer pass to change selection controls (#2944) 337 - add transformation and pass to construct composites (#2941) 338 - Add fuzzer pass to change loop controls (#2949) 339 - Add fuzzer pass to change function controls (#2951) 340 - Add fuzzer pass to add NoContraction decorations (#2950) 341 - Add missing functionality for matrix composites (#2974) 342 - Fuzzer pass to adjust memory access operands (#2968) 343 - Transformation to extract from a composite object (#2991) 344 - Vector shuffle transformation (#3015) 345 - Improve debugging facilities (#3074) 346 - Function outlining fuzzer pass (#3078) 347 348 349v2019.4 2019-08-08 350 - General: 351 - Memory model support for SPIR-V 1.4 352 - Add new spirv-fuzz tool 353 - Add option for base branch in check_code_format.sh 354 - Removed MarkV and Stats code. (#2576) 355 - Instrument: Add version 2 of record formats (#2630) 356 - Linker: Better type comparison for OpTypeArray and OpTypeForwardPointer (#2580) 357 - Optimizer 358 - Bindless Validation: Instrument descriptor-based loads and stores (#2583) 359 - Better folding for OpSpecConstantOp (#2585, #2614) 360 - Add in individual flags for Vulkan <-> WebGPU passes (#2615) 361 - Handle nested breaks from switches. (#2624) 362 - Optimizer: Handle array type with OpSpecConstantOp length (#2652) 363 - Perform merge return with single return in loop. (#2714) 364 - Add --preserve-bindings and --preserve-spec-constants (#2693) 365 - Remove Common Uniform Elimination Pass (#2731) 366 - Allow ray tracing shaders in inst bindle check pass. (#2733) 367 - Add pass to inject code for robust-buffer-access semantics (#2771) 368 - Treat access chain indexes as signed in SROA (#2776) 369 - Handle RelaxedPrecision in SROA (#2788) 370 - Add descriptor array scalar replacement (#2742) 371 Fixes: 372 - Handle decorations better in some optimizations (#2716) 373 - Change the order branches are simplified in dead branch elim (#2728) 374 - Fix bug in merge return (#2734) 375 - SSA rewriter: Don't use trivial phis (#2757) 376 - Record correct dominators in merge return (#2760) 377 - Process OpDecorateId in ADCE (#2761) 378 - Fix check for unreachable blocks in merge-return (#2762) 379 - Handle out-of-bounds scalar replacements. (#2767) 380 - Don't move debug or decorations when folding (#2772) 381 - Protect against out-of-bounds references when folding OpCompositeExtract (#2774) 382 - Validator 383 - Validate loop merge (#2579) 384 - Validate construct exits (#2459) 385 - Validate OpenCL memory and addressing model environment rules (#2589) 386 - Validate OpenCL environment rules for OpTypeImage (#2606) 387 - Allow breaks to switch merge from nested construct (#2604) 388 - Validate OpenCL environment rules for OpImageWrite (#2619) 389 - Allow arrays of out per-primitive builtins for mesh shaders (#2617) 390 - Validate OpenCL rules for ImageRead and OpImageSampleExplicitLod (#2643) 391 - Add validation for SPV_EXT_fragment_shader_interlock (#2650) 392 - Add builtin validation for SPV_NV_shader_sm_builtins (#2656) 393 - Add validation for Subgroup builtins (#2637) 394 - Validate variable initializer type (#2668) 395 - Disallow stores to UBOs (#2651)A 396 - Validate Volatile memory semantics bit (#2672) 397 - Basic validation for Component decorations (#2679) 398 - Validate that in OpenGL env block variables have Binding (#2685) 399 - Validate usage of 8- and 16-bit types with only storage capabilities (#2704) 400 - Add validation for SPV_EXT_demote_to_helper_invocation (#2707) 401 - Extra small storage validation (#2732) 402 - For Vulkan, disallow structures containing opaque types (#2546) 403 - Validate storage class OpenCL environment rules for atomics (#2750) 404 - Update OpControlBarriers rules for WebGPU (#2769) 405 - Update OpMemoryBarriers rules for WebGPU (#2775) 406 - Update WebGPU validation rules of OpAtomic*s (#2777) 407 Fixes: 408 - Disallow merge targeting block with OpLoopMerge (#2610) 409 - Update vloadn and vstoren validation to match the OpenCL Extended 410 Instruction Set Specification (#2599) 411 - Update memory scope rules for WebGPU (#2725) 412 - Allow LOD ops in compute shaders with derivative group execution modes (#2752) 413 - Reduce 414 Fixes: 415 416v2019.3 2019-05-14 417 - General: 418 - Require Python 3 since Python 2 will out of service soon. 419 - Add a continuous test that does memory checks using the address sanitizer. 420 - Fix the build files so the SPIRV_USE_SANITIZER=address build works. 421 - Packaging top of tree build artifacts again. 422 - Added support for SPIR-V 1.4. (#2550) 423 - Optimizer 424 - Remove duplicates from list of interface IDs in OpEntryPoint instruction (#2449) 425 - Bindless Validation: Descriptor Initialization Check (#2419) 426 - Add option to validate after each pass (#2462) 427 - Add legalization pass to fix mismatched pointer (#2430, #2535) 428 - Add error messages when the input contains unknown instructions. (#2487) 429 - Add pass to convert from WebGPU Spir-V to Vulkan Spir-V and back. (#2495) 430 Fixes: 431 - #2412: Dead memeber elimination should not change input and output variables. 432 - #2405: Fix OpDot folding of half float vectors. 433 - #2391: Dead branch elim should not fold away back edges. 434 - #2441: Removing decorations when doing constant propagation. 435 - #2455: Maintain inst to block mapping in merge return. 436 - #2453: Fix merge return in the face of breaks. 437 - #2456: Handle dead infinite loops in DCE. 438 - #2458: Handle variable pointer in some optimizations. 439 - #2452: Fix dead branch elimination to handle unreachable blocks better. 440 - #2528: Fix undefined bit shift in sroa. 441 - #2539: Change implementation of post order CFG traversal. 442 - Validator 443 - Add validation of storage classes for WebGPU (#2446) 444 - Add validation for ExecutionMode in WebGPU (#2443) 445 - Implement WebGPU specific CFG validation (#2386) 446 - Allow NonWritable to target struct members. (#2420) 447 - Allow storage type mismatch for parameter in relaxed addressing mode. 448 - Allow non memory objects as parameter in relaxed addressing mode. 449 - Disallow nested Blocks and buffer blocks (#2410). 450 - Add validation for SPV_NV_cooperative_matrix (#2404) 451 - Add --strip-atomic-counter-memory (#2413) 452 - Check OpSampledImage is only passed into valid instructions (#2467) 453 - Handle function decls in Structured CFG analysis (#2474) 454 - Validate that OpUnreacahble is not statically reachable (#2473) 455 - Add pass to generate needed initializers for WebGPU (#2481) 456 - Allow images without format for OpenCL. (#2470) 457 - Remove unreachable block validation (#2525) 458 - Reduce runtime of array layout checks (#2534) 459 - Add validation specific to OpExecutionModeId (#2536) 460 - Validate sign of int types. (#2549) 461 - VK_KHR_uniform_buffer_standard_layout validation (#2562) 462 Fixes: 463 - #2439: Add missing DepthGreater case to Fragment only check. 464 - #2168: Disallow BufferBlock on StorageBuffer variables for Vulkan. 465 - #2408: Restrict and Aliased decorations cannot be applied to the same id. 466 - #2447: Improve function call parameter check. 467 - Reduce 468 - Add Pass to remove unreferenced blocks. (#2398) 469 - Allows passing options to the validator. (#2401) 470 - Improve reducer algorithm and other changes (#2472) 471 - Add Pass to remove selections (#2485) 472 - Add passes to simplify branches (#2507) 473 Fixes: 474 - #2478: fix loop to selection pass for loops with combined header/continue block 475 476v2019.2 2019-02-20 477 - General: 478 - Support SPV_EXT_physical_storage_buffer 479 - A number of memory leak have been fixed. 480 - Removed use of deprecated Google test macro: 481 - Changed the BUILD.gn to only build tests in Chromium. 482 - Optimizer 483 - Upgrade memory model improvments for modf and frexp. 484 - Add a new pass to move loads closer to their uses: code sinking. 485 - Invalidating the type manager now invalidates the constnat manager. 486 - Expand instrumentation pass for bindless bounds checking to runtime-sized descriptor arrays. 487 - Add a new pass that removes members from structs that are not used: dead member elimination. 488 Fixes: 489 - #2292: Remove undefined behaviour when folding bit shifts. 490 - #2294: Fixes for instrumentation code. 491 - #2293: Fix overflow when folding -INT_MIN. 492 - #2374: Don't merge unreachable blocks when merging blocks. 493 - Validator 494 - Support SPV_KHR_no_integer_wrap and related decorations. 495 - Validate Vulkan rules for OpTypeRuntimeArray. 496 - Validate NonWritable decoration. 497 - Many WebGPU specific validation rules were added. 498 - Validate variable pointer related function call rules. 499 - Better error messages. 500 Fixes: 501 - #2307: Check forwards references in OpTypeArray. 502 - #2315, #2303: Fixed the layout check for relaxed layout. 503 - #1628: Emit an error when an OpSwitch target is not an OpLabel. 504 - Reduce 505 - Added more documentation for spirv-reduce. 506 - Add ability to remove OpPhi instructions. 507 - Add ability to merge two basic blocks. 508 - Add ability to remove unused functions and unused basic blocks. 509 Fixes: 510 511v2019.1 2019-01-07 512 - General: 513 - Created a new tool called spirv-reduce. 514 - Add cmake option to turn off SPIRV_TIMER_ENABLED (#2103) 515 - New optimization pass to update the memory model from GLSL450 to VulkanKHR. 516 - Recognize OpTypeAccelerationStructureNV as a type instruction and ray tracing storage classes. 517 - Fix GCC8 build. 518 - Add --target-env flag to spirv-opt. 519 - Add --webgpu-mode flag to run optimizations for webgpu. 520 - The output disassembled line number stead of byte offset in validation errors. (#2091) 521 - Optimizer 522 - Added the instrumentation passes for bindless validation. 523 - Added passes to help preserve OpLine information (#2027) 524 - Add basic support for EXT_fragment_invocation_density (#2100) 525 - Fix invalid OpPhi generated by merge-return. (#2172) 526 - Constant and type manager have been turned into analysies. (#2251) 527 Fixes: 528 - #2018: Don't inline functions with a return in a structured CFG contstruct. 529 - #2047: Fix bug in folding when volatile stores are present. 530 - #2053: Fix check for when folding floating pointer values is allowed. 531 - #2130: Don't inline recursive functions. 532 - #2202: Handle multiple edges between two basic blocks in SSA-rewriter. 533 - #2205: Don't unswitch a latch condition during loop unswitch. 534 - #2245: Don't fold branch in loop unswitch. Run dead branch elimination to fold them. 535 - #2204: Fix eliminate common uniform to place OpPhi instructions correctly. 536 - #2247: Fix type mismatches caused by scalar replacement. 537 - #2248: Fix missing OpPhi after merge return. 538 - #2211: After merge return, fix invalid continue target. 539 - #2210: Fix loop invariant code motion to not place code between merge instruction and branch. 540 - #2258: Handle CompositeInsert with no indices in VDCE. 541 - #2261: Have replace load size handle extact with no index. 542 - Validator 543 - Changed the naming convention of outputing ids with names in diagnostic messages. 544 - Added validation rules for UniformConstant variables in Vulkan. 545 - #1949: Validate uniform variable type in Vulkan 546 - Ensure for OpVariable that result type and storage class operand agree (#2052) 547 - Validator: Support VK_EXT_scalar_block_layout 548 - Added Vulkan memory model semantics validation 549 - Added validation checkes spefic to WebGPU environment. 550 - Add support for VK_EXT_Transform_feedback capabilities (#2088) 551 - Add validation for OpArrayLength. (#2117) 552 - Ensure that function parameter's type is not void (#2118) 553 - Validate pointer variables (#2111) 554 - Add check for QueueFamilyKHMR memory scope (#2144) 555 - Validate PushConstants annotation and type (#2140) 556 - Allow Float16/Int8 for Vulkan 1.0 (#2153) 557 - Check binding annotations in resource variables (#2151, #2167) 558 - Validate OpForwardPointer (#2156) 559 - Validate operation for OpSpecConstantOp (#2260) 560 Fixes: 561 - #2049: Allow InstanceId for NV ray tracing 562 - Reduce 563 - Initial commit wit a few passes to reduce test cases. 564 - Validation is run after each reduction step. 565 Fixes: 566 567 568v2018.6 2018-11-07 569 - General: 570 - Added support for the Nvidia Turing and ray tracing extensions. 571 - Make C++11 the CXX standard in CMakeLists.txt. 572 - Enabled a parallel build for MSVC. 573 - Enable pre-compiled headers for MSVC. 574 - Added a code of conduct. 575 - EFFCEE and RE2 are now required when build the tests. 576 - Optimizer 577 - Unrolling loops marked for unrolling in the legalization passes. 578 - Improved the compile time of loop unrolling. 579 - Changee merge-return to create a placeholder loop around the function. 580 - Small improvement to merge-blocks to allow it to merge more often. 581 - Enforce an upper bound for the ids, and add option to set it. 582 - #1966: Report error if there are unreachable block before running merge return 583 Fixes: 584 - #1917: Allow 0 (meaning unlimited) as a parameter to --scalar-replacement 585 - #1915: Improve handling of group decorations. 586 - #1942: Fix incorrect uses of the constant manager. Avoids type mismatches in generated code. 587 - #1997: Fix dead branch elimination when there is a loop in folded selection. 588 - #1991: Fixes legality check in if-conversion. 589 - #1987: Add nullptr check to array copy propagation. 590 - #1984: Better handling of OpUnreachable in ADCE. 591 - #1983: Run merge return on reachable functions only. 592 - #1956: Handled atomic operations in ADCE. 593 - #1963: Fold integer divisions by 0 to 0. 594 - #2019: Handle MemberDecorateStringGOOGLE in ADCE and strip reflect. 595 - Validator 596 - Added validation for OpGroupNonUniformBallotBitCount. 597 - Added validation for the Vulkan memory model. 598 - Added support for VK_KHR_shader_atddomic_int64. 599 - Added validation for execution modes. 600 - Added validation for runtime array layouts. 601 - Added validation for 8-bit storage. 602 - Added validation of OpPhi instructions with pointer result type. 603 - Added checks for the Vulkan memory model. 604 - Validate MakeTexelAvailableKHR and MakeTexelVisibleKHR 605 - Allow atomic function pointer for OpenCL. 606 - FPRounding mode checks were implemented. 607 - Added validation for the id bound with an option to set the max id bound. 608 Fixes: 609 - #1882: Improve the validation of decorations to reduce memory usage. 610 - #1891: Fix an potential infinite loop in dead-branch-elimination. 611 - #1405: Validate the storage class of boolean objects. 612 - #1880: Identify arrays of type void as invalid. 613 - #487: Validate OpImageTexelPointer. 614 - #1922: Validate OpPhi instructions are at the start of a block correctly. 615 - #1923: Validate function scope variable are at the start of the entry block. 616 617v2018.5 2018-09-07 618 - General: 619 - Support SPV_KHR_vulkan_memory_model 620 - Update Dim capabilities, to match SPIR-V 1.3 Rev 4 621 - Automated build bots no run tests for the VS2013 case 622 - Support Chromium GN build 623 - Use Kokoro bots: 624 - Disable Travis-CI bots 625 - Disable AppVeyor VisualStudio Release builds. Keep VS 2017 Debug build 626 - Don't check export symbols on OSX (Darwin): some installations don't have 'objdump' 627 - Reorganize source files and namespaces 628 - Fixes for ClangTidy, and whitespace (passes 'git cl presumit --all -uf') 629 - Fix unused param compile warnings/errors when Effcee not present 630 - Avoid including time headers when timer functionality is disabled 631 - Avoid too-stringent warnings flags for Clang on Windows 632 - Internal refactoring 633 - Add hooks for automated fuzzing 634 - Add testing of command line executables 635 - #1688: Use binary mode on stdin; fixes "spirv-dis <foo.spv" on Windows 636 - Optimizer 637 - The optimizer validates the module before it begins 638 - Add API to register passes by string name 639 - Fold a vector shuffle feeding a vector shuffle 640 - Add -combine-access-chains transform 641 - Refactor how IRContext is handled by passes 642 - Improve bookkeeping for instruction result type and result id 643 - Fix over-duplication of decorations 644 - Fix handling of exits from selections in dead-branch elimination, and dead code 645 elimination. 646 - Fix handling of certain kinds of flow control in merge-return 647 Fixes: 648 - #1721: Fix size bug when folding vector shuffles 649 - #1722: Fix size infinite loop when folding vector shuffles 650 - #1724: Fix finding a constant of a specific type 651 - #1727: Dead branch elim: Reorder blocks if needed to satisfy dominance rule 652 - #1729: Handle VariablePointers cases in various optimizations 653 - #1731: Fix vector shuffle with literal id indicating undef value 654 - #1736: Fix handling of decorations and phis in merge-return 655 - #1787: Fix handling of decorations related to access chains 656 - #1865: Avoid leaking memory for SPIR-V constant values 657 - Validator 658 - Improve error messages 659 - Avoid platform-dependent traversal ordering, to ensure consistent messages 660 - Use libspirv::Instruction where possible 661 - Add option to skip all block layout checks 662 - Validate all type IDs 663 - Validate uses of OpFunction 664 - Validate uses of OpTypeFunction 665 - Disallow a struct containing its own type https://crbug.com/874372 666 - #1685: Vulkan permits non-monotonic offsets for block members 667 - #1697: Enforce block layout rules even when using relaxed block layout option 668 - #1719: Fix line number for vector shuffle valiation error 669 - #1789: Avoid assertion failure when validating some functions 670 - #1800: Fix validation of OpCopyMemorySized 671 - #1822: Stop enforcing struct member offset montonicity 672 - #1831: Disallow void members in structs 673 674v2018.4 2018-07-08 675 - General: 676 - Support SPV_KHR_8bit_storage 677 - Add gclient and presubmit configurations 678 - Enable Kokoro build bots (#1625) 679 - Group tests into fewer executables, reduces load on CI 680 - Port test script to Python 3 681 - Symbol export tests respect SPIRV_SKIP_TESTS 682 - #1596: Operand lookup succeeds if enabled by a capability 683 - #1624: Instruction lookup succeeds if enabled by a capability 684 - Refactoring namespaces: 685 - #1678: Change libspirv to spvtools 686 - Code in source/utils moved into spvtools::utils 687 - Code in source/comp moved into spvtools::comp 688 - Optimizer: 689 - Remove insert-extract-elim pass. Use simplification pass instead. 690 - Preserve instruction-to-block mapping in most passes, to reduce runtime. 691 - Small vector optimization for operands 692 - Add pass to move Private variables to Function. Increase opportunity to optimize. 693 - Fixes: 694 #1120: Check static uses of entry point interfaces 695 #1372: Avoid merging some structs, to preserve names for reflection 696 #1577: Scalar replacement uses only undecorated types. 697 #1578: Fix handling of forward-pointer types, and types embedding pointers 698 to themselves. 699 #1591: Inliner: Callee variable with initializer should have a store at the call site. 700 #1634: Fix crash: Use type id in vector type lookup 701 #1649: Fix assert in compact-ids pass 702 Fix constant folder: ensure it uses the right type 703 #1659: Folding rules added to IRContext. Avoids leak. 704 - Validator 705 - Add work-in-progress WebGPU environment. Disallows OpUndef 706 - #670, #1581: Improve error messages; disassemble instruction 707 - #491: Check structured switches 708 - #937: Check layout rules for Block and BufferBlock in Uniform, StorageBuffer, PushConstant 709 - #1281: Check invalid branches into structured constructs 710 - #1522: Disallow array-of-arrays with DescriptorSets 711 - #1577: Allow duplicate pointer types. 712 - #1581: Better messages: output ID names along with numbers in more cases. 713 - #1597: Check Vulkan 1.1 capabilities 714 - #1618: Check invalid exit from structured case construct 715 - #1622: Run IdPass before DataRulesPass 716 - #1632: Reduce test time by artificially lowering limits in limit test 717 - #1638: Block-decorated structs member order must respect offset order 718 - #1657: Improve CFG validation diagnostics 719 - Khronos SPIR-V #337: GLSL.std.450 Refract instruction Eta param can be any float scalar. 720 - #1606: PushConstant Blocks follow storage-buffer layout rules 721 - #1664: Check layout of StorageBuffer variables with Block decoration, using storage buffer 722 rules 723 - #1666: Layout validation should permit {vec3; float} packing 724 - #1637, #1668: Layout validation uses RowMajor, ArrayStride, MatrixStride properly 725 - Linker 726 - Avoid buffer overrun when creating OpModuleProcessed 727 728v2018.3 2018-05-25 729 - General: 730 - Support SPV_EXT_descriptor_indexing 731 - Support SPV_GOOGLE_decorate_string 732 - Support SPV_GOOGLE_hlsl_functionality1 733 - Support SPV_NV_shader_subgroup_partitioned 734 - Use "unified1" grammar from SPIRV-Headers 735 - Simplify support for new extensions. Assembler, disassembler, and simple validation 736 support is automatic if new tokens are introduced with appropriate extension 737 attributes in the "unified1" SPIR-V core grammar. 738 - Disassembler: Emit more digits on floating point, to reliably reproduce all 739 significand bits. (Use std::max_digits10 instead of std::digits10) 740 - Fix compilation for old XCode versions: Explicit construction required for std::set. 741 - Optimizer: 742 - Add --strip-reflect 743 - Add --time-report 744 - Add --loop-fission 745 - Add lop fusion. 746 - Add loop peeling pass and internal utility. 747 - Improve optimizer runtime. 748 - Merge-return now works with structured control flow. 749 - New (faster) SSA rewriter to convert local loads and stores to SSA IDs and phis. 750 Can replace load/store elimination passes. 751 - Fix instruction folding case: insertion that feeds and extract, when the extract 752 remains. 753 - Fold OpDot. 754 - Fold OpFNegate. 755 - Fold multply and divide of same value. 756 - Fold FClamp feeding a compare. 757 - Fold OpLoad feeding an extract, to reduce excessive copying. (#1547) 758 - Fold Fmix feeding an extract. 759 - Use simplification pass instead of insert-extract elimination. 760 - Constant fold OpVectorTimesScalar. 761 - Copy propagate arrays, in simple cases. 762 - Aggressive dead code elimination: Can remove more instructions, e.g. derivatives. 763 - Aggressive dead code elimination: Remove Workgroup variables that are written but not read. 764 - Better handling of OpImageTexelPointer 765 - Initial utilities for scalar evolution. 766 - Add Vector dead code elimination. 767 - Each pass can only run once. 768 - Allow code hosting in if-conversion. 769 - Add external interface for adding a PassToken, so external code can make their own 770 passes. 771 - Fixes: 772 #1404: Don't optimize away the compute compute workgroup size constant. 773 #1407: Remove a bad assertion 774 #1456: Fix bug in SSA rewriter related to variables updated in loops. 775 #1487: Fix long runtime in Dead insertion elimination: Don't revist select phi nodes. 776 #1492: Aggressive dead code elimination can remove OpDecorateStringGOOGLE. 777 #1527: Fix inlining of functions having OpKill and OpUnreachable. 778 #1559: Fix assert failure in reduce-load-size pass. 779 #1556: Aggressive dead code elimination: Fix handling of OpCopyMemory. 780 - Validator: 781 - Check Vulkan built-in variables 782 - Check Vulkan-specific atomic result type rule. 783 - Relax control barrier check for SPIR-V 1.3. Fixes #1427 784 - Check OpPhi. 785 - Check OpMemoryModel. 786 - Stop checking sizes derived from spec-constants. 787 - Re-enable checks for OpUConvert. 788 - Vulkan: Fix check for PrimitiveId: Permit as Input in fragment shader. 789 - Validate binary version for the given target environment. 790 - Add tests for OpBranch checks. 791 - Vulkan 1.1: Check scope for non-uniform subgroup operations. 792 - Fix checks for SPV_AMD_gpu_shader_int16. 793 - Fix logical layout check for OpDecorateId. 794 - Fix checks for ViewportIndex & Layer for Vulkan and SPV_EXT_shader_viewport_index_layer. 795 - Fixes: 796 #1470: Vulkan: Don't restrict WorkgroupSize to Input storage class. 797 #1469: Vulkan: Permit Subgroup memory scope for Vulkan 1.1. 798 #1472: Per-vertex variable validation fixes. 799 #1483: Valdiate barrier execution scopes for Vulkan 1.1. 800 - Fixes: 801 #898: Linker properly removes FuncParamAttr from imported symbols. 802 #924, #1174: Fix handling of decoration groups in optimizer, linker. 803 804v2018.2 2018-03-07 805 - General: 806 - Support SPIR-V 1.3 and Vulkan 1.1. 807 - Default target environment is now SPIR-V 1.3. For command-line tools, 808 use the --target-env option to override the default. Examples: 809 # Generate a SPIR-V 1.0 binary instead of SPIR-V 1.3 810 spirv-as --target-env spv1.0 a.spvasm -o a.spv 811 spirv-as --target-env vulkan1.0 a.spvasm -o a.spv 812 # Validate as Vulkan 1.0 813 spirv-val --target-env vulkan1.0 a.spv 814 - Support SPV_GOOGLE_decorate_string and SPV_GOOGLE_hlsl_functionality1 815 - Fixes: 816 - Fix Android.mk build. Compilation was failing due to missing definitions of 817 SpvCapabilityFloat16ImageAMD and other enumerated values. 818 - Optimizer: Avoid generating duplicate names when merging types. 819 - #1375: Validator: SPV_AMD_gpu_shaer_half_float implicitly allows declaration 820 of the 16-bit floating point type. 821 - #1376: Optimizer: Avoid folding half-precision float. 822 823v2018.1 2018-03-02 824 - General: 825 - Support Visual Studio 2013 again. (Continue support for VS 2015 and VS 2017.) 826 - Support building SPIRV-Tools as a shared library. 827 - Improve the HLSL legalization optimization recipe. #1311 828 - Optimizer: 829 - General speedups. 830 - Remove generic dead code elimination functionality from transforms: 831 --eliminate-local-single-block 832 --eliminate-local-single-store 833 --eliminate-local-multi-store 834 To recover the previous behaviour, a recipe using those transforms should now 835 also invoke the --eliminate-dead-code-aggressive transform. 836 - Improve folding, including coverage for floating point, OpSelect, and arithmetic 837 with non-trivial constant operands. 838 - Add loop-invariant code motion pass. 839 - Add loop-unrolling pass, for honouring unroll hits. 840 - Add loop-unswitch pass. 841 - Add instruction simplification pass. 842 - Aggressive dead code elimination: Understands capability hierarchy when finding 843 instructions it can eliminate (combinators). (PR #1268) 844 - CCP can now fold floating point arithmetic. #1311 845 - Validator: 846 - Validate barrier instructions. 847 - Check Vulkan-specific rules for atomics. 848 - Check Vulkan prohibition of Location or Component decorations on BuiltIn variables. 849 - Linker: 850 - Add --verify-ids option 851 - Add option to allow a resulting module to be partially linked. 852 - Handle OpModuleProcessed (instructions in SPIR-V layout section 7c) 853 - Fixes: 854 - #1265: Optimizer: Fix use-after free bug in if-conversion. (Fix object lifecycle bug 855 in type manager.) 856 - #1282: Fix new warnings found by GCC 8.0.1. 857 - #1285: Optimizer: Fix random failures during inlining. (Dangling references in DefUseManager) 858 - #1295: Optimizer: Fix incorrect handling of Phi nodes in CCP. 859 - #1300: Fix CCP: avoid bad CCP transitions and unsettled values. 860 - #1304: Avoid static-duration variables of class type (with constructors). 861 - #1323: Fix folding of an insert composite feeding a composite extract. 862 - #1339: Fix CCP: Handle OpConstantNull boolean values as conditions. 863 - #1341: DCEInst: Keep atomic instructions (and some others with side effects). 864 - #1354: Don't fold integer division. 865 - #1357: Support OpConstantNull in folding. 866 - #1361: CCP: Fix handling of non-constant module-scope values 867 868v2018.0 2018-02-02 869 - General 870 - VisualStudio 2013 is no longer supported. VisualStudio 2015 is supported. 871 - Use "include/unified1" directory from SPIRV-Headers. Requires recent SPIRV-Headers source. 872 - Disassembler: spirv-dis adds --color option to force color disassembly. 873 - Optimizer: 874 - Add pass to eliminate dead insertions. 875 - Aggressive dead code elimination now removes OpSwitch constructs. 876 - Block merging occurs in more cases. 877 - Add driver workaround transform: replace OpUnreachable with harmless branch to merge. 878 - Improve instruction folding framework. 879 - Add loop analysis. 880 - Add scalar replacement of aggregates to size-optimization recipe. 881 - Add pass to replace instructions invalid for a shader stage, with a harmless value. 882 This changes the semantics of the program! Not for general use! 883 - Rearragne and add passes to performance-optimization recipe, to produce better results. 884 - Validator: 885 - Validate OpenCL extended instructions. 886 - Shaders can't perform atomics on floats. 887 - Validate memory semantics values in atomics. 888 - Validate instruction-adjacency constraints, e.g. OpPhi predecessors, merge instructions 889 immediately precede branches. 890 - Fixes: 891 - PR 1198: Optimizer: Fix CCP in presence of matrix constants. 892 - #1199: Optimizer: Fix CCP: don't propagate spec constants. 893 - #1203: Optimizer: Fix common uniform elim bug introduced by refactoring. 894 - #1210: Optimizer: Aggressive dead code elimination: Fix 'break' identification. 895 - #1212: Optimizer: Aggressive dead code elimination: Was skipping too many instructions. 896 - #1214: Optimizer: Aggressive dead code elimination: Fix infinite loop. 897 - #1228: Optimizer: Fix CCP: Handling of varying Phi nodes; was resulting in infinite loop. 898 - #1245: Optimizer: Dead branch elimination: Avoid a null pointer dereference. 899 - #1250: Optimizer: Dead branch elimination: Avoid spuriously reporting a change. 900 901v2017.3 2018-01-12 902 - General: 903 - Support DebugInfo extended instruction set, targeted at OpenCL environments. 904 See the SPIR-V Registry. 905 - Generate a SPIRV-Tools.pc file for pkg-config. 906 - Optimizer: 907 - Progress for legalization of code generated from HLSL (issue #1118): 908 - Add --legalize-hlsl option to run transforms used to transform intermediate 909 code generated by HLSL to SPIR-V for Vulkan compilers. Those compilers 910 normally run these transforms automatically. This option is used for developing 911 those transforms. 912 - Add Private-to-Function variable conversion for modules with logical 913 addressing. 914 - Add --ccp: SSA Conditional Constant Propagation (CCP) 915 - Add --print-all to show disassembly for each optimization pass. 916 - Internal: Add loop descriptors and post-order tree iterator. 917 - Generalized dead branch elimination 918 - Aggressive dead code elimination (ADCE) now removes dead functions and 919 module-scope variables. 920 - Vector extract/insert elimination now optimizes through some cases of 921 VectorShuffle, and GLSL.std.450 Mix extended instruction. 922 - Validator: 923 - Add validation for GLSL.std.450 extended instruction set. 924 - Check out of bounds composite accesses, where that's statically computable. 925 Fixes #1112. 926 - Check upper bits of literal numbers that aren't a multiple of 32-bits wide. 927 - More validation of primitive instructions 928 - Add optional "relaxed" checking logical addressing mode to permit some 929 cases of pointer-to-pointer. Contributes to HLSL legalization (issue #1118). 930 - Fixes: 931 #1100: Validator: Image operand Sample can be used with OpImageSparseFetch, 932 OpImageSparseRead. 933 #1108: Remove duplicates transform was incorrectly removing non-duplicate 934 decorations. 935 #1111: Optimizer's type manager could reference deleted memory. 936 #1112: Fix decoration equality check, e.g. it is now symmetric. 937 #1129: Validator now disallows Dim=SupbassData for OpImageSparseRead. 938 #1143: Fix CCP: Was generating incorrect code for loops. 939 #1153: Fix CCP crash. 940 #1154: Optimizer's internal instruction-to-block mappings were sometimes 941 inconsistent. 942 #1159: Fix CCP infinite loop. 943 #1168: Fix dead branch elimination intermittently generating incorrect code. 944 Fixes https://github.com/KhronosGroup/glslang/issues/1205 945 #1186: Fix validation of PackDouble2x32 and UnpackDouble2x32 946 947v2017.2 2017-12-15 948 - General: 949 - Support OpenCL 1.2, 2.0 target environments, including embedded profiles 950 - Add CONTRIBUTING.md 951 - Fix exit status code for spirv-link 952 - Disassember: Enable emitting ANSI colour codes to a string 953 - Library avoids polluting global namespace. The libraries can export C and C++ 954 symbols starting with "spv", or in a C++ namespace. Add a test for this. 955 - Linux release builds include debug information, for easier profiling 956 - Build bots no longer test VisualStudio 2013 957 - Testing dependency RE2 requires VisualStudio 2015 or later 958 - Build bots check code formatting 959 - Optimizer: 960 - Add --skip-validation to spirv-opt 961 - Add dominance tree analysis 962 - Add generic value propagation engine 963 - Add global redundancy elimination within a function 964 - Add scalar replacement of function-scope variables of composite type 965 - Aggressive dead code elimination: Remove empty loops 966 - Killing an instruction notifies the IRContext 967 - IRContext::KillInst deletes the instruction 968 - Move CFG analysis to IRContext 969 - Add constant manager 970 - Fix: Don't consider derivative instructions as combinators. 971 - Fix: Don't delete an instruction twice in local dead-code-elimination 972 - Fix: Don't consider derivative instructions as combinators. 973 - Validator: 974 - Finish checking of image instructions (Section 3.32.10) 975 - Check sparse image instructions 976 - Check OpTypeImage, OpTypeSampleImage 977 - Check composite instructions (Section 3.32.12) 978 - Check atomic instructions (Section 3.32.18) 979 - Check OpEmitStreamVertex, OpEndStreamPrimitive instructions 980 - Re-enable validation of OpCopyObject 981 - OpKill, image ImplicitLod and QueryLod instructions can only be used in Fragment 982 shaders. 983 - Fixes for image instruction validation: 984 - Lod image operand only usable with ExplicitLod and OpImageFetch 985 - ExplicitLod Lod image operand must be float scalar 986 - OpImageFectch Lod image operand must be int scalar 987 - OpImageGather component operand must be 32-bits (integer scalar) 988 - OpImageQuerySizeLod Lod must be integer scalar 989 - Fixes: 990 #622: Remove names and decorations when inlining 991 #989: Aggressive dead code elim: Don't optimize away live breaks from a loop 992 #991: Fix validation of SPV_AMD_shader_ballot 993 #1004: Use after free of an instruction, in remove-duplicates transform 994 #1007: OpImageRead not required to return 4-component vector 995 #1009: OpImageRead can return scalar int/float types 996 #1011: OpImageWrite should allow scalar int/float texel types 997 #1012: Fix validat Dref type check 998 #1017: Load-store elimination considers variable initializations 999 #1034: Fix Windows debug build: operator< should be a weak ordering 1000 #1083: Inlining: Set parent (function) for each inlined basic block. 1001 #1075: Aggressive dead code elimination: Was leaving dangling references to 1002 removed blocks. 1003 1004v2017.1 2017-11-23 1005 - Update README with details on the public_spirv_tools_dev@khronos.org mailing list. 1006 - General: 1007 - Automatically deploy built artifacts to GitHub Releases 1008 - Add a Linker (module combiner). Under development. 1009 - Add Android.mk for Android NDK builds. 1010 - Add the 'effcee' library as an optional dependency for use in tests. 1011 Eventually it will be a required dependency, once downstream projects have 1012 a chance to adjust. Requires 're2' library. 1013 - Avoid static-duration variables of class type (with constructors). 1014 - Hack around bugs in gcc-4.8.1 template handling 1015 - Faster opcode lookup 1016 - Validator: 1017 - Recognize extensions listed on SPIR-V registry, 1018 through #25 SPV_AMD_shader_fragment_mask 1019 - Validator issues an info message when it sees an unrecognized extension. 1020 - Type check basic arithmetic operations 1021 - Type check carry/extended arithmetic operations 1022 - Type check vector arithmetic operations 1023 - Type check Relational and Logical instructions 1024 - Type check Bit instructions 1025 - Check type uniqueness rules 1026 - Check conversion instructions 1027 - Check image instructions 1028 - Check derivative instructions 1029 - Check OpVectorShuffle 1030 - Check OpBranchConditional 1031 - OpModuleProcessed is only allowed after debug names section and before annotations 1032 section. 1033 - Checks the right kind of return is called for each function (void or non-void). 1034 - Add option to relax type check when storing structs (--relax-store-struct) 1035 - Optimizer: 1036 - Refactoring internal representation of the module, including: 1037 - IRContext: owns a module and manages analyses 1038 - Instructions are owned by intrusive lists, and have unique IDs 1039 - BasicBlock owns its instruction list. 1040 - DefUseManager: change representation of uses, for faster processing 1041 on large modules. 1042 - Add high level recipes: -O, -Os, and -Oconfig 1043 Recipes for -O and -Os are under development. 1044 - Add eliminate-dead-function transform 1045 - Add strength reduction transform: For now, convert multiply by power of 2 1046 to a bit shift. 1047 - Add CFG cleanup transform 1048 - Add removal of dead module-scope variables 1049 - Add merge-return transform for modules without structured control flow 1050 - Add redundancy elimination within a basic block (local value numbering) 1051 - Extract-insert elimination: 1052 - Recognize the case where the first instruction in the sequence is an 1053 OpCompositeConstruct or OpConstantComposite 1054 - Handle some cases of nested structs 1055 - Dead branch elimination now can eliminate entire selection constructs 1056 when all arms are dead. 1057 - Compressing codec: 1058 - Updated algorithm to 1.01, 1.02, 1.03 1059 - Not built by default. Use -DSPIRV_BUILD_COMPRESSION=ON to build. 1060 - Codec can be parameterized by a customized model. 1061 - Fixes: 1062 #728: Fix decoration of inlined functions 1063 #798: spirv-as should fail when given unrecognized long option 1064 #800: Inliner: Fix inlining function into header of multi-block loop 1065 #824: Eliminate-local-multi-store: Fix a crash 1066 #826: Elimiante-local-multi-store: Fix a crash 1067 #827: Fix crash when compact-ids transform runs before another transform. 1068 #834: Add Cmake option to build the compressing codec. Off by default. 1069 #911: Fix classification of Line and NoLine instructions 1070 1071v2017.0 2017-09-01 1072 - Update README to describe that assembler, disassembler, and binary parser support 1073 are based on grammar files from the SPIRV-Headers repository. 1074 1075v2016.7 2017-09-01 1076 - Add SPIR-V 1.2 1077 - OpenCL 2.2 support is now based on SPIR-V 1.2 1078 - Support AMD extensions in assembler, disassembler: 1079 SPV_AMD_gcn_shader 1080 SPV_AMD_shader_ballot 1081 SPV_AMD_shader_explicit_vertex_parameter 1082 SPV_AMD_shader_trinary_minmax 1083 SPV_AMD_gpu_shader_half_float 1084 SPV_AMD_texture_gather_bias_lod 1085 SPV_AMD_gpu_shader_int16 1086 - Optimizer: Add support for: 1087 - Inline all function calls in entry points. 1088 - Flatten decoration groups. Fixes #602 1089 - Id compaction (minimize Id bound). Fixes #624 1090 - Eliminate redundant composite insert followed by extract 1091 - Simplify access chains to local variables 1092 - Eliminate local variables with a single store, if possible 1093 - Eliminate local variables with a several stores, if possible 1094 - Eliminate loads and stores in same block to local variables 1095 - Eliminate redundant insert/extract to composite values 1096 - Aggressive dead instruction elimination 1097 - Eliminate dead branches 1098 - Merge blocks when the second can only be preceded by the first 1099 - Eliminate ommon uniform loads 1100 - Assembler: Add option to preserve numeric ids. Fixes #625 1101 - Add build target spirv-tools-vimsyntax to generate spvasm.vim, a SPIR-V 1102 assembly syntax file for Vim. 1103 - Version string: Allow overriding of wall clock timestamp with contents 1104 of environment variable SOURCE_DATE_EPOCH. 1105 - Validator implements relaxed rules for SPV_KHR_16bit_storage. 1106 - CMake installation rules use GNUInstallDirs. For example, libraries 1107 will be installed into a lib64 directory if that's the norm for the 1108 current system. 1109 - Fixes: 1110 #500: Parameterize validator limit checks 1111 #508: Support compilation under CYGWIN 1112 #517: Fix validation when continue (or case) contstruct is also the head of a 1113 nested control construct. 1114 #551: If a merge block is reachable, it must be *strictly* dominated by its 1115 header. 1116 #548: Validator: Error when the reserved OpImageSparseSampleProj* opcodes 1117 are used. 1118 #611: spvtools::Optimizer was failing to save the module to the output 1119 binary vector when all passes succeded without changes. 1120 #629: The inline-entry-points-all optimization could generate invalidly 1121 structured code when the inlined function had early returns. 1122 #697: Optimizer's Instruction::ForEachInId method was skipping semantics-id 1123 and scope-id. 1124 #755: Inliner: Fix inlining of callee with single Return appearing before 1125 the end of the function. 1126 #776: Fix dead branch elimination in presence of complex but dead control 1127 flow. 1128 #781: SPV_KHR_variable_pointers allows duplicate pointer types 1129 #782: Inliner: Fix remapping of non-label forward references in callee 1130 #787: Inliner: Fix remapping of inlined entry block when called from 1131 single block loop. 1132 #790: Inliner: Fix remapping of inlined entry block when callee has 1133 multiple returns. 1134 1135v2016.6 2016-12-13 1136 - Published the C++ interface for assembling, disassembling, validation, and 1137 optimization. 1138 - Support SPV_KHR_shader_draw_parameters in assembler, disassembler, parser. 1139 - Validator: 1140 - Add validator API accepting raw binary words 1141 - Increased coverage: 1142 - Checks "Data rules" in Universal Validation Rules, section 2.16.1 1143 - WIP: Universal Limits. 1144 - The minimum mandated upper bounds are checked. 1145 - TODO: Parameterize the validator to allow larger limits accepted by 1146 a more than minimally capable implementation. 1147 - OpSampledImage checks 1148 - OpConstantComposite checks 1149 - Id bound check 1150 - Disasssembler: 1151 - Generates friendly GLSL-based names for more builtin variables 1152 - Generates friendly names for numeric OpConstant values 1153 - Vendor tool info extracted from SPIR-V XML registry file. 1154 - Fixes issues: 1155 #429: Validator: Allow OpTypeForwardPointer and OpTypeStruct to reference 1156 undefined IDs 1157 #482: Validator: OpVariable initializer can be an ID of a module-scope variable 1158 1159v2016.5 2016-09-16 1160 - Support SPV_KHR_shader_ballot in assembler, disassembler, parser. 1161 - Disassembler: Generate friendly names for built-in variables. 1162 - Partial fixes: 1163 #359: Add Emacs helper for automatically diassembling/assembling a SPIR-V 1164 binary on file load/save. 1165 - Fixes: 1166 #414: Validator: Allow OpUndef for composite constants 1167 #415: Validator: Phi can use its own value in some cases. 1168 1169v2016.4 2016-09-01 1170 - Relicensed under Apache 2.0 1171 - Add optimization passes (in API and spirv-opt command) 1172 - Fold spec constants defined with OpSpecConstantOp and 1173 OpSpecConstantComposite to normal constants with fixed value(s). 1174 - Fixes issues: 1175 #318: Relicensed under Apache 2.0 1176 1177v2016.3 2016-08-24 1178 - Add target environment enums for OpenCL 2.1, OpenCL 2.2, 1179 OpenGL 4.0, OpenGL 4.1, OpenGL 4.2, OpenGL 4.3, OpenGL 4.5. 1180 - Add spirv-cfg, an experimental tool to dump the control flow graph 1181 as a GraphiViz "dot" graph 1182 - Add optimization pass: Eliminate dead constants. 1183 - Add spirv-lesspipe.sh filter utility 1184 - Fixes issues: 1185 #288: Check def-use dominance rules for OpPhi (variable,parent) operands 1186 #339: Allow OpUndef in types-constants-global-vars section, as required 1187 by SPIR-V 1.0 Rev7, 1.1 Rev 3. 1188 #340: Avoid race on mkdir during build 1189 #365: Relax PointSize, ClipDistance, CullDistance capability check in all 1190 environments not just Vulkan 1.0. 1191 1192v2016.2 2016-08-05 1193 - Validator is incomplete 1194 - Checks ID use block is dominated by definition block 1195 - Add optimization passes (in API and spirv-opt command) 1196 - Strip debug info instructions 1197 - Freeze spec constant to their default values 1198 - Allow INotEqual as operation for OpSpecConstantOp 1199 - Fixes bugs: 1200 #270: validator: crash when continue construct is unreachable 1201 #279: validator: infinite loop when analyzing some degenerate control 1202 flow graphs 1203 #286: validator: don't incorrectly generate def-use error for 1204 (variable,parent) parameters to OpPhi 1205 #290: disassembler: never generate bare % for an identifier 1206 #295: validator: def-use dominance check should ignore unreachable uses 1207 #276: validator: allow unreachable continue constructs 1208 #297: validator: allow an unreachable block to branch to a reachable 1209 merge block 1210 1211v2016.1 2016-07-19 1212 - Fix https://github.com/KhronosGroup/SPIRV-Tools/issues/261 1213 Turn off ClipDistance and CullDistance capability checks for Vulkan. 1214 - The disassembler can emit friendly names based on debug info (OpName 1215 instructions), and will infer somewhat friendly names for most types. 1216 This is turned on by default for the spirv-dis command line tool. 1217 - Updated to support SPIR-V 1.1 rev 2 1218 - Input StorageClass, Sampled1D capability, and SampledBuffer capability 1219 do not require Shader capability anymore. 1220 1221v2016.0 2016-07-04 1222 1223 - Adds v<year>.<index> versioning, with "-dev" indicating 1224 work in progress. The intent is to more easly report 1225 and summarize functionality when SPIRV-Tools is incorporated 1226 in downstream projects. 1227 1228 - Summary of functionality (See the README.md for more): 1229 - Supports SPIR-V 1.1 Rev 1 1230 - Supports SPIR-V 1.0 Rev 5 1231 - Supports GLSL std450 extended instructions 1.0 Rev 3 1232 - Supports OpenCL extended instructions 1.0 Rev 2 1233 - Assembler, disassembler are complete 1234 - Supports floating point widths of 16, 32, 64 bits 1235 - Supports integer widths up to 64 bits 1236 - Validator is incomplete 1237 - Checks capability requirements in most cases 1238 - Checks module layout constraints 1239 - Checks ID use-definition ordering constraints, 1240 ignoring control flow 1241 - Checks some control flow graph rules 1242 - Optimizer is introduced, with few available transforms. 1243 - Supported on Linux, OSX, Android, Windows 1244 1245 - Fixes bugs: 1246 - #143: OpenCL pow and pown arguments 1247