3365 Commits

Author SHA1 Message Date
John Kessenich
a28f7a75d1 Web: Generalize _EXTENSIONS* in SPIR-V back-end.
About 50 fewer #ifdefs.
About 14K smaller.
Note, the base size is ill-defined due to optimizer settings (size vs. performance),
compression, and target architecture.  Some recent %'s are accidentally reported as
3X the real savings.  Early %'s were accurate.  What matters though is that each
step got worthwhile gains, and what the final size ends up being.
2019-08-20 23:21:55 -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
e66dace97e Web: First pass of tabling the built-in function declarations.
Doing this much saved about 11.5K, including adding all the infrastructure.
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
bfc21ff1a9 Web: Change a bunch of HLSL methods from dynamic to compile-time known.
This saves about 7K.
By changing just a few methods to be compile-time known, a bunch of
scattered code becomes DCE.
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
John Kessenich
13761069b5 Web: Add sanity check test suite for smaller-footprint builds.
For the smallest builds, google tests will not be present, in
addition to a large number of tests not being capable of running.
2019-08-20 23:21:55 -06:00
John Kessenich
34cccdc65d
Merge pull request #1872 from kainino0x/js-interface
make glslang.js easy to use and work on node, and related changes
2019-08-20 23:06:10 -06:00
John Kessenich
3aac2d44b2 Bump revision. 2019-08-20 22:42:40 -06:00
Kai Ninomiya
a761284f70 convert_glsl_to_spirv: fail early, reduce copies, remove input buffer allocation 2019-08-20 13:29:14 -07:00
Kai Ninomiya
b16a4bc45e make glslang.js easy to use 2019-08-20 13:13:42 -07:00
Kai Ninomiya
a91561d583 enable build for node 2019-08-20 13:10:53 -07:00
John Kessenich
95609e6d92 Set theme jekyll-theme-merlot 2019-08-14 21:35:57 -06:00
John Kessenich
37fc4d27d6
Merge pull request #1867 from zoddicus/addWebBuild
Add WASM build target for Web version of glslang
2019-08-10 05:24:48 -06:00
Ryan Harrison
7eb3e6e07a Make non-emscripten flags platform agnostic. 2019-08-09 11:19:07 -04:00
Ryan Harrison
c1063cd5e2 Converted ENABLE_HLSL to a dependent option, so it can be always disabled in web builds 2019-08-09 10:56:51 -04:00
Ryan Harrison
734176a25c Move build instructions to README.md 2019-08-09 10:32:47 -04:00
Ryan Harrison
c96e42dca8 Add WASM build target for Web version of glslang
This adds build rules to support generating a WASM binary to be used
on the web. The API exposed to web applications is definated in the
new glslang.js.cpp file.
2019-08-08 15:08:10 -04:00
John Kessenich
3cea2e5882 Bump revision and give the bots another chance to work. 2019-08-02 06:34:15 -06:00
John Kessenich
a0eb5efd2b
Merge pull request #1860 from zoddicus/fixShaderCRoll
Add in header for uint32_t definition
2019-08-02 01:37:37 -06:00
Ryan Harrison
1f6fedd3b5 Add in header for uint32_t definition
This is needed for stricter/newer MSVC builds of downstream users.
2019-08-01 15:07:18 -04:00
John Kessenich
eea340047e
Merge pull request #1859 from zoddicus/fixNoRTTIForWindows
Convert no RTTI rule to be compiler specific
2019-07-30 20:29:09 -06:00
Ryan Harrison
8126eb1962 Convert no RTTI rule to be compiler specific
MSVC uses a different flag for disabling RTTI, so is currently
including RTTI information and throwing warnings.
2019-07-30 11:25:19 -04:00
John Kessenich
f04f1f93a7
Merge pull request #1857 from Roy-AMD/automapping-opengl-location
Automapping opengl location
2019-07-29 09:40:14 -06:00
John Kessenich
7fc8683491
Merge pull request #1813 from jeffbolznv/compositeconstruct
Handle SPIR-V type mismatch when constructing a composite
2019-07-28 23:20:26 -06:00
John Kessenich
642b6ad99f
Merge pull request #1844 from alelenv/ast_print_fix
Fix bug in printing trailing comma when dumping AST for a structure.
2019-07-28 21:33:30 -06:00
Canon lee
03a93ae153 Fix Clang compiler warning. 2019-07-28 20:53:08 +08:00
Canon lee
c24033afc3 Fix location distribution not in order 2019-07-28 20:13:23 +08:00
Canon lee
1247baa678 Merge branch 'sync' into automapping-opengl-location
Sync code from KhronosGroup/glslang.
2019-07-26 00:47:16 +08:00
John Kessenich
42f813401b
Merge pull request #1853 from s-perron/per
Remove execute permission from LICENSE.txt
2019-07-25 09:03:00 -06:00
Steven Perron
208cb5801f Remove execute permission from LICENSE.txt 2019-07-25 09:57:06 -04:00
Roy
8a5824f5bf Fix memory init issue, to make sure the class members are init in order. 2019-07-25 10:52:10 +08:00
John Kessenich
302fe97e7b Revert "Merge pull request #1792 from Roy-AMD/automapping-opengl-location"
This reverts commit 50ada66c2717fb579979d54ac723475de2b1a5c4, reversing
changes made to 3464b6f519be1500faa60698918f13f4dd796dd0.
2019-07-23 04:10:36 -06:00
John Kessenich
50ada66c27
Merge pull request #1792 from Roy-AMD/automapping-opengl-location
Automapping opengl location
2019-07-23 02:18:18 -06:00
John Kessenich
3464b6f519
Merge pull request #1847 from alelenv/member_remap_fix
Fix missing decoration and bug in member remap
2019-07-22 23:55:54 -06:00
Ashwin Lele
c1e61d6cff Fix bugs in missing Builtin decoration for some NV builtins for tessellation
control shaders.
Fix bug in member remapping.
2019-07-22 12:36:38 -07:00
John Kessenich
2bb2da9193 SPV: Update to latest SPIR-V header. 2019-07-22 07:06:50 -06:00
John Kessenich
333d1c9579
Merge pull request #1845 from greg-lunarg/kg105
Update spirv-tools and spirv-headers known good.
2019-07-22 06:30:59 -06:00
Greg Fischer
38317065f6 Update spirv-tools and spirv-headers known good.
Previous known-good contained regression per sperron at Google.
2019-07-18 13:53:09 -06:00
John Kessenich
9f2236e58e Build: shut up warning to add unnecessary parens. 2019-07-17 19:15:47 -06:00
Ashwin Lele
a76d1c211b Fix bug in printing trailing comma when dumping AST for a structure. 2019-07-17 14:40:58 -07:00
John Kessenich
74426f7570
Merge pull request #1841 from jmacnak-nv/jmacnak-raytracing-descriptor-indexing-validation
Update known good SPIRV-Tools commit
2019-07-17 03:13:44 -06:00
Jason Macnak
ea5715ca7f Update known good SPIRV-Tools commit
Update the known good SPIRV-Tools commit to eventually propagate the
commit allowing the ray tracing stages in pass instrumentation to the
vulkan validation layers (validation layers depends on glslang which
depends on spirv-tools).
2019-07-16 09:39:54 -07:00
John Kessenich
e383c5f55d
Merge pull request #1837 from KhronosGroup/fix-NV_compute_shader_derivatives
ESSL: Fix #1823: Conditions for when derivatives are in compute shader.
2019-07-15 19:49:46 -06:00
John Kessenich
c7c52d1c2b
Merge pull request #1839 from sparmarNV/fix-NV_mesh_shader
Fix #1818: Allow unsized view array dimension for non-block perviewNV attributes
2019-07-15 19:48:32 -06:00
Sahil Parmar
f2dcc87c6a Allow unsized view array dimension for non-block perviewNV attributes 2019-07-15 16:14:00 -07:00
John Kessenich
50dc8c350b
Merge pull request #1824 from KhronosGroup/fix-spec-expr-array-check
SPV: Fix #1783: Don't do bounds checking for spec-const-expression size
2019-07-15 10:55:30 -06:00
John Kessenich
361931c6f3
Merge pull request #1836 from amdrexu/bugfix
OpIsHelperInvocationEXT should declare relevant SPV extension and capability
2019-07-15 07:23:16 -06:00
John Kessenich
33081e01d3 ESSL: Fix #1823: Conditions for when derivatives are in compute shader. 2019-07-15 01:20:18 -06:00