Commit Graph

2519 Commits

Author SHA1 Message Date
John Kessenich
eb2c0c72bf 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
2018-01-09 18:00:33 -07:00
John Kessenich
9c6f8cc29b 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
2018-01-08 15:59:29 -07:00
John Kessenich
c043aadd25 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
2018-01-08 11:52:23 -07:00
John Kessenich
adc33b23cc Non-functional: Fix HLSL error message, and code formatting. 2018-01-08 11:47:08 -07:00
John Kessenich
99892d5a9a
Merge pull request #1211 from greg-lunarg/kg7
Update known good spirv-tools. Fixes issue #1205.
2018-01-05 12:01:03 -07:00
GregF
ead4bb190f Update known good spirv-tools. Fixes issue #1205. 2018-01-05 11:17:34 -07:00
John Kessenich
798d005ccd Build: Tickle bots to try again... seems like a process hang; all tests passed. 2018-01-02 13:07:14 -07:00
John Kessenich
132cf53737 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.
2018-01-02 11:27:54 -07:00
John Kessenich
fd1e8a78a8 HLSL: Fix 1201: Accept 'layout' as an identifier. 2017-12-29 20:59:13 -07:00
John Kessenich
046bae0bab HLSL: Attributes: Add [[vk::constant_id()]] and [[vk::push_constant]] 2017-12-23 17:29:45 -07:00
John Kessenich
e08ed0ccf4
Merge pull request #1190 from jfmarquis/hlsl-store-type-propagation
HLSL: Fix possibly incorrect type conversion in Store2-3-4
2017-12-21 14:59:34 -07:00
John Kessenich
848a0ccbfd Merge branch 'greg-lunarg-flatten1' 2017-12-21 12:26:27 -07:00
John Kessenich
8a3f7a12d4 Merge branch 'flatten1' of https://github.com/greg-lunarg/glslang into greg-lunarg-flatten1 2017-12-21 12:25:52 -07:00
John Kessenich
b3cff2f297 HLSL Tests: Remove optimization from tests that don't need it.
This is to create more stable test results.
2017-12-21 12:17:25 -07:00
GregF
e0639287df HLSL Legalization: Add scalar replacement
This allow for propagation through structs with dynamically indexed
arrays. This supports recent removal of non-io struct flattening.
2017-12-21 11:30:13 -07:00
Jean-François Marquis
3f0aff8ee5 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.
2017-12-21 12:11:40 -05:00
John Kessenich
3b2dc1a756
Merge pull request #1195 from LoopDawg/gcc-bug-workaround
compile error fix for g++ 5.4.0
2017-12-20 15:37:22 -07:00
LoopDawg
c074f2bc24 g++ 5.4.0 suspected defect workaround
Fix compilation error under g++ 5.4.0.
2017-12-20 11:21:05 -07:00
John Kessenich
3f0d4bcd6a SPV: Document history of the generator version number. 2017-12-16 23:46:37 -07:00
John Kessenich
e1ff231235 GLSL: Fix #1193: no 'location' on uniform/buffer block. 2017-12-16 10:07:22 -07:00
John Kessenich
a0d60f2bea gcc: potentially a compiler-bug work around 2017-12-16 02:58:10 -07:00
John Kessenich
2505057af8 SPV: Memory model: Reduce set of memory-semantic bits requested for "all". 2017-12-16 00:34:08 -07:00
John Kessenich
838d7afc61 SPV: HLSL: Move to correct HLSL barrier semantics, per Khronos recommendation. 2017-12-16 00:34:08 -07:00
John Kessenich
c72e5937dd SPV: Bump the generator number to account for barrier changes. 2017-12-16 00:34:08 -07:00
John Kessenich
8297936dd6 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.
2017-12-16 00:30:10 -07:00
John Kessenich
070aaeafcd HLSL: Fix #1192: when bool operands are converted to ints, convert result type. 2017-12-15 21:46:09 -07:00
John Kessenich
35682b5926
Merge pull request #1191 from greg-lunarg/kg6
Update spirv-tools known-good.
2017-12-15 19:25:35 -07:00
GregF
72deeb25fe Update spirv-tools known-good. 2017-12-15 11:29:43 -07:00
John Kessenich
788fbeb36f HLSL: Make attributes for built-in override semantics.
Fixes #1188.
2017-12-15 08:15:26 -07:00
John Kessenich
a67d0706da
Merge pull request #1189 from KhronosGroup/spv-xfb
SPV: Implement XFB
2017-12-15 07:19:05 -07:00
John Kessenich
edaf556778 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.
2017-12-15 06:25:14 -07:00
John Kessenich
be3842f6ae GLSL: Implement XFB for redeclared built-in blocks. 2017-12-15 04:43:59 -07:00
John Kessenich
04f4566f28
Merge pull request #1184 from KhronosGroup/SPV_EXT_fragment_fully_covered
Add implementation of SPV_EXT_fragment_fully_covered
2017-12-14 21:29:46 -07:00
Piers Daniell
1c5443c693 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.
2017-12-14 07:42:23 -07:00
John Kessenich
e9e0cb60ec Update to latest public headers. 2017-12-14 03:00:44 -07:00
John Kessenich
396de16cfb
Merge pull request #1183 from LoopDawg/builtin-output-array-indirect
HLSL: for split output structs, propagate indirection to builtins.
2017-12-14 01:39:25 -07:00
John Kessenich
69feabc913
Merge pull request #1186 from zeux/master
HLSL: Implement support for RT/Viewport output from VS
2017-12-14 00:39:41 -07:00
Arseny Kapoulkine
c92860e288 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).
2017-12-13 16:08:20 -08:00
LoopDawg
0cff51004d 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
2017-12-12 16:22:48 -07:00
John Kessenich
e078059d06
Merge pull request #1174 from LoopDawg/y-flip
HLSL: add optional position.Y inversion
2017-12-12 09:16:01 -07:00
John Kessenich
8116cfc9bf HLSL: Give error on unsupported buffer initializer. 2017-12-09 04:42:42 -07:00
John Kessenich
87982be1a0 HLSL: Remove unintended/untested functionality PrimitiveID.
This was listed as outputs for tessellation stages, but they
are input only.
2017-12-08 19:41:05 -07:00
John Kessenich
67fca7c4ce
Merge pull request #1178 from LoopDawg/primitiveid-hs-input
HLSL: Allow primitive id on hull shader input
2017-12-08 19:35:17 -07:00
John Kessenich
1cfc0f9e8b
Merge pull request #1175 from KhronosGroup/no-flatten-local-opaque
HLSL: Stop flattening non-IO structs containing opaques.
2017-12-08 18:46:34 -07:00
LoopDawg
280c75ca51 HLSL: Allow primitive id on hull shader inputs
Fixes #979
2017-12-08 12:01:16 -07:00
John Kessenich
dc005fb083 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.
2017-12-08 04:30:29 -07:00
LoopDawg
b22c069f7a 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
2017-12-07 10:48:14 -07:00
John Kessenich
471bfed062 HLSL: Fix #606: make layout() override register. 2017-12-06 08:17:21 -07:00
John Kessenich
cc951f8183 HLSL: Fix #1154: Support PointSize, as an attribute. 2017-12-06 07:33:36 -07:00
John Kessenich
b0159f8565
Merge pull request #1151 from cgmb/update-readme
Improve build instructions
2017-12-05 04:26:04 -07:00