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 [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]]
John Kessenich [Thu, 21 Dec 2017 21:59:34 +0000 (14:59 -0700)]
Merge pull request #1190 from jfmarquis/hlsl-store-type-propagation
HLSL: Fix possibly incorrect type conversion in Store2-3-4
John Kessenich [Thu, 21 Dec 2017 19:26:27 +0000 (12:26 -0700)]
Merge branch 'greg-lunarg-flatten1'
John Kessenich [Thu, 21 Dec 2017 19:25:52 +0000 (12:25 -0700)]
Merge branch 'flatten1' of https://github.com/greg-lunarg/glslang into greg-lunarg-flatten1
John Kessenich [Thu, 21 Dec 2017 19:17:25 +0000 (12:17 -0700)]
HLSL Tests: Remove optimization from tests that don't need it.
This is to create more stable test results.
GregF [Thu, 21 Dec 2017 17:55:57 +0000 (10:55 -0700)]
HLSL Legalization: Add scalar replacement
This allow for propagation through structs with dynamically indexed
arrays. This supports recent removal of non-io struct flattening.
Jean-François Marquis [Fri, 15 Dec 2017 17:57:33 +0000 (12:57 -0500)]
HLSL: Fix possibly incorrect type conversion in StoreN and LoadN
Set type to r-value resulting from indexing vector, to prevent
float->uint conversion when source is already uint. Resulting
OpConvertFToU would otherwise fail validation because source is
already uint.
For LoadN, incorrect uint->float->uint can be avoided; fixing
potential truncation of big integer values.
John Kessenich [Wed, 20 Dec 2017 22:37:22 +0000 (15:37 -0700)]
Merge pull request #1195 from LoopDawg/gcc-bug-workaround
compile error fix for g++ 5.4.0
LoopDawg [Wed, 20 Dec 2017 00:53:46 +0000 (17:53 -0700)]
g++ 5.4.0 suspected defect workaround
Fix compilation error under g++ 5.4.0.
John Kessenich [Sun, 17 Dec 2017 06:46:37 +0000 (23:46 -0700)]
SPV: Document history of the generator version number.
John Kessenich [Sat, 16 Dec 2017 17:07:22 +0000 (10:07 -0700)]
GLSL: Fix #1193: no 'location' on uniform/buffer block.
John Kessenich [Sat, 16 Dec 2017 09:58:10 +0000 (02:58 -0700)]
gcc: potentially a compiler-bug work around
John Kessenich [Fri, 15 Dec 2017 15:51:31 +0000 (08:51 -0700)]
SPV: Memory model: Reduce set of memory-semantic bits requested for "all".
John Kessenich [Wed, 13 Dec 2017 05:50:53 +0000 (22:50 -0700)]
SPV: HLSL: Move to correct HLSL barrier semantics, per Khronos recommendation.
John Kessenich [Mon, 11 Dec 2017 15:24:06 +0000 (08:24 -0700)]
SPV: Bump the generator number to account for barrier changes.
John Kessenich [Mon, 11 Dec 2017 11:02:24 +0000 (04:02 -0700)]
SPV: Change barrier emission to conform to Khronos decisions.
The memory model group agreed to these definitions for how
to map GLSL barrier, memoryBarrier, etc. With HLSL following suit.
John Kessenich [Sat, 16 Dec 2017 04:46:09 +0000 (21:46 -0700)]
HLSL: Fix #1192: when bool operands are converted to ints, convert result type.
John Kessenich [Sat, 16 Dec 2017 02:25:35 +0000 (19:25 -0700)]
Merge pull request #1191 from greg-lunarg/kg6
Update spirv-tools known-good.
GregF [Fri, 15 Dec 2017 18:29:43 +0000 (11:29 -0700)]
Update spirv-tools known-good.
John Kessenich [Fri, 15 Dec 2017 15:15:26 +0000 (08:15 -0700)]
HLSL: Make attributes for built-in override semantics.
Fixes #1188.
John Kessenich [Fri, 15 Dec 2017 14:19:05 +0000 (07:19 -0700)]
Merge pull request #1189 from KhronosGroup/spv-xfb
SPV: Implement XFB
John Kessenich [Fri, 15 Dec 2017 13:21:46 +0000 (06:21 -0700)]
SPV: Plumb through XFB buffer and stride information.
Also, only emit this XFB information where the SPIR-V spec says
it should be emitted: essentially, on objects.
This and the previous commit together fix #1185.
John Kessenich [Fri, 15 Dec 2017 11:41:28 +0000 (04:41 -0700)]
GLSL: Implement XFB for redeclared built-in blocks.
John Kessenich [Fri, 15 Dec 2017 04:29:46 +0000 (21:29 -0700)]
Merge pull request #1184 from KhronosGroup/SPV_EXT_fragment_fully_covered
Add implementation of SPV_EXT_fragment_fully_covered
Piers Daniell [Wed, 13 Dec 2017 20:07:22 +0000 (13:07 -0700)]
Add implementation of SPV_EXT_fragment_fully_covered
This implementation uses the GLSL extension
GL_NV_conservative_raster_underestimation to generate the new SPIR-V
FullyCoveredEXT built in.
John Kessenich [Thu, 14 Dec 2017 09:57:28 +0000 (02:57 -0700)]
Update to latest public headers.
John Kessenich [Thu, 14 Dec 2017 08:39:25 +0000 (01:39 -0700)]
Merge pull request #1183 from LoopDawg/builtin-output-array-indirect
HLSL: for split output structs, propagate indirection to builtins.
John Kessenich [Thu, 14 Dec 2017 07:39:41 +0000 (00:39 -0700)]
Merge pull request #1186 from zeux/master
HLSL: Implement support for RT/Viewport output from VS
Arseny Kapoulkine [Thu, 14 Dec 2017 00:08:20 +0000 (16:08 -0800)]
HLSL: Implement support for RT/Viewport output from VS
In DX10/DX11 you can only output RT/Viewport indices from GS; however,
DX11.4/DX12 add support for outputting these from VS as well.
This is supported by Vulkan if the relevant extension is available, and
by MSL and by MSL (which you can cross-compile to via SPIRV-Cross).
LoopDawg [Tue, 12 Dec 2017 23:21:22 +0000 (16:21 -0700)]
HLSL: for split output structs, propagate indirection to builtin.
Some stage (e.g, hull shaders) have arrayed builtin outputs (e.g, position).
When copying from the internal structure to the split form, it is necessary
to propagate that indirection to the actual arrayed outputs. This was not
happening.
Addresses #1181
John Kessenich [Tue, 12 Dec 2017 16:16:01 +0000 (09:16 -0700)]
Merge pull request #1174 from LoopDawg/y-flip
HLSL: add optional position.Y inversion
John Kessenich [Sat, 9 Dec 2017 11:42:42 +0000 (04:42 -0700)]
HLSL: Give error on unsupported buffer initializer.
John Kessenich [Sat, 9 Dec 2017 02:41:05 +0000 (19:41 -0700)]
HLSL: Remove unintended/untested functionality PrimitiveID.
This was listed as outputs for tessellation stages, but they
are input only.
John Kessenich [Sat, 9 Dec 2017 02:35:17 +0000 (19:35 -0700)]
Merge pull request #1178 from LoopDawg/primitiveid-hs-input
HLSL: Allow primitive id on hull shader input
John Kessenich [Sat, 9 Dec 2017 01:46:34 +0000 (18:46 -0700)]
Merge pull request #1175 from KhronosGroup/no-flatten-local-opaque
HLSL: Stop flattening non-IO structs containing opaques.
LoopDawg [Fri, 8 Dec 2017 19:01:16 +0000 (12:01 -0700)]
HLSL: Allow primitive id on hull shader inputs
Fixes #979
John Kessenich [Thu, 16 Nov 2017 23:03:18 +0000 (16:03 -0700)]
HLSL: Stop flattening non-IO structs containing opaques.
This makes struct returns from functions work, but breaks
structs containing arrays, due to limitations in subsequent
transforms in spirv-opt. This is expected to be fixed soon.
LoopDawg [Wed, 6 Dec 2017 23:52:03 +0000 (16:52 -0700)]
HLSL: add optional position.Y inversion
Adds command line options:
--invert-y
--iy
(synonyms) which invert position.Y on vertex shader output. Handles these cases:
* Direct single variable return
* Member of direct returned struct
* Single variable output parameter
* Member of struct output parameter
API:
// Enables position.Y output negation in vertex shader
void TShader::setInvertY(bool invert);
Fixes #1173
John Kessenich [Wed, 6 Dec 2017 15:17:21 +0000 (08:17 -0700)]
HLSL: Fix #606: make layout() override register.
John Kessenich [Wed, 6 Dec 2017 14:33:36 +0000 (07:33 -0700)]
HLSL: Fix #1154: Support PointSize, as an attribute.
John Kessenich [Tue, 5 Dec 2017 11:26:04 +0000 (04:26 -0700)]
Merge pull request #1151 from cgmb/update-readme
Improve build instructions
Cory Bloor [Tue, 5 Dec 2017 07:28:32 +0000 (00:28 -0700)]
Improve build instructions
- Mention that the instructions are written for Bash.
- Quote the CMAKE_INSTALL_PREFIX to handle spaces in $(pwd).
- Remove SSH clone instructions. Instructions on how to clone are for
those unfamiliar with GitHub, so fewer options are better and SSH
requires additional configuration to make work.
- Replace ninja with make, because more people are familiar with it and
we probably don't need to explain how to install it. Fixes #956.
- Remove the section mentioning cygwin, as it's unclear and doesn't
seem necessary.
- Mention minimum language version in the Dependencies section.
- Move `cd $BUILD_DIR` out of the Linux configuration section because
it's needed on both platforms. Add a line about creating the build
directory, too.
John Kessenich [Mon, 4 Dec 2017 09:48:10 +0000 (02:48 -0700)]
HLSL: Fix #1163: treat buffers as references when calling functions.
This continues to prevent writing output buffers (out from a function),
but fixes the problem where the copy-in/out was not getting done.
Making everything work will require knowing both in/out-ness and bufferness,
but these are currently mutually exclusive, because both are storage
qualifiers.
John Kessenich [Sat, 2 Dec 2017 05:16:03 +0000 (22:16 -0700)]
Merge pull request #1171 from greg-lunarg/kg5
Update spirv-tools known-good
John Kessenich [Fri, 1 Dec 2017 08:27:33 +0000 (01:27 -0700)]
Merge pull request #1170 from LoopDawg/matsize-warnings
HLSL: minor: add warning for mat() matrix size truncation
GregF [Fri, 1 Dec 2017 02:36:16 +0000 (19:36 -0700)]
Update spirv-tools known-good
This fixes spirv-tools issue 989 where if-break can be incorrectly
deleted from a loop.
LoopDawg [Wed, 29 Nov 2017 17:00:01 +0000 (10:00 -0700)]
HLSL: minor: add warning for mat() matrix size truncation
Minor change to add a compilation warning on implicit matrix size
truncations.
John Kessenich [Wed, 29 Nov 2017 23:32:46 +0000 (16:32 -0700)]
Add initialization in case it is causing the Apple Clang release failure.
John Kessenich [Wed, 29 Nov 2017 06:47:08 +0000 (23:47 -0700)]
Tests: Trigger more texture tests, and hopefully see build failure go away.
(This is motivated by wanting to retickle the tests.)
John Kessenich [Wed, 29 Nov 2017 02:41:52 +0000 (19:41 -0700)]
Merge pull request #1166 from tafuri/#1165-invalid_Store
#1165 invalid store
John Kessenich [Tue, 28 Nov 2017 23:51:42 +0000 (16:51 -0700)]
Merge pull request #1169 from LoopDawg/cbuffer-identifier
HLSL: allow keyword-identifiers as cbuffer/struct names.
John Kessenich [Tue, 28 Nov 2017 18:06:05 +0000 (11:06 -0700)]
Merge pull request #1167 from LoopDawg/matmul-truncate-mxm
HLSL: add implicit mat*mat truncations
John Kessenich [Tue, 28 Nov 2017 18:04:31 +0000 (11:04 -0700)]
Merge pull request #1168 from greg-lunarg/kg4
Update spirv-tools known-good
LoopDawg [Mon, 27 Nov 2017 21:45:36 +0000 (14:45 -0700)]
HLSL: allow keyword-identifiers as cbuffer/struct names.
Issue #791 was partially fixed by PR #1161 (the mat mul implicit
truncations were its main point), but it still wouldn't compile due to
the use of ConstantBuffer as an identifier. Apparently those fall into
the same class as "float float", where float is both a type and an
identifier.
This allows struct definitions with such keyword-identifiers,
and adds ConstantBuffer to the set. 'cbuffer int' is legal in HLSL,
and 'struct int' appears to only be rejected due to the redefinition
of the 'int' type.
Fixes #791
GregF [Mon, 27 Nov 2017 21:41:55 +0000 (14:41 -0700)]
Update spirv-tools known-good
This includes an enhancement to propagate through nested structs.
LoopDawg [Mon, 27 Nov 2017 16:42:53 +0000 (09:42 -0700)]
HLSL: add implicit mat*mat truncations
Goes with PR #1161, and completes the space for mul() implicit truncations.
Note that the v*v and scalar cases are already handled by existing code.
Sebastian Tafuri [Mon, 27 Nov 2017 15:53:09 +0000 (16:53 +0100)]
Added new test to gtests and updated test data
Sebastian Tafuri [Mon, 27 Nov 2017 15:27:09 +0000 (16:27 +0100)]
Respect the array type in Store operation
John Kessenich [Sat, 25 Nov 2017 02:17:10 +0000 (19:17 -0700)]
Merge pull request #1161 from LoopDawg/matmul-truncate
WIP: HLSL: matrix and vector truncations for m*v, v*m, m*m
LoopDawg [Wed, 22 Nov 2017 17:33:34 +0000 (10:33 -0700)]
HLSL: matrix and vector truncations for m*v, v*m, m*m
HLSL truncates the vector, or one of the two matrix dimensions if there is a
dimensional mismatch in m*v, v*m, or m*m.
This PR adds that ability. Conversion constructors are added as required.
John Kessenich [Tue, 21 Nov 2017 21:32:39 +0000 (14:32 -0700)]
Memory: Mak full explicit destructor functionality, techincally correctly.
Completes a TODO from previous commit.
John Kessenich [Tue, 21 Nov 2017 07:12:31 +0000 (00:12 -0700)]
Memory: Fix #705: don't use pool object after invoking destructor.
John Kessenich [Tue, 21 Nov 2017 00:41:39 +0000 (17:41 -0700)]
Memory: Put pragma tables in the pool.
Fixes #916 (the last change covered by the PR).
3rd list item in #976.
John Kessenich [Mon, 20 Nov 2017 23:32:49 +0000 (16:32 -0700)]
SPV: SampleMask does not depend on SampleRateShading.
Fixes #1158.
Fixes #1159.
John Kessenich [Fri, 17 Nov 2017 05:48:41 +0000 (22:48 -0700)]
Memory: Reference count number of clients, to support multiple independent clients in same process.
Addresses 2nd item in #976.
John Kessenich [Fri, 17 Nov 2017 05:32:20 +0000 (22:32 -0700)]
Usage: clarify meaning of -s; fixes #1135.
John Kessenich [Thu, 16 Nov 2017 22:02:06 +0000 (15:02 -0700)]
Test: Add more legalization tests; those effected by flattening.
John Kessenich [Wed, 15 Nov 2017 22:30:59 +0000 (15:30 -0700)]
Merge pull request #1156 from LoopDawg/snorm-uav
HLSL: Accept unorm and snorm on types
John Kessenich [Wed, 15 Nov 2017 22:30:18 +0000 (15:30 -0700)]
Merge pull request #1157 from LoopDawg/gs-hs-mix
HLSL: ignore geometry attributes on non-GS stages.
LoopDawg [Wed, 15 Nov 2017 18:33:25 +0000 (11:33 -0700)]
HLSL: ignore geometry attributes on non-GS stages.
If a shader includes a mixture of several stages, such as HS and GS,
the non-stage output geometry should be ignored, lest it conflict
with the stage output.
John Kessenich [Wed, 15 Nov 2017 04:26:42 +0000 (21:26 -0700)]
Merge pull request #1147 from KhronosGroup/memory1
Memory fixes, round 1
John Kessenich [Tue, 14 Nov 2017 22:43:24 +0000 (15:43 -0700)]
Merge pull request #1155 from antiagainst/skip-tags
Appveyor: avoid double testing on master commits
John Kessenich [Tue, 14 Nov 2017 22:19:41 +0000 (15:19 -0700)]
Memory: Remove redundant pool popAll(), which is potentially confusing.
LoopDawg [Tue, 14 Nov 2017 21:55:40 +0000 (14:55 -0700)]
HLSL: Accept unorm and snorm on types
This is currently parsed and ignored, save for some minor validation.
Lei Zhang [Tue, 14 Nov 2017 19:36:22 +0000 (14:36 -0500)]
Appveyor: avoid double testing on master commits
LoopDawg [Mon, 13 Nov 2017 22:54:12 +0000 (15:54 -0700)]
Implement OS_DumpMemoryCounters for Linux