Commit Graph

1165 Commits

Author SHA1 Message Date
John Kessenich
56368b68ed Merge pull request #198 from AWoloszyn/update-includer
Updated the includer interface to allow relative includes.
2016-03-21 13:23:20 -06:00
John Kessenich
ddb65a46f7 Front-end: Propagate spec-constness up through aggregate constructors. 2016-03-21 12:55:00 -06:00
Andrew Woloszyn
a132af5b78 Updated the includer interface to allow relative includes.
This plumbs both the current file path and the include depth
back up to the includer. This allows the includer to properly
support relative paths.

This also replaces the string copy that was done during include
with a zero-copy method of accomplishing the same thing. This
prevents extra copies of entire files.
2016-03-21 10:19:45 -04:00
John Kessenich
6d2b07dc39 Front-end: propagate specialization-constness through conversions and swizzles. 2016-03-20 18:45:23 -06:00
John Kessenich
a5845766e0 Front-end: Add specialization-constant subtrees for const variables/symbols. 2016-03-20 16:46:00 -06:00
John Kessenich
7cc0e2896e Front-end infrastructure: Encapsulate semantic-level questions/actions about const/temp.
Much about const or temp is mechanical, about actual declaration,
while much is semantic, about something higher level.  This commit
checks every use everywhere, and for the high-level ones, substitutes
an encapsulated version instead.
2016-03-20 00:46:02 -06:00
John Kessenich
952543e757 Front-end infrastructure: simplify and localize creating symbol nodes, reducing replication. 2016-03-19 18:10:22 -06:00
John Kessenich
2cc221ade3 Merge pull request #209 from amdrexu/bugfix
Parser: Type promotion for operator modulus(%) is missing.
2016-03-18 14:42:07 -06:00
Rex Xu
644c21025d Parser: Type promotion for operator modulus(%) is missing. 2016-03-18 16:26:23 +08:00
John Kessenich
b1dece2737 Merge pull request #203 from dneto0/wip-mingw
Support Linux-to-Windows cross compile via MinGW
2016-03-16 14:08:30 -06:00
David Neto
ed5fd5d846 Support compilation via MinGW
Change-Id: Ie52f0b1b2b20948c6f4b3cb5474537d36a5a3385
2016-03-16 15:41:31 -04:00
John Kessenich
2de792c574 Merge pull request #204 from amdrexu/bugfix
SPV: Implement boolean selection for mix().
2016-03-15 09:14:27 -06:00
Rex Xu
d715adc0f2 SPV: Implement boolean selection for mix().
Use OpSelect to implement boolean selection of mix(). FMix is applicable
to linear blending of mix().
2016-03-15 18:19:26 +08:00
John Kessenich
aecd497c96 HLSL: Abstract accepting an identifier. 2016-03-14 10:46:34 -06:00
John Kessenich
078d7f24bd HLSL: Simplify appearances a bit to make easier to read. 2016-03-14 10:02:11 -06:00
John Kessenich
5f934b039a HLSL: Accept basic funtion definitions. (Not yet mapping input/output for entry point.) 2016-03-13 17:58:25 -06:00
John Kessenich
48882ef5a8 HLSL: Get correct set of reserved words. 2016-03-13 12:22:00 -06:00
John Kessenich
d016be19fb HLSL: Hook up constructor expressions through the AST. 2016-03-13 11:24:20 -06:00
John Kessenich
87142c71fb HLSL: Add basic declaration syntax and AST generation. 2016-03-12 21:40:38 -07:00
John Kessenich
e01a9bc8c0 HLSL: Plumb in HLSL parse context and keywords, and most basic HLSL parser and test. 2016-03-12 21:40:08 -07:00
John Kessenich
b3dc3acd59 Refactor TParseContext into 3 level inheritance.
Adds parseVersions.h as the base TParseVersions for versioning,
and splits the remainder between TParseContextBase (sharable across parsers)
and TParseContext (now the GLSL-specific part).
2016-03-12 19:08:55 -07:00
John Kessenich
66e2faf844 Support multiple source languages, adding HLSL as an option. 2016-03-12 18:34:36 -07:00
John Kessenich
4d65ee31a6 Generalize "main" to a settable entry point name. 2016-03-12 18:17:47 -07:00
John Kessenich
6cc7674b6d Merge pull request #199 from dekimir/test-dead-decors
SPV test: Test dead-decoration removal.
2016-03-11 12:34:02 -07:00
Dejan Mircevski
2677d918f1 Test dead-decoration removal. 2016-03-11 12:06:41 -05:00
John Kessenich
5639f3aca5 Merge pull request #195 from Qining/remove-decoration-on-undef-IDs
SPV: Remove decoration of undefined IDs
2016-03-10 09:51:22 -07:00
qining
95aa52737d Change to traditional 'for' loop 2016-03-09 21:40:41 -05:00
John Kessenich
663cbcdcf8 Merge pull request #194 from google/if-macro
Preprocessor: Fix array out of bounds bug in processing if-else-endif macros.
2016-03-09 19:07:41 -07:00
qining
da39733f28 Remove decoration of undefined IDs
Fix issue #185 by removing OpDecorate instructions whose target IDs are
defined in unreachable blocks and thus not dumped in the generated
SPIR-V code.
2016-03-09 19:54:03 -05:00
Lei Zhang
24e4bc99ac Fix array out of bounds bug in processing if-else-endif macros.
If we are not inside an if macro, we cannot simply decrease
elsetracker.

Fixes https://github.com/KhronosGroup/glslang/issues/29.
2016-03-09 15:11:56 -05:00
John Kessenich
f7497e289b SPV: Issue #180: push_constants don't have descriptor sets. 2016-03-08 21:43:14 -07:00
John Kessenich
2107c76a08 Merge pull request #192 from Qining/enable-adding-multiviewport-capability
SPV: Declare MultiViewport capability.
2016-03-07 21:22:54 -07:00
qining
be4f52a484 Run regression tests, update spv.420.geom.out so capability MultiViewport is declared 2016-03-07 23:05:59 -05:00
qining
3d7b89a872 Enable adding capability: MultiViewport
Fix issue #191:
https://github.com/KhronosGroup/glslang/issues/191
2016-03-07 21:32:15 -05:00
John Kessenich
3c5b1e6b31 Merge pull request #168 from amdrexu/feature2
SPV: Add support for memory qualifiers.
2016-03-06 15:45:11 -07:00
John Kessenich
1250c9e1bd Merge pull request #165 from amdrexu/feature
SPV: Support the new OpCode - OpImageSparseRead
2016-03-06 15:43:01 -07:00
John Kessenich
84ecb413ac Infrastructure: Tweak CMake for 31c294cea8, removal of bison. 2016-03-06 15:37:56 -07:00
John Kessenich
31c294cea8 Merge pull request #122 from baldurk/remove-bison-binary
Remove bison binary
2016-03-06 15:14:46 -07:00
John Kessenich
f2d8a5c53f SPV: Use heuristic to avoid geometry multi-streams when possible. 2016-03-03 22:29:11 -07:00
John Kessenich
2ac71dfb78 Merge pull request #187 from amdrexu/bugfix
SPV: Continue to fix the issue of bool -> uint32
2016-03-03 21:59:21 -07:00
John Kessenich
be0fa3c4c0 Merge pull request #188 from bsalomon/master
Fix line endings in Test/100.conf
2016-03-03 21:57:51 -07:00
Brian Salomon
5dc8a76265 Fix line endings in Test/100.conf. 2016-03-03 12:12:07 -05:00
Rex Xu
b4fd8d10f0 SPV: Continue to fix the issue of bool -> uint32
For short-circuit operator (&& and ||), the conversion is missing.
2016-03-03 14:38:51 +08:00
John Kessenich
8e3f4c2d66 Syntax: correct spelling of rgb10_a2ui. 2016-03-01 08:43:17 -07:00
baldurk
395b7dd3f5 Remove custom command for bison, it fails if bison is not found 2016-02-28 09:15:31 +01:00
baldurk
530690e442 Commit bison-generated files from Windows GNU Bison 2.7 2016-02-28 09:15:31 +01:00
baldurk
ac13240328 Add a note to README.md about how to build the bison grammar 2016-02-28 09:12:01 +01:00
baldurk
768fb8b49e Remove bison binaries see issue #103 2016-02-28 09:12:00 +01:00
John Kessenich
32fb11daa9 Merge pull request #173 from amdrexu/bugfix
SPV: Fix an issue caused by bool-to-uint32 conversion.
2016-02-27 21:37:17 -07:00
John Kessenich
52d08596ec Merge pull request #175 from rdb/master
Fix compilation issues with MSVC 2010
2016-02-27 21:29:14 -07:00