CHANGES 38 KB

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