Commit Graph

280 Commits

Author SHA1 Message Date
John Kessenich
56364b6b60 Copyright update, mostly to trigger bots again. 2020-03-01 04:51:40 -07:00
Jordan Justen
6ad120eaeb
standalone: Fix --help
Fixes: bd97b6f9 ("Command-line: Give better error messages. From #1829.")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2020-01-28 14:08:12 -08:00
John Kessenich
273d3a5093 SPV/Vulkan: Add support for Vulkan 1.2, which defaults to SPIR-V 1.5. 2020-01-15 00:10:41 -07:00
John Kessenich
6f98892dd1 Fix #1829: Add "--" command-line options for macro def/undef.
This allows OpModuleProcessed logging to be consistent with everything taking
"--" options.
2020-01-08 01:28:45 -07:00
John Kessenich
bd97b6f9f2 Command-line: Give better error messages. From #1829. 2019-12-20 10:33:13 -07:00
John Kessenich
e01c847a70 Merge branch 'dj2-install' 2019-11-22 06:24:38 -07:00
Dan Sinclair
04567eb232 Check for ENABLE_SPVREMAPPER flag in CMakeList files.
There is a flag to disable the SPVRemapper during the GLSLang build.
That flag is check in some, but not all spots so if you try to build
with SPVRemapper disabled you get CMake errors and compile errors.

This CL fixs up the build so building with -DENABLE_SPVREMAPPER=0 will
complete correclty.
2019-11-21 10:33:32 -05:00
Arfrever Frehtes Taifersar Arahesis
bd69a4fb12 Respect CMAKE_INSTALL_LIBDIR in installed CMake files
Fixes #1965
2019-11-18 11:11:55 -08:00
David Neto
8c3d5b4b6c SPIR-V: Aggressively prune unreachable merge, continue target
More aggressively prune unreachable code as follows.
When no control flow edges reach a merge block or continue target:
- delete their contents so that:
  - a merge block becomes OpLabel, then OpUnreachable
  - a continue target becomes OpLabel, then an OpBranch back to the
    loop header
- any basic block which is dominated by such a merge block or continue
  target is removed as well.
- decorations targeting the removed instructions are removed.

Enables the SPIR-V builder post-processing step the GLSLANG_WEB case.
2019-10-29 15:33:54 -04:00
David Dubois
f57feff786 Fix the exports of glslang-default-resource-limits (#1942) 2019-10-21 22:31:44 -06:00
John Kessenich
b03e4fc4e0
Merge pull request #1866 from rumblehhh/master
Export glslang targets on installation
2019-10-15 04:25:20 -06:00
John Kessenich
8317e6c683 SPV: Support SPIR-V 1.5; five extensions no longer need OpExtension.
The generalization to addIncorporatedExtension() also fixed a 1.3
corner case with SPV_KHR_16bit_storage.
2019-09-16 07:14:10 -06:00
John Kessenich
deec1933e9 Web: Turn off includes, independent preprocessing path, fine tune all.
Saved about 21K, size down to 380K of MSVC x86 code.
Fixed one bug that needs to be looked at on the master branch:
The test for needing a Vulkan binding has a bug in it, "!layoutAttachment"
which does not mean "no layoutAttachment", because that is non-zero.
This is why some test and test results changed.
2019-08-20 23:21:56 -06:00
John Kessenich
155d351f86 Web: Remove unused stage functionality, SPIR-V logger, and hex_utils
Saves another 20K.
2019-08-20 23:21:56 -06:00
John Kessenich
b6d3ee5aca Web: Turn off bracket-style attributes, reflection, and IO mapping. 2019-08-20 23:21:55 -06:00
John Kessenich
7015bd658e Web: Remove/rationalize a set of *_EXTENSIONS, using GLSLANG_WEB.
Focus was on the front end (not SPIR-V), minus the grammar.
Reduces #ifdef count by around 320 and makes the web build 270K smaller,
which is about 90% the  target size.

The grammar and scanner will be another step, as will the SPIR-V backend.
This makes heavy use of methods #ifdef'd to return false as a global way
of turning off code, relying on C++ DCE to do the rest.
2019-08-20 23:21:55 -06:00
John Kessenich
23d27751e8 Web: Selectively remove a few key features, using #ifndef GLSLANG_WEB
Save about 100K.

N.B.: This is done by eliminating a function call, at a high level,
not by #ifdef'ing a bunch of code.

Also, removed no longer needed *_EXTENSION #ifdef in the code not
needed by GLSLANG_WEB.
2019-08-20 23:21:55 -06:00
John Kessenich
d4ed5158d1 Web: Remove a few additional HLSL constructs with ENABLE_HLSL.
Saves about 3K.
2019-08-20 23:21:55 -06:00
James Rumble
c6f7294ced
Handle install vs build include directories
Fix target_include_directories to appropriately handle build-tree and the install-tree.
2019-08-06 15:29:31 +01:00
James Rumble
ab6d1499e1
Export glslang targets on installation
This allows the targets to be used in other cmake projects. See the following for more details:
https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#creating-packages
https://foonathan.net/blog/2016/07/07/cmake-dependency-handling.html
2019-08-06 14:47:51 +01:00
John Kessenich
e5c394bcba Standalone: Fix #1814: Check that linkage was specified for reflection. 2019-07-02 09:47:42 -06:00
Shahbaz Youssefi
f4edb8f820 Remove __DATE__ and __TIME__ usage
These macros result in a non-deterministic build.  In chromium, these
macros are specifically set to empty, resulting in a compile error.
2019-06-25 13:20:42 -04:00
John Kessenich
605afc7b1b SPV: Add a switch for favoring non-NaN operands in min, max, and clamp. 2019-06-17 23:33:09 -06:00
Christoph Kubisch
412ff6ea6a minor naming cleanup 2019-04-13 22:57:33 +02:00
Christoph Kubisch
55ba3eaf89 introduce new --dump-builtin-symbols command line
add corresponding EShMsgBuiltinSymbolTable
TSymbol::dump functions have option to do "complete" print
bugfix in TType::getCompleteString, structure can be null for block
2019-04-13 22:18:16 +02:00
baldurk
1905069857 Add option to unwrap I/O block aggregates in reflection
* We follow similar rules to uniform block exploding.
2019-02-11 11:53:52 +00:00
baldurk
4513df9175 Reflow for better readability 2019-02-08 10:48:48 +00:00
baldurk
a972e73ad7 Add option to reflect all block members, inactive or active.
* The stages mask is more fine-grained, and each variable or block's mask
  indicates which stages it's active in.
2019-02-04 12:02:59 +00:00
baldurk
657acc0c40 Add option to reflect buffer blocks & variables separately to uniforms
* Also note the uniform indices of atomic counter buffers
2019-02-04 12:02:59 +00:00
baldurk
0af5e3e346 Reflect pipeline outputs as well as inputs, optionally from other stages
* We add an option to reflect inputs from other stages than vertex, if only a
  later subset of the stages is linked into the program.
2019-02-04 12:02:59 +00:00
baldurk
edf8212ab8 Add an option to report array variables with trailing [0] suffix
* This is as expected by ARB_program_interface_query
2019-02-04 11:21:09 +00:00
baldurk
15c37f79a9 Include array index in reflected uniform names more consistently
* This comes from the resolution of issues 4, 5 & 6 in
  ARB_program_interface_query, stating that uniform buffers should have their
  members expanded out as normal and arrays should have elements added.
* If a buffer block has a large array e.g. [10000] we don't want to iterate over
  every array element. Instead we should only expand out the first [0] element,
  then expand as normal from there.
* The array name should still be appended with [0] to indicate that it's an
  array.
2019-02-04 11:21:09 +00:00
baldurk
6d47785825 Add options to control how reflection information is built 2019-02-04 11:21:09 +00:00
BinaryRK
0d5c86644a Switch to relative include path for ResourceLimits 2019-02-02 16:18:49 +02:00
Rémi Verschelde
ebfd91a719 Remove Unix executable permission from text files 2018-12-10 10:49:16 +01:00
John Kessenich
bd1c1831d5 Manually merge ClemensRognerSD-dx9-sampler and resolve conflicts. 2018-12-07 18:38:26 -07:00
John Kessenich
8717a5d39a SPV/Standalone: Support specifying arbitrary versions of SPIR-V. 2018-10-26 10:16:47 -06:00
John Kessenich
086febc448 PP: Fix #155: Don't give error on HLSL PP-only parsing. 2018-10-25 12:43:02 -06:00
John Kessenich
c374030e80
Merge pull request #1523 from sparmarNV/fix-SPV_NV_mesh_shader
Allow redeclaration of builtin interface blocks in mesh shader
2018-10-04 23:46:21 -06:00
Sahil Parmar
035cbbe3d0 Allow redeclaration of builtin interface blocks in mesh shader
Apart from allowing redeclaration of gl_MeshPerVertexNV and gl_MeshPerPrimitiveNV blocks, this change also -
- Resize clip/cull perview distances based on static index use
- Error out use of both single-view and per-view builtins
- Add new gtests with redeclared blocks and edit existing test output
- Fix couple of typos
2018-10-04 16:39:18 -07:00
Neil Roberts
b0f3d794c8 Add an option to set the base uniform location
This will be used to generate uniform locations with --aml
2018-10-02 12:15:22 +02:00
Neil Roberts
16f53474c8 Add a command-line option to override uniform locations 2018-10-02 12:15:22 +02:00
John Kessenich
5ff3c3da3b Interfaces: Remove NV_EXTENSIONS from two more headers.
This also fixes some cpp files that uncover issues when building
with the flags turned off.
2018-09-26 09:38:20 -06:00
Chao Chen
b50c02ef53 Add-support-for-SPV_NVX_raytracing 2018-09-19 13:07:43 -07:00
Chao Chen
3c3669904c Add-support-for-SPV_NV_mesh_shader 2018-09-19 13:07:43 -07:00
John Kessenich
97068d8b30
Merge pull request #1465 from otakuto/remove-execute-permissions
Remove execute permissions
2018-08-31 08:14:47 -07:00
John Kessenich
c340425bb2 SPV: Add option for controling when the SPIRV-Tools validator is used. 2018-08-23 15:29:08 -06:00
John Kessenich
717c80a9de SPV: Isolate SPIRV-tools glue to its own file. 2018-08-23 15:17:10 -06:00
John Kessenich
251901ac8a Fix #1471: Merge shift amounts for different sets: --stb ... --std ... 2018-08-12 22:08:53 -06:00
John Kessenich
ade8bbbf5f Fix #1393: rationalize usage, in the spirit of #1393.
Order is kept about the same.
2018-08-12 21:24:55 -06:00