Add bitwise operations validator pass
[platform/upstream/SPIRV-Tools.git] / CHANGES
1 Revision history for SPIRV-Tools
2
3 v2017.1-dev 2017-09-01
4  - General:
5    - Avoid static-duration variables of class type (with constructors).
6  - Validator:
7    - Type check basic arithmetic operations
8    - Type check Relational and Logical instructions
9    - Type check Bit instructions
10    - OpModuleProcessed is only allowed after debug names section and before annotations
11      section.
12    - Recognize extensions listed on SPIR-V registry,
13      through #25 SPV_AMD_shader_fragment_mask
14  - Optimizer:
15    - Add eliminater-dead-function transform
16    - Add strength reduction transform: For now, convert multiply by power of 2
17      to a bit shift.
18    - Extract-insert elimination: Recognize the case where the first instruction
19      in the sequence is an OpCompositeConstruct or OpConstantComposite
20  - Fixes:
21    #798: spirv-as should fail when given unrecognized long option
22    #800: Inliner: Fix inlining function into header of multi-block loop
23    #824: Eliminate-local-multi-store: Fix a crash
24    #826: Elimiante-local-multi-store: Fix a crash
25    #834: Add Cmake option to build the compressing codec. Off by default.
26
27 v2017.0 2017-09-01
28  - Update README to describe that assembler, disassembler, and binary parser support
29    are based on grammar files from the SPIRV-Headers repository.
30
31 v2016.7 2017-09-01
32  - Add SPIR-V 1.2
33  - OpenCL 2.2 support is now based on SPIR-V 1.2
34  - Support AMD extensions in assembler, disassembler:
35     SPV_AMD_gcn_shader
36     SPV_AMD_shader_ballot
37     SPV_AMD_shader_explicit_vertex_parameter
38     SPV_AMD_shader_trinary_minmax
39     SPV_AMD_gpu_shader_half_float
40     SPV_AMD_texture_gather_bias_lod
41     SPV_AMD_gpu_shader_int16
42  - Optimizer: Add support for:
43    - Inline all function calls in entry points.
44    - Flatten decoration groups.  Fixes #602
45    - Id compaction (minimize Id bound).  Fixes #624
46    - Eliminate redundant composite insert followed by extract
47    - Simplify access chains to local variables
48    - Eliminate local variables with a single store, if possible
49    - Eliminate local variables with a several stores, if possible
50    - Eliminate loads and stores in same block to local variables
51    - Eliminate redundant insert/extract to composite values
52    - Aggressive dead instruction elimination
53    - Eliminate dead branches
54    - Merge blocks when the second can only be preceded by the first
55    - Eliminate ommon uniform loads
56  - Assembler: Add option to preserve numeric ids. Fixes #625
57  - Add build target spirv-tools-vimsyntax to generate spvasm.vim, a SPIR-V
58    assembly syntax file for Vim.
59  - Version string: Allow overriding of wall clock timestamp with contents
60    of environment variable SOURCE_DATE_EPOCH.
61  - Validator implements relaxed rules for SPV_KHR_16bit_storage.
62  - CMake installation rules use GNUInstallDirs.  For example, libraries
63    will be installed into a lib64 directory if that's the norm for the
64    current system.
65  - Fixes:
66    #500: Parameterize validator limit checks
67    #508: Support compilation under CYGWIN
68    #517: Fix validation when continue (or case) contstruct is also the head of a
69      nested control construct.
70    #551: If a merge block is reachable, it must be *strictly* dominated by its
71      header.
72    #548: Validator: Error when the reserved OpImageSparseSampleProj* opcodes
73      are used.
74    #611: spvtools::Optimizer was failing to save the module to the output
75      binary vector when all passes succeded without changes.
76    #629: The inline-entry-points-all optimization could generate invalidly
77      structured code when the inlined function had early returns.
78    #697: Optimizer's Instruction::ForEachInId method was skipping semantics-id
79      and scope-id.
80    #755: Inliner: Fix inlining of callee with single Return appearing before
81      the end of the function.
82    #776: Fix dead branch elimination in presence of complex but dead control
83      flow.
84    #781: SPV_KHR_variable_pointers allows duplicate pointer types
85    #782: Inliner: Fix remapping of non-label forward references in callee
86    #787: Inliner: Fix remapping of inlined entry block when called from
87      single block loop.
88    #790: Inliner: Fix remapping of inlined entry block when callee has
89      multiple returns.
90
91 v2016.6 2016-12-13
92  - Published the C++ interface for assembling, disassembling, validation, and
93    optimization.
94  - Support SPV_KHR_shader_draw_parameters in assembler, disassembler, parser.
95  - Validator:
96    - Add validator API accepting raw binary words
97    - Increased coverage:
98      - Checks "Data rules" in Universal Validation Rules, section 2.16.1
99      - WIP: Universal Limits.
100        - The minimum mandated upper bounds are checked.
101        - TODO: Parameterize the validator to allow larger limits accepted by
102          a more than minimally capable implementation.
103    - OpSampledImage checks
104    - OpConstantComposite checks
105    - Id bound check
106  - Disasssembler:
107    - Generates friendly GLSL-based names for more builtin variables
108    - Generates friendly names for numeric OpConstant values
109    - Vendor tool info extracted from SPIR-V XML registry file.
110  - Fixes issues:
111    #429: Validator: Allow OpTypeForwardPointer and OpTypeStruct to reference
112      undefined IDs
113    #482: Validator: OpVariable initializer can be an ID of a module-scope variable
114
115 v2016.5 2016-09-16
116  - Support SPV_KHR_shader_ballot in assembler, disassembler, parser.
117  - Disassembler: Generate friendly names for built-in variables.
118  - Partial fixes:
119    #359: Add Emacs helper for automatically diassembling/assembling a SPIR-V
120      binary on file load/save.
121  - Fixes:
122    #414: Validator: Allow OpUndef for composite constants
123    #415: Validator: Phi can use its own value in some cases.
124
125 v2016.4 2016-09-01
126  - Relicensed under Apache 2.0
127  - Add optimization passes (in API and spirv-opt command)
128    - Fold spec constants defined with OpSpecConstantOp and
129        OpSpecConstantComposite to normal constants with fixed value(s).
130  - Fixes issues:
131    #318: Relicensed under Apache 2.0
132
133 v2016.3 2016-08-24
134  - Add target environment enums for OpenCL 2.1, OpenCL 2.2,
135    OpenGL 4.0, OpenGL 4.1, OpenGL 4.2, OpenGL 4.3, OpenGL 4.5.
136  - Add spirv-cfg, an experimental tool to dump the control flow graph
137    as a GraphiViz "dot" graph
138  - Add optimization pass: Eliminate dead constants.
139  - Add spirv-lesspipe.sh filter utility
140  - Fixes issues:
141    #288: Check def-use dominance rules for OpPhi (variable,parent) operands
142    #339: Allow OpUndef in types-constants-global-vars section, as required
143      by SPIR-V 1.0 Rev7, 1.1 Rev 3.
144    #340: Avoid race on mkdir during build
145    #365: Relax PointSize, ClipDistance, CullDistance capability check in all
146      environments not just Vulkan 1.0.
147
148 v2016.2 2016-08-05
149  - Validator is incomplete
150    - Checks ID use block is dominated by definition block
151  - Add optimization passes (in API and spirv-opt command)
152    - Strip debug info instructions
153    - Freeze spec constant to their default values
154  - Allow INotEqual as operation for OpSpecConstantOp
155  - Fixes bugs:
156    #270: validator: crash when continue construct is unreachable
157    #279: validator: infinite loop when analyzing some degenerate control
158      flow graphs
159    #286: validator: don't incorrectly generate def-use error for
160          (variable,parent) parameters to OpPhi
161    #290: disassembler: never generate bare % for an identifier
162    #295: validator: def-use dominance check should ignore unreachable uses
163    #276: validator: allow unreachable continue constructs
164    #297: validator: allow an unreachable block to branch to a reachable
165          merge block
166
167 v2016.1 2016-07-19
168  - Fix https://github.com/KhronosGroup/SPIRV-Tools/issues/261
169    Turn off ClipDistance and CullDistance capability checks for Vulkan.
170  - The disassembler can emit friendly names based on debug info (OpName
171    instructions), and will infer somewhat friendly names for most types.
172    This is turned on by default for the spirv-dis command line tool.
173  - Updated to support SPIR-V 1.1 rev 2
174    - Input StorageClass, Sampled1D capability, and SampledBuffer capability
175      do not require Shader capability anymore.
176
177 v2016.0 2016-07-04
178
179  - Adds v<year>.<index> versioning, with "-dev" indicating
180    work in progress.  The intent is to more easly report
181    and summarize functionality when SPIRV-Tools is incorporated
182    in downstream projects.
183
184  - Summary of functionality (See the README.md for more):
185    - Supports SPIR-V 1.1 Rev 1
186    - Supports SPIR-V 1.0 Rev 5
187    - Supports GLSL std450 extended instructions 1.0 Rev 3
188    - Supports OpenCL extended instructions 1.0 Rev 2
189    - Assembler, disassembler are complete
190      - Supports floating point widths of 16, 32, 64 bits
191      - Supports integer widths up to 64 bits
192    - Validator is incomplete
193      - Checks capability requirements in most cases
194      - Checks module layout constraints
195      - Checks ID use-definition ordering constraints,
196        ignoring control flow
197      - Checks some control flow graph rules
198    - Optimizer is introduced, with few available transforms.
199    - Supported on Linux, OSX, Android, Windows
200
201  - Fixes bugs:
202    - #143: OpenCL pow and pown arguments