Rex Xu [Thu, 8 Mar 2018 14:17:04 +0000 (22:17 +0800)]
Allow --hlsl-enable-16bit-types to be used without AMD_EXTENSIONS
John Kessenich [Wed, 7 Mar 2018 21:31:57 +0000 (14:31 -0700)]
Merge pull request #1269 from bkaradzic/master
Fixed GCC+Clang errors and warnings on Linux and OSX.
John Kessenich [Wed, 7 Mar 2018 21:30:40 +0000 (14:30 -0700)]
Merge branch 'amdrexu-feature'
John Kessenich [Wed, 7 Mar 2018 21:29:09 +0000 (14:29 -0700)]
Merge branch 'feature' of https://github.com/amdrexu/glslang into amdrexu-feature
John Kessenich [Wed, 7 Mar 2018 21:26:08 +0000 (14:26 -0700)]
Merge branch 'amdrexu-bugfix'
John Kessenich [Wed, 7 Mar 2018 21:25:14 +0000 (14:25 -0700)]
Merge branch 'bugfix' of https://github.com/amdrexu/glslang into amdrexu-bugfix
John Kessenich [Wed, 7 Mar 2018 21:20:42 +0000 (14:20 -0700)]
Merge branch 'sheredom-fixup_sm_60_wording'
John Kessenich [Wed, 7 Mar 2018 21:20:11 +0000 (14:20 -0700)]
Merge branch 'fixup_sm_60_wording' of https://github.com/sheredom/glslang into sheredom-fixup_sm_60_wording
John Kessenich [Wed, 7 Mar 2018 18:24:50 +0000 (11:24 -0700)]
Revert the commits that change OpArrayLength type and bumped the version number.
Now, version 5.* is all connected to making the uint type, which doesn't quite work.
Generator versions 4 and 6 do not do this.
Neil Henning [Wed, 7 Mar 2018 17:04:20 +0000 (17:04 +0000)]
WaveReadLaneFirst is the correct wording (was using WaveReadFirstLane previously...).
John Kessenich [Wed, 7 Mar 2018 16:26:43 +0000 (09:26 -0700)]
Merge pull request #1277 from KhronosGroup/Vulkan_1_1
SPV: Implement Vulkan 1.1 features and extensions.
Rex Xu [Wed, 7 Mar 2018 09:22:41 +0000 (17:22 +0800)]
Add more error checks for swizzleInvocations{Masked}AMD()
Rex Xu [Wed, 7 Mar 2018 05:10:01 +0000 (13:10 +0800)]
HLSL: Map min types to GLSL 16-bit types
Branimir Karadžić [Wed, 7 Mar 2018 04:11:46 +0000 (20:11 -0800)]
Fixed ifdef.
John Kessenich [Tue, 6 Mar 2018 23:12:04 +0000 (16:12 -0700)]
SPV: Implement Vulkan 1.1 features and extensions.
John Kessenich [Tue, 6 Mar 2018 21:48:46 +0000 (14:48 -0700)]
Revert "Merge pull request #1274 from greg-lunarg/legal2"
This reverts commit
2c65069ecdbc41dc16580ff58d9d99a2e80ac9ce, reversing
changes made to
fa9b465b92b7e043623ef24d9002aacb32fab0d8.
John Kessenich [Tue, 6 Mar 2018 21:20:16 +0000 (14:20 -0700)]
Build: Fix build issues with previous commit.
John Kessenich [Tue, 6 Mar 2018 20:17:04 +0000 (13:17 -0700)]
Merge pull request #1274 from greg-lunarg/legal2
Legalization: Omit legalization warning when spirv-opt is linked.
John Kessenich [Tue, 6 Mar 2018 20:08:19 +0000 (13:08 -0700)]
Versioning: Bump to minor version 1, for new SPIRV-Tools update.
GregF [Mon, 5 Mar 2018 21:34:15 +0000 (14:34 -0700)]
Legalization: Omit legalization warning when spirv-opt is linked.
John Kessenich [Tue, 6 Mar 2018 18:12:04 +0000 (11:12 -0700)]
Merge pull request #1263 from greg-lunarg/kg12
Update spirv-tools known_good
John Kessenich [Tue, 6 Mar 2018 08:02:13 +0000 (01:02 -0700)]
Merge pull request #1272 from amdrexu/bugfix
Add more error checks for interpolateAtVertexAMD()
Rex Xu [Tue, 6 Mar 2018 07:01:40 +0000 (15:01 +0800)]
Add more error checks for interpolateAtVertexAMD()
John Kessenich [Tue, 6 Mar 2018 05:23:17 +0000 (22:23 -0700)]
Versioning: Address #1255: Move to semantic versioning.
Still missing is automation and final decisions on mechanisms in general.
Branimir Karadžić [Sat, 3 Mar 2018 21:04:12 +0000 (13:04 -0800)]
Fixed GCC+Clang errors and warnings on Linux and OSX.
John Kessenich [Sat, 3 Mar 2018 18:53:41 +0000 (11:53 -0700)]
Merge branch 'amdrexu-bugfix'
John Kessenich [Sat, 3 Mar 2018 18:52:58 +0000 (11:52 -0700)]
Merge branch 'bugfix' of https://github.com/amdrexu/glslang into amdrexu-bugfix
John Kessenich [Sat, 3 Mar 2018 18:47:07 +0000 (11:47 -0700)]
SPV: Bump up the generator number.
Rex Xu [Fri, 2 Mar 2018 09:09:23 +0000 (17:09 +0800)]
SPV: The result type of OpArrayLength should be UINT
John Kessenich [Sat, 3 Mar 2018 01:17:42 +0000 (18:17 -0700)]
Non-functional: Make the vulkan version number meaning be only 0 or not 0.
John Kessenich [Fri, 2 Mar 2018 19:36:02 +0000 (12:36 -0700)]
Non-functional: Move to latest headers.
John Kessenich [Fri, 2 Mar 2018 18:23:15 +0000 (11:23 -0700)]
Merge pull request #1266 from amdrexu/feature
Implement the extension GL_AMD_gpu_shader_half_float_fetch
John Kessenich [Fri, 2 Mar 2018 16:41:22 +0000 (09:41 -0700)]
Merge pull request #1268 from amdrexu/bugfix2
Fix issues of SPIRV headers
Rex Xu [Fri, 2 Mar 2018 09:42:37 +0000 (17:42 +0800)]
Fix issues of SPIRV headers
Rex Xu [Tue, 29 Nov 2016 09:36:31 +0000 (17:36 +0800)]
Implement the extension GL_AMD_gpu_shader_half_float_fetch
- Support new opaque types: f16sampler*, f16image*, f16subpassInput*.
- Add new built-in GLSL texture/image functions.
John Kessenich [Fri, 2 Mar 2018 08:09:28 +0000 (01:09 -0700)]
Fix typo.
John Kessenich [Wed, 28 Feb 2018 23:12:37 +0000 (16:12 -0700)]
Merge pull request #1264 from dneto0/typo-client-version
Fix typo in help for -V<bad-number>
John Kessenich [Wed, 28 Feb 2018 23:11:43 +0000 (16:11 -0700)]
Merge pull request #1265 from davidhubbard/master
EShLangFragment falls through to EShLangCompute, only #ifndef AMD_EXTENSIONS.
davidhubbard [Wed, 28 Feb 2018 17:29:04 +0000 (11:29 -0600)]
TBuiltIns::identifyBuiltIns: EShLangFragment fallthrough
EShLangFragment falls through to EShLangCompute, only #ifndef AMD_EXTENSIONS.
This is probably a bug.
David Neto [Wed, 28 Feb 2018 02:55:23 +0000 (21:55 -0500)]
Fix typo in help for -V<bad-number>
John Kessenich [Tue, 27 Feb 2018 20:23:08 +0000 (13:23 -0700)]
IO mapper: Fix #1261: Supply location mapper with size computer.
This factored computeTypeLocationSize() out of needing the TIntermediate contents,
and uses it to show how to know how many locations an object needs.
However, it still does not do cross stage, or mixed location/no-location
analysis.
GregF [Tue, 27 Feb 2018 18:26:21 +0000 (11:26 -0700)]
Update spirv-tools known_good
Contains the following improvements:
Fixes 1341: Atomics (and other instructions with side-effects) removed.
Add folding for redundant add/sub/mul/div/mix operations
Add constant folding rules for floating-point comparison
Add folding of redundant OpSelect insns
Add folding of OpCompositeExtract and OpConstantComposite
John Kessenich [Tue, 27 Feb 2018 07:48:17 +0000 (00:48 -0700)]
HLSL: Fix #1257: layout float1, int1, etc., as scalars.
John Kessenich [Tue, 27 Feb 2018 02:20:05 +0000 (19:20 -0700)]
SPV: Fix #1258: cache constant structs by id, not opcode.
Constants were generally cached by type opcode, but all structures share the
same type opcode (OpTypeStruct), so they need to be cached by type id.
John Kessenich [Fri, 23 Feb 2018 02:36:18 +0000 (19:36 -0700)]
SPV: Complete OpModuleProcessed implementation, enabled by have 1.2 headers.
John Kessenich [Thu, 22 Feb 2018 19:58:29 +0000 (12:58 -0700)]
Merge pull request #1256 from KhronosGroup/require-binding
GLSL/SPV: Fix #1196: Require resources to have layout(binding=X).
John Kessenich [Thu, 22 Feb 2018 01:19:49 +0000 (18:19 -0700)]
GLSL/SPV: Fix #1196: Require resources to have layout(binding=X).
John Kessenich [Thu, 22 Feb 2018 01:42:10 +0000 (18:42 -0700)]
Tests: specExamples.vert is used twice, it needs two different output names.
John Kessenich [Wed, 21 Feb 2018 16:09:01 +0000 (09:09 -0700)]
Merge pull request #1253 from KhronosGroup/hlsl-ternary-select
HLSL: Fix #1249: Always execute both sides of ternary "?:".
John Kessenich [Wed, 21 Feb 2018 04:29:05 +0000 (21:29 -0700)]
HLSL: Fix #1249: Always execute both sides of ternary "?:".
This is semantically required by HLSL, and frequently results in using
OpSelect instead of control flow.
John Kessenich [Tue, 20 Feb 2018 01:28:24 +0000 (18:28 -0700)]
Merge pull request #1250 from LoopDawg/image-fetch-conversion
HLSL: Add conversions for image ops during SPV construction
LoopDawg [Sun, 18 Feb 2018 18:40:01 +0000 (11:40 -0700)]
HLSL: Add conversions for image ops during SPV construction
HLSL allows image and texture types to be templatized on sub-vec4 types,
or even structures. This was mostly handled already during creation of
sampling operations. However, for operator[] which can generate image
loads, this wasn't happening.
It also isn't very easy to do at that point in time, because operator[]
does not know where the results it produces will end up. They may be
an lvalue or an rvalue, and there's a post-process to convert loads to
stores. They may end up in atomic ops.
To bypass that difficulty, GlslangToSpv now looks for this case and
adds the appropriate conversion. LIMITATION: this only works for
cases for which a simple conversion opcode suffices. That is to say,
it will not work if the type is templatized on a struct.
John Kessenich [Thu, 15 Feb 2018 19:22:25 +0000 (12:22 -0700)]
GLSL: Fix #1247. Remove extraneous *= matrix test.
John Kessenich [Thu, 15 Feb 2018 18:18:22 +0000 (11:18 -0700)]
Merge pull request #1246 from amdrexu/bugfix
Fix an issue of interpolateAtVertexAMD().
Rex Xu [Wed, 14 Feb 2018 03:42:34 +0000 (11:42 +0800)]
Fix an issue of interpolateAtVertexAMD().
An error message should be reported if the interpolant is not an input.
John Kessenich [Mon, 12 Feb 2018 05:04:45 +0000 (22:04 -0700)]
Warning for #pragma once. GLSL and HLSL. Addresses #824.
John Kessenich [Sat, 10 Feb 2018 01:17:49 +0000 (18:17 -0700)]
Merge pull request #1244 from dneto0/update-spirv-tools
Update SPIRV-Tools known-good
John Kessenich [Sat, 10 Feb 2018 01:17:24 +0000 (18:17 -0700)]
Merge pull request #1243 from greg-lunarg/kg11
Upgrade update_glslang_sources.py to work with other sites
David Neto [Fri, 9 Feb 2018 18:20:45 +0000 (13:20 -0500)]
Update SPIRV-Tools known-good
One legalization case updated for a renumbered ID
GregF [Thu, 8 Feb 2018 22:56:54 +0000 (15:56 -0700)]
Upgrade update_glslang_sources.py to work with gitlab branch
--site gitlab must be added to command for gitlab capability.
Default is github.
John Kessenich [Thu, 8 Feb 2018 19:13:25 +0000 (12:13 -0700)]
Non-functional: GLSL: Fix #1242; don't pass reference to nullptr.
John Kessenich [Thu, 8 Feb 2018 15:59:05 +0000 (08:59 -0700)]
Merge pull request #1241 from greg-lunarg/kg9
Add DeadInsertElim to legalization and RedundancyElim to -Os.
GregF [Wed, 7 Feb 2018 23:04:42 +0000 (16:04 -0700)]
Add DeadInsertElim to legalization and RedundancyElim to -Os.
John Kessenich [Tue, 6 Feb 2018 16:50:13 +0000 (09:50 -0700)]
Merge pull request #1239 from KhronosGroup/deeper-access-chains
SPV: Create more access chains addressing a few swizzling issues.
John Kessenich [Tue, 6 Feb 2018 16:47:44 +0000 (09:47 -0700)]
Merge pull request #1238 from zeux/pp-string-buffer
Preprocessor: Use std::string instead of std::stringstream
John Kessenich [Tue, 6 Feb 2018 15:06:36 +0000 (08:06 -0700)]
SPV: Bump up generator number, because previous commit changes code gen slightly.
John Kessenich [Mon, 5 Feb 2018 21:44:14 +0000 (14:44 -0700)]
SPV: Create more access chains addressing a few swizzling issues.
- Fixes #1233
- Treats local bools like anything else
- more consistently deals with a dynamic component selection
Arseny Kapoulkine [Tue, 6 Feb 2018 00:07:39 +0000 (16:07 -0800)]
Preprocessor: Use std::string instead of std::stringstream
std::stringstream has a measurable overhead for preprocessing - it
appears that operator<< does a tiny bit of extra work for appending
chars/strings and also can't be inlined in most cases on VS2015;
additionally, std::endl triggers a stream flush which also adds up.
Replacing this with std::string buffer gets the preprocessing time down
from 180ms to 135ms in one case, making it 1.33x faster.
Note that integer-to-string conversion is using std::to_string; in
theory this could be slower than sprintf or manual conversion, but I
haven't found these cases to affect preprocessing time in practice
(std::to_string would always use the short string buffer for
line/version numbers, and the number of calls is not too significant).
John Kessenich [Mon, 5 Feb 2018 21:42:45 +0000 (14:42 -0700)]
Merge pull request #1234 from dneto0/update-spirv
Update SPIRV-Tools known-good
David Neto [Wed, 31 Jan 2018 21:01:55 +0000 (16:01 -0500)]
Update SPIRV-Tools known-good
Update SPIRV-Tools. Relevant functional changes:
- Optimizer enhancements:
- ADCE now removes OpSwitch
- Block merging occurs in more cases
- Optimizer fixes:
- Constant propagation (CCP): support matrix constants
- #1199: Optimizer: Fix CCP: don't propagate spec constants.
- #1203: Optimizer: Fix common uniform elim bug introduced by refactoring.
- #1210: Optimizer: Aggressive dead code elimination: Fix 'break' identification.
- #1212: Optimizer: Aggressive dead code elimination: Was skipping too many instructions.
- #1214: Optimizer: Aggressive dead code elimination: Fix infinite loop.
- #1228: Optimizer: Fix CCP: Handling of varying Phi nodes; was resulting in infinite loop.
- #1245: Optimizer: Dead branch elimination: Avoid a null pointer dereference.
- #1250: Optimizer: Dead branch elimination: Avoid spuriously reporting a change.
- #1262: Support building on VisualStudio 2013 again
Update SPIRV-Headers, with "unified1" directory.
Updated one Glslang legalization test base result due to better block merging.
John Kessenich [Fri, 2 Feb 2018 19:39:47 +0000 (12:39 -0700)]
GLSL: Fix #1229: merge array sizes in parameter declarations.
John Kessenich [Fri, 2 Feb 2018 16:03:44 +0000 (09:03 -0700)]
Merge pull request #1232 from KhronosGroup/control-flow-attributes
Control flow attributes
John Kessenich [Thu, 1 Feb 2018 18:09:21 +0000 (11:09 -0700)]
Error message: Improve error message (will help another party id a bug).
John Kessenich [Wed, 31 Jan 2018 15:23:01 +0000 (08:23 -0700)]
AST: dump attributes along with control flow.
John Kessenich [Wed, 31 Jan 2018 15:11:18 +0000 (08:11 -0700)]
GLSL: Implement GL_EXT_control_flow_attributes.
See https://github.com/KhronosGroup/GLSL/pull/11.
John Kessenich [Tue, 30 Jan 2018 18:01:39 +0000 (11:01 -0700)]
HLSL: Refactor attribute implementation.
- make it sharable with GLSL
- correct the case insensitivity
- remove the map; queries are not needed, all entries need processing
- make it easier to build bottom up (will help GLSL parsing)
- support semantic checking and reporting
- allow front-end dependent semantics and attribute name mapping
John Kessenich [Thu, 1 Feb 2018 05:15:45 +0000 (22:15 -0700)]
Non-functional: Fix #1231: remove duplicated code.
John Kessenich [Thu, 1 Feb 2018 01:35:56 +0000 (18:35 -0700)]
SPV Version: Emit the requested SPIR-V version, not the header version.
Fixes #1236.
John Kessenich [Thu, 1 Feb 2018 01:06:44 +0000 (18:06 -0700)]
Non-Functional: Use OpModuleProcessed from the unified header.
John Kessenich [Thu, 1 Feb 2018 00:53:24 +0000 (17:53 -0700)]
EShTargetSpv: Fix #1235, spelling, in a backward compatible way.
John Kessenich [Mon, 29 Jan 2018 23:16:11 +0000 (16:16 -0700)]
SPV: Bump SPIR-V header to the unified1 version (version 1.2).
John Kessenich [Thu, 18 Jan 2018 04:45:25 +0000 (21:45 -0700)]
Non-functional. Fix #1223: expand comments.
John Kessenich [Thu, 18 Jan 2018 03:49:47 +0000 (20:49 -0700)]
Merge pull request #1224 from fjhenigman/unused
Fix unused function warning.
John Kessenich [Wed, 17 Jan 2018 09:02:35 +0000 (02:02 -0700)]
Merge pull request #1221 from dneto0/update-spirv
Update known-good spirv-tools.
Frank Henigman [Tue, 16 Jan 2018 05:18:26 +0000 (00:18 -0500)]
Fix unused function warning.
TGlslangToSpvTraverser::getExtBuiltins is only used when AMD_EXTENSIONS
is defined, so only define it in that case to avoid an unused function
warning.
David Neto [Fri, 12 Jan 2018 16:24:37 +0000 (11:24 -0500)]
Update known-good spirv-tools.
Optimizations used in HLSL legalization now sweep away unused types.
John Kessenich [Thu, 11 Jan 2018 20:26:09 +0000 (13:26 -0700)]
HLSL: Fix #1208: accept both int and uint in asuint() and asint().
John Kessenich [Wed, 10 Jan 2018 10:50:42 +0000 (03:50 -0700)]
HLSL: Protect against 'continue' outside of loops.
John Kessenich [Wed, 10 Jan 2018 05:32:42 +0000 (22:32 -0700)]
HLSL: Fix #1214: check for nesting in loop/switch of break statements.
John Kessenich [Wed, 10 Jan 2018 04:35:44 +0000 (21:35 -0700)]
HLSL: Fix #1215: propagate error on seeing a type name instead of a variable.
John Kessenich [Wed, 10 Jan 2018 00:25:46 +0000 (17:25 -0700)]
GLSL: XFB: more support for built-in block redeclarations with XFB.
- correct inheritence (or not) of the right XFB buffer
- compute implicit stride (fixes #1212)
- semantic check block-member redeclarations
- inherit stride from a member
John Kessenich [Mon, 8 Jan 2018 22:59:29 +0000 (15:59 -0700)]
Scanner: Many int16 and float16 fixes, including performance.
- fixes #1209, addresses most of #1187
- only query feature availability on seeing the feature
(was doing it for every single token)
- correct case-sensitive checks for multi-character suffixes
John Kessenich [Mon, 8 Jan 2018 18:48:50 +0000 (11:48 -0700)]
Scanner: Many int64 fixes, including performance.
- partially addresses #1209 and #1187
- only query 64-bit extension on seeing use of a 64-bit literal
(was doing it for every single token)
- correct HLSL acceptance of 64-bit literal syntax (still an int though)
- error on overflow of 32-bit literal type
John Kessenich [Mon, 8 Jan 2018 18:41:59 +0000 (11:41 -0700)]
Non-functional: Fix HLSL error message, and code formatting.
John Kessenich [Fri, 5 Jan 2018 19:01:03 +0000 (12:01 -0700)]
Merge pull request #1211 from greg-lunarg/kg7
Update known good spirv-tools. Fixes issue #1205.
GregF [Fri, 5 Jan 2018 18:17:34 +0000 (11:17 -0700)]
Update known good spirv-tools. Fixes issue #1205.
John Kessenich [Tue, 2 Jan 2018 20:07:14 +0000 (13:07 -0700)]
Build: Tickle bots to try again... seems like a process hang; all tests passed.
John Kessenich [Tue, 2 Jan 2018 18:27:54 +0000 (11:27 -0700)]
HLSL: Fix #1203: Declare anonymous members for cbuffer with no ';'
The grammar for no semicolon and no object name for cbuffer/tbuffer
was correct, but the production still skipped the anonymous declarations
if an identifier followed.
John Kessenich [Sat, 30 Dec 2017 03:59:13 +0000 (20:59 -0700)]
HLSL: Fix 1201: Accept 'layout' as an identifier.
John Kessenich [Sun, 24 Dec 2017 00:29:45 +0000 (17:29 -0700)]
HLSL: Attributes: Add [[vk::constant_id()]] and [[vk::push_constant]]