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