Ben Clayton [Mon, 20 Jul 2020 15:26:34 +0000 (16:26 +0100)]
Start glslang 11.0.0
Ben Clayton [Mon, 20 Jul 2020 15:24:30 +0000 (16:24 +0100)]
Finalize glslang 10.15.3847
Ben Clayton [Mon, 20 Jul 2020 15:39:15 +0000 (16:39 +0100)]
build_info: Fix parsing of versions with no flavor
John Kessenich [Sat, 18 Jul 2020 09:30:04 +0000 (16:30 +0700)]
Merge pull request #2351 from ben-clayton/license-checker-cfg
Update license-checker.cfg with simplified rules
Ben Clayton [Fri, 17 Jul 2020 19:06:31 +0000 (20:06 +0100)]
Update license-checker.cfg with simplified rules
`license-checker` has been updated to support `**` wildcards simplifying the ruless, and multiple license configs.
Add a new config for the bison generated files to ensure their licenses don't change.
John Kessenich [Fri, 17 Jul 2020 13:33:14 +0000 (20:33 +0700)]
Merge pull request #2350 from ben-clayton/update-license-checker-rules
Add new rules for update of license-checker
Ben Clayton [Fri, 17 Jul 2020 10:58:54 +0000 (11:58 +0100)]
Add new rules for update of license-checker
`license-checker` will be updated to support `**` based wildcards. As part of this, `license-checker` will now traverse into subdirectories that would previously be excluded when the parent directory is excluded.
This change adds new rules that work with both the old version and new, to ease migration.
John Kessenich [Thu, 16 Jul 2020 07:36:51 +0000 (14:36 +0700)]
Merge pull request #2349 from KhronosGroup/return-precision
GLSL/SPV: Propagaet precision qualifier from function to return value.
John Kessenich [Thu, 16 Jul 2020 05:38:47 +0000 (23:38 -0600)]
GLSL/SPV: Propagaet precision qualifier from function to return value.
When a return value's type has no precision qualification (e.g., the return
expression is formed from a constructor), and the formal function return type
has a precision qualification, back propagate that from the return type to the
type of the return value's expression.
John Kessenich [Thu, 16 Jul 2020 02:45:50 +0000 (09:45 +0700)]
Merge pull request #2347 from ben-clayton/runtests
runtests: Check error codes, set LD_LIBRARY_PATH
Ben Clayton [Tue, 14 Jul 2020 11:56:26 +0000 (12:56 +0100)]
runtests: Check error codes, set LD_LIBRARY_PATH
`glslangValidator` will only return [the codes 0..6](https://github.com/KhronosGroup/glslang/blob/
b481744aea1ecf52ee4591afaa0f5e270b9d1636/StandAlone/StandAlone.cpp#L117-L125). Fail the test if anything else is returned (like due to the exe crashing).
Also set `LD_LIBRARY_PATH` to contain the `lib` directory before calling glslang.
John Kessenich [Tue, 14 Jul 2020 09:11:43 +0000 (16:11 +0700)]
Merge pull request #2335 from ben-clayton/kokoro-bazel-test-output
Kokoro: Print test output to stdout
John Kessenich [Tue, 14 Jul 2020 09:11:04 +0000 (16:11 +0700)]
Merge pull request #2344 from ben-clayton/build_info-x
Give build_info.py the executable bit
Ben Clayton [Tue, 14 Jul 2020 09:09:51 +0000 (10:09 +0100)]
Give build_info.py the executable bit
John Kessenich [Tue, 14 Jul 2020 08:13:22 +0000 (15:13 +0700)]
Merge pull request #2343 from KhronosGroup/fix-non-determinism
Fix recently found non-determinism with gl_WorldToObject3x4EXT.
John Kessenich [Tue, 14 Jul 2020 07:44:35 +0000 (01:44 -0600)]
Fix recently found non-determinism with gl_WorldToObject3x4EXT.
John Kessenich [Tue, 14 Jul 2020 07:12:15 +0000 (14:12 +0700)]
Merge pull request #2339 from ben-clayton/cmake-project
CMake: Move project() to top of CMakeLists.txt
John Kessenich [Tue, 14 Jul 2020 07:07:21 +0000 (14:07 +0700)]
Merge pull request #2341 from ben-clayton/bison-license
Add bison license to LICENSE.txt
John Kessenich [Tue, 14 Jul 2020 06:32:25 +0000 (00:32 -0600)]
Non-determinism: Remove test file that seems to trigger non-determinism.
This problem needs to be fixed, but in parallel, we need to see master
and any other changes to it passing all tests.
The removed test is ray-tracing centric, and may indicate non-determinism
in recent code added for that functionality.
Ben Clayton [Mon, 13 Jul 2020 19:32:09 +0000 (20:32 +0100)]
Add bison license to LICENSE.txt
Ben Clayton [Mon, 13 Jul 2020 18:14:02 +0000 (19:14 +0100)]
CMake: Move project() to top of CMakeLists.txt
Also remove `NOTICE` from message() about PCHs - it seems to print this in the actual message, contrary to the documentation where it is used as a severity.
Ben Clayton [Mon, 13 Jul 2020 09:12:06 +0000 (10:12 +0100)]
Kokoro: Print test output to stdout
John Kessenich [Mon, 13 Jul 2020 10:34:05 +0000 (17:34 +0700)]
Merge pull request #2337 from KhronosGroup/revert-ANGLE
Revert "Merge pull request #2330 from ShabbyX/optimize_for_angle"
John Kessenich [Mon, 13 Jul 2020 09:52:02 +0000 (03:52 -0600)]
Fix comma in licence checker.
John Kessenich [Mon, 13 Jul 2020 09:39:08 +0000 (03:39 -0600)]
Revert "Merge pull request #2330 from ShabbyX/optimize_for_angle"
This reverts commit
1ee5d1c0bb683daea245e8329fd619940a35a5b4, reversing
changes made to
906d48a7e828701e25487c9cf34418ded831c814.
John Kessenich [Mon, 13 Jul 2020 08:52:11 +0000 (02:52 -0600)]
Fix a couple lines that were too long, to retrigger bots.
John Kessenich [Mon, 13 Jul 2020 06:35:58 +0000 (00:35 -0600)]
Fix #2329: don't use invalid initializers.
John Kessenich [Sun, 12 Jul 2020 15:43:35 +0000 (22:43 +0700)]
Merge pull request #2334 from ben-clayton/license-checker-cfg
Add missing comma from license-checker.cfg
Ben Clayton [Sun, 12 Jul 2020 12:07:39 +0000 (13:07 +0100)]
Add missing comma from license-checker.cfg
Fixes license checker presubmit.
John Kessenich [Sun, 12 Jul 2020 10:05:59 +0000 (17:05 +0700)]
Merge pull request #2333 from 1480c1/mingw-w64
Common: include standard headers before doing any defines
Christopher Degawa [Sun, 12 Jul 2020 00:02:20 +0000 (00:02 +0000)]
Common: include standard headers before doing any defines
currently, due to
```c++
\#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || defined MINGW_HAS_SECURE_API
#include <basetsd.h>
#ifndef snprintf
#define snprintf sprintf_s
#endif
#define safe_vsprintf(buf,max,format,args) vsnprintf_s((buf), (max), (max), (format), (args))
```
defining `snprintf` to `sprintf_s` essentially unconditionally, this will break the
stdio.h+cstdio system header for mingw-w64 g++ in msys2 with shaderc
https://github.com/google/shaderc/issues/1065
an alternative change would be
https://raw.githubusercontent.com/shinchiro/mpv-winbuild-cmake/master/packages/glslang-0001-fix-gcc-10.1-error.patch
in which the `|| defined MINGW_HAS_SECURE_API` part is removed
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
John Kessenich [Sat, 11 Jul 2020 17:32:52 +0000 (00:32 +0700)]
Merge pull request #2330 from ShabbyX/optimize_for_angle
Optimize for angle
John Kessenich [Fri, 10 Jul 2020 14:54:37 +0000 (21:54 +0700)]
Merge pull request #2332 from ben-clayton/fix-cmake-include
Fix CMake rules when nesting CMake projects
Ben Clayton [Fri, 10 Jul 2020 13:39:39 +0000 (14:39 +0100)]
Fix CMake rules when nesting CMake projects
`${CMAKE_SOURCE_DIR}` points to the outer project root, not the current directory.
Fixes building of `glslang` when included into another CMake project.
John Kessenich [Fri, 10 Jul 2020 13:00:11 +0000 (07:00 -0600)]
Merge pull request #2331 from ben-clayton/fix-chromium
Attempt to fix chromium builds
Ben Clayton [Fri, 10 Jul 2020 12:46:25 +0000 (13:46 +0100)]
Attempt to fix chromium builds
It would seem that `glslang_sources` has a private dependency on `glslang_build_info`, so `glslang_validator` cannot transitively `#include` the generated `glslang/build_info.h` header.
Add `glslang_build_info` as a direct dependency to `glslang_validator`.
Also remove the duplicate dependency on `glslang_build_info` in `glslang_sources_common`
Note: This is a speculative fix as I can build Chromium fine without these changes.
Not sure what's different between these configs.
John Kessenich [Fri, 10 Jul 2020 11:43:10 +0000 (05:43 -0600)]
Merge pull request #2277 from ben-clayton/build-info
Generate build information from CHANGES.md
Ben Clayton [Wed, 17 Jun 2020 10:17:19 +0000 (11:17 +0100)]
Generate build information from CHANGES.md
This PR significantly reworks the way glslang is versioned.
Instead of committing changes to the `GLSLANG_MINOR_VERSION` define in
`glslang/Public/ShaderLang.h`, and using `make-revision` to generate
`GLSLANG_PATCH_LEVEL` in `glslang/Include/revision.h`, all version
information is now derived from the new `CHANGES.md` file.
`CHANGES.md` acts as the single source of truth for glslang version
information, along with a convenient place to put all release notes for
each notable change made.
`CHANGES.md` is parsed using the new `build_info.py` python script.
This script can read basic template files to produce new source files,
which it does to read the new `build_info.h.tmpl` to generate (at build
time) a glslang private header at
`<build-dir>/include/glslang/build_info.h`.
I've written generators for each of the CMake, Bazel, gn, and
`Android.mk` build scripts.
The new version code conforms to the Semantic Versioning 2.0 spec.
This new version is also used by the CMake rules to produce versioned
shared objects, including a major-versioned SONAME.
New APIs:
---------
* `glslang::GetVersion()` returns a `Version` struct with the version
major, minor, patch and flavor.
Breaking API changes:
---------------------
* The public defines `GLSLANG_MINOR_VERSION` and `GLSLANG_PATCH_LEVEL`
have been entirely removed.
* `glslang/Public/ShaderLang.h` and `glslang/Include/revision.h` have
been deleted.
* Instead, `<build-dir>/include/glslang/build_info.h` is created in
the build directory, and `<build-dir>/include` is a CMake `PUBLIC`
(dependee-inherited) include directory for the glslang targets.
* `<build-dir>/include/glslang/build_info.h` contains the following
new #defines:
`GLSLANG_VERSION_MAJOR`, `GLSLANG_VERSION_MINOR`,
`GLSLANG_VERSION_PATCH`, `GLSLANG_VERSION_FLAVOR`,
`GLSLANG_VERSION_GREATER_THAN(major, minor, patch)`,
`GLSLANG_VERSION_GREATER_OR_EQUAL_TO(major, minor, patch)`,
`GLSLANG_VERSION_LESS_THAN(major, minor, patch)`,
`GLSLANG_VERSION_LESS_OR_EQUAL_TO(major, minor, patch)`
* The CMake install output directory contains a copy of
`build_info.h` at: `include/glslang/build_info.h`
* Python3 is now always required to build glslang (likely always
required for transitive dependency builds).
John Kessenich [Thu, 9 Jul 2020 06:39:31 +0000 (00:39 -0600)]
Merge pull request #2327 from ben-clayton/fix-pch
Use CMake's builtin functionality for pre-compiled headers
Shahbaz Youssefi [Fri, 3 Jul 2020 19:42:53 +0000 (15:42 -0400)]
Customize glslang.y to GLSLANG_ANGLE
glslang.y is specialized to remove what is not supported or won't be
supported by ANGLE.
This change shaves about 125KB off of ANGLE's binary size with minor
improvement to the cost of SetupBuiltinSymbolTable.
Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
Shahbaz Youssefi [Fri, 3 Jul 2020 19:42:53 +0000 (15:42 -0400)]
Use GLSLANG_ANGLE to strip features to what ANGLE requires
This change strips a few features similar to GLSLANG_WEB but doesn't
remove every detail like the latter. It also hardcodes profile/version
to core/450.
In particular, TBuiltIns::initialize is specialized to remove most of
what is not supported or won't be supported by ANGLE. The result of
this function is parsed with TParseContext::parseShaderStrings which is
a performance bottleneck.
This change shaves about 300KB off of ANGLE's binary size and reduces
the cost of SetupBuiltinSymbolTable to nearly a sixth.
Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
John Kessenich [Tue, 7 Jul 2020 17:01:30 +0000 (11:01 -0600)]
Merge pull request #2328 from zoddicus/fixBUILDgn
Make sure glslang_angle has a definition in BUILD.gn
Ryan Harrison [Tue, 7 Jul 2020 15:45:02 +0000 (11:45 -0400)]
Make sure glslang_angle has a definition in BUILD.gn
Set the value to false if the environment doesn't declare this variable.
Ben Clayton [Tue, 7 Jul 2020 12:24:04 +0000 (13:24 +0100)]
Use CMake's builtin functionality for PCHs
`glslang_pch()` did manual mangling of the compiler flags to enable pre-compiled headers.
I couldn't get this approach to work with the `MachineIndependent` subdirectory, but fortunately CMake has added first-class support for precompiled headers in 3.16, which does work with subdirectories.
Moved `glslang_pch()` to the other global function declarations.
`glslang_pch()` is a no-op when using CMake earlier than `3.16`.
CMake's PCH implementation does not need the `pch.cpp` files, so just remove them.
John Kessenich [Tue, 7 Jul 2020 15:12:12 +0000 (09:12 -0600)]
Merge pull request #2326 from ben-clayton/always_pic
Remove GLSLANG_BUILD_PIC flag
John Kessenich [Tue, 7 Jul 2020 10:56:39 +0000 (04:56 -0600)]
Merge pull request #2324 from ben-clayton/gitignore
Add new rules to .gitignore
Ben Clayton [Tue, 7 Jul 2020 10:49:40 +0000 (11:49 +0100)]
Remove GLSLANG_BUILD_PIC flag
On closer inspection, it appears that nearly all the targets use the `POSITION_INDEPENDENT_CODE` target option anyway.
Simplify all this away by always being PIC.
Ben Clayton [Tue, 7 Jul 2020 10:22:33 +0000 (11:22 +0100)]
Add new static targets to VS solution folders
`GenericCodeGen` and `MachineIndependent` were missing from the generated visual studio solutions. Add these.
Ben Clayton [Tue, 7 Jul 2020 10:15:24 +0000 (11:15 +0100)]
Add new rules to .gitignore
`.vscode/` ignores Visual Studio Code user config files
`bazel-*` ignores bazel build system symlinks.
`out/` ignores the default output directory for Visual Studio generated files.
John Kessenich [Mon, 6 Jul 2020 12:07:58 +0000 (06:07 -0600)]
Merge pull request #2322 from ShabbyX/fix-dawn-tests
gn: Fix dawn tests in Chromium
John Kessenich [Mon, 6 Jul 2020 11:36:34 +0000 (05:36 -0600)]
Merge pull request #2314 from marcinslusarz/quiet
Add --quiet option.
Marcin Ślusarz [Fri, 3 Jul 2020 12:55:29 +0000 (14:55 +0200)]
Add --quiet option.
Being quiet should have been the default, but I guess it's too late
now to change it.
Shahbaz Youssefi [Sun, 5 Jul 2020 20:48:34 +0000 (16:48 -0400)]
gn: Fix dawn tests in Chromium
Dawn tests use shaderc, which assumes glslang has HLSL support. This
change makes HLSL support also follow template arguments, and changes
the target names such that glslang_sources will remain the "has all
features" target and the new glslang_lib_sources would be what ANGLE
would use.
Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
John Kessenich [Sun, 5 Jul 2020 16:12:27 +0000 (10:12 -0600)]
Merge pull request #2320 from ShabbyX/fix-gn-check
gn: Fix `gn gen --check` by adding missing dependency
Shahbaz Youssefi [Sun, 5 Jul 2020 10:26:04 +0000 (06:26 -0400)]
gn: Fix `gn gen --check` by adding missing dependency
Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
John Kessenich [Sat, 4 Jul 2020 14:40:19 +0000 (08:40 -0600)]
Merge pull request #2317 from ShabbyX/glslang_angle
gn: Optionally disable optimizations and HLSL
John Kessenich [Sat, 4 Jul 2020 04:37:25 +0000 (22:37 -0600)]
Merge pull request #2319 from ben-clayton/build-pic
Add GLSLANG_BUILD_PIC CMake flag
John Kessenich [Sat, 4 Jul 2020 03:19:42 +0000 (21:19 -0600)]
Merge pull request #2316 from ben-clayton/fix-2315
Don't use add_link_options() on old CMake versions
Ben Clayton [Fri, 3 Jul 2020 21:54:30 +0000 (22:54 +0100)]
Add GLSLANG_BUILD_PIC CMake flag
Enables `-fPIC` compiler flag even when building statically.
This is helpful for statically linking a `glslang` target into a shared library.
Simplifies the workarounds seen in google/shaderc#1093 to a `set(GLSLANG_BUILD_PIC 1)`.
Shahbaz Youssefi [Fri, 3 Jul 2020 16:34:06 +0000 (12:34 -0400)]
gn: Optionally disable optimizations and HLSL
To reduce the binary size of ANGLE, a gn override is added
(glslang_angle) which:
- Controls whether ENABLE_OPT=1 is set
- Customizes the build for the Vulkan backend of ANGLE. As a first
step, this removes HLSL functionality which together with no
optimization shave ~2.5MB off of ANGLE's binary size.
Upcoming changes will add a macro for GLSLANG_ANGLE similar to
GLSLANG_WEB that will strip features from glslang to support only what
ANGLE needs.
Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
Ben Clayton [Fri, 3 Jul 2020 14:41:03 +0000 (15:41 +0100)]
Don't use add_link_options() on old CMake versions
Fixes: #2315
John Kessenich [Fri, 3 Jul 2020 11:24:45 +0000 (05:24 -0600)]
Merge pull request #2311 from ben-clayton/license-checker
Kokoro: Correct the `build_file' path to build.sh
John Kessenich [Fri, 3 Jul 2020 11:23:15 +0000 (05:23 -0600)]
Merge pull request #2312 from ben-clayton/fix-copyright
License headers: s/Google/The Khronos Group
Ben Clayton [Fri, 3 Jul 2020 11:21:01 +0000 (12:21 +0100)]
License headers: s/Google/The Khronos Group
This was a copy-paste screwup, where the first line of the copyright had the company name was updated, but the company name mid way though was not.
Ben Clayton [Fri, 3 Jul 2020 10:07:32 +0000 (11:07 +0100)]
Kokoro: Correct the `build_file' path to build.sh
John Kessenich [Fri, 3 Jul 2020 05:33:30 +0000 (23:33 -0600)]
Merge pull request #2310 from ben-clayton/license-checker
Add license checking continuous and presubmit tests
John Kessenich [Fri, 3 Jul 2020 05:32:01 +0000 (23:32 -0600)]
Merge pull request #2309 from ben-clayton/fix-msvc-linker-warnings
Fix GLSLANG_IS_SHARED_LIBRARY define
Ben Clayton [Thu, 2 Jul 2020 15:05:41 +0000 (16:05 +0100)]
Add config for license-checker and Kokoro scripts.
The `license-checker` is a tool that verifies each file has contains a permitted license header.
See https://github.com/ben-clayton/license-checker for more information.
Ben Clayton [Thu, 2 Jul 2020 14:54:40 +0000 (15:54 +0100)]
Fix GLSLANG_IS_SHARED_LIBRARY define
It was incorrectly always being set, causing linker warnings for MSVC builds.
Also simplify the preprocessor nesting in `glslang\Public\ShaderLang.h`
Ben Clayton [Wed, 1 Jul 2020 14:43:36 +0000 (15:43 +0100)]
Add missing copyright headers
Add copyright headers to build files and scripts.
Simplifies automated scanning for bad license headers.
John Kessenich [Thu, 2 Jul 2020 11:21:45 +0000 (05:21 -0600)]
Merge pull request #2268 from lriki/hlsl-pack_matrix
HLSL: Fix #pragma pack_matrix(row_major) not work on global uniforms
John Kessenich [Thu, 2 Jul 2020 11:02:59 +0000 (05:02 -0600)]
Merge pull request #2303 from ben-clayton/limit-public-2
glslang: Only export public interface for SOs
John Kessenich [Thu, 2 Jul 2020 11:02:17 +0000 (05:02 -0600)]
Bump revision.
John Kessenich [Wed, 1 Jul 2020 15:52:18 +0000 (09:52 -0600)]
Merge pull request #2307 from KhronosGroup/location-validation
Location validation, with update to SPIR-V tools validating location
John Kessenich [Wed, 1 Jul 2020 13:18:57 +0000 (07:18 -0600)]
SPIRV-Tools and tests: Update to location-validation in SPIRV-Tools.
This introduces five new "Validation failures":
- baseResults/hlsl.semantic.vert: issue with gl_ClipDistance/CullDistance
- baseResults/spv.430.vert: issue gl_ClipDistance
- baseResults/spv.450.tesc: still unknown
- baseResults/spv.dataOut.frag: gl_FragData should not be supported, problem with front end
- baseResults/spv.meshShaderPerViewUserDefined.mesh: seems okay, maybe a problem with SPIRV-Tools
John Kessenich [Wed, 1 Jul 2020 12:30:16 +0000 (06:30 -0600)]
Tests: More broadly use automapping binding/location.
This adds or changes binding/location decorations in 100s of shaders.
It also allows more output (spv.register.autoassign.rangetest.frag)
due to allowing ioMap() to fail.
John Kessenich [Wed, 1 Jul 2020 11:38:22 +0000 (05:38 -0600)]
Merge pull request #2306 from ben-clayton/licenses
Add additional licenses in use to LICENSE.txt
Ben Clayton [Wed, 1 Jul 2020 09:48:27 +0000 (10:48 +0100)]
Add additional licenses in use to LICENSE.txt
Ideally we'd unify the licenses in use by changing the licenses in the file headers to BSD-3-clause.
Until then, let's correctly list all the licenses currently in use.
Issue: #2305
John Kessenich [Wed, 1 Jul 2020 06:50:26 +0000 (00:50 -0600)]
HLSL: Catch error cases earlier, preventing a later assert.
Related to https://github.com/KhronosGroup/SPIRV-Cross/issues/1414.
The real problem is either using DX10 semantics for DX9 or missing
functionality in DX10 parsing.
John Kessenich [Tue, 30 Jun 2020 18:41:15 +0000 (12:41 -0600)]
Merge pull request #2302 from KhronosGroup/fix-texture-precision
SPV: RelaxedPrecision: use the result precision for texture sampling.
John Kessenich [Tue, 30 Jun 2020 16:57:16 +0000 (10:57 -0600)]
Merge pull request #2300 from KhronosGroup/generalize-precision
SPV: RelaxedPrecision: Generalize fix #2293 to cover more operations.
Ben Clayton [Mon, 29 Jun 2020 13:20:19 +0000 (14:20 +0100)]
glslang: Only export public interface for SOs
Default to `-fvisibility=hidden`, and annotate the public glslang interface with `GLSLANG_EXPORT` to change the visibility of these cherry-picked symbols to default.
This is also used by Windows builds for `__declspec(dllexport)`-ing the public DLL interface.
This allows us to classify API changes into those that are publicly backwards compatible, and those that are not.
Note that `libSPIRV` will likely need similar treatment.
Issues: #2283, #1484
John Kessenich [Tue, 30 Jun 2020 16:05:37 +0000 (10:05 -0600)]
Merge pull request #2301 from ben-clayton/split-libs
CMake: break up glslang into smaller static libs
Ben Clayton [Mon, 29 Jun 2020 13:18:02 +0000 (14:18 +0100)]
CMake: break up glslang into smaller static libs
Add `GenericCodeGen` and `MachineIndependent` static library targets.
Privately import both of these into the `glslang` target.
Privately import `MachineIndependent` into the `SPIRV` target.
This is done to break the dependency of `libglslang.so` non-public APIs from `libspirv.so`,
which will become problematic once `glslang` hides its non-public symbols.
| File | Before | After |
|---------------------------|-----------:|-----------:|
| `libGenericCodeGen.a` | - | `527716` |
| `libglslang.a` | `
68175944` | `512938` |
| `libHLSL.a` | `1428` | `1428` |
| `libMachineIndependent.a` | - | `
67132202` |
| `libOGLCompiler.a` | `75908` | `75908` |
| `libOSDependent.a` | `23768` | `23768` |
| `libSPIRV.a` | `
15710210` | `
15710210` |
| `libSPVRemapper.a` | `3250894` | `3250894` |
| File | Before | After |
|-----------------------------------------|-----------:|-----------:|
| `libglslang-default-resource-limits.so` | `117032` | `117032` |
| `libglslang.so` | `
22380688` | `
22368216` |
| `libHLSL.so` | `7520` | `7520` |
| `libOGLCompiler.a` | `75908` | `75908` |
| `libOSDependent.a` | `23768` | `23768` |
| `libSPIRV.so` | `7288336` | `
28151016` |
| `libSPVRemapper.so` | `1940208` | `1940208` |
Issues: #2283, #1484
John Kessenich [Tue, 30 Jun 2020 13:55:53 +0000 (07:55 -0600)]
Merge pull request #2297 from ben-clayton/fpic
CMake: Compile with -fPIC when building SOs
John Kessenich [Tue, 30 Jun 2020 13:52:05 +0000 (07:52 -0600)]
SPV: RelaxedPrecision: use the result precision for texture sampling.
Fix #2298.
The AST has two precisions, an operation precision and a result precision.
Actual use of GLSL with mediump samplers wants the result precision, so
pick that up instead of the operation precision.
John Kessenich [Tue, 30 Jun 2020 11:27:14 +0000 (05:27 -0600)]
Merge pull request #2296 from ben-clayton/err-unresolved
CMake: Error on unresolved symbols
John Kessenich [Tue, 30 Jun 2020 07:27:08 +0000 (01:27 -0600)]
SPV: RelaxedPrecision: Generalize fix #2293 to cover more operations.
This simplifies and enforces use of precision in many more places,
to help avoid accidental loss of RelaxedPrecision through intermediate
operations. Known fixes are:
- ?:
- function return values with mis-matched precision
- precision of function return values when a copy was needed to fix types
John Kessenich [Tue, 30 Jun 2020 04:07:40 +0000 (22:07 -0600)]
Merge pull request #2295 from ben-clayton/rm-old-kokoro-cfgs
Remove root kokoro/linux-*-cmake configs
John Kessenich [Tue, 30 Jun 2020 03:54:06 +0000 (21:54 -0600)]
Merge pull request #2292 from proydakov/gcc-unused-parameter
Fixed GCC -Wunused-parameter in hlslParseables.cpp.
Evgeny Proydakov [Wed, 24 Jun 2020 20:56:12 +0000 (23:56 +0300)]
Fixed GCC -Wunused-parameter in hlslParseables.cpp.
Warnings before fix:
[3/7] Building CXX object glslang/CMakeFiles/glslang.dir/HLSL/hlslParseables.cpp.o
../glslang/HLSL/hlslParseables.cpp: In function ‘bool {anonymous}::IsValid(const char*, char, char, char, char, int, int)’:
../glslang/HLSL/hlslParseables.cpp:334:45: warning: unused parameter ‘retOrder’ [-Wunused-parameter]
334 | inline bool IsValid(const char* cname, char retOrder, char retType, char argOrder, char argType, int dim0, int dim1)
| ~~~~~^~~~~~~~
../glslang/HLSL/hlslParseables.cpp:334:60: warning: unused parameter ‘retType’ [-Wunused-parameter]
334 | inline bool IsValid(const char* cname, char retOrder, char retType, char argOrder, char argType, int dim0, int dim1)
| ~~~~~^~~~~~~
../glslang/HLSL/hlslParseables.cpp:334:89: warning: unused parameter ‘argType’ [-Wunused-parameter]
334 | inline bool IsValid(const char* cname, char retOrder, char retType, char argOrder, char argType, int dim0, int dim1)
| ~~~~~^~~~~~~
../glslang/HLSL/hlslParseables.cpp:334:112: warning: unused parameter ‘dim1’ [-Wunused-parameter]
334 | inline bool IsValid(const char* cname, char retOrder, char retType, char argOrder, char argType, int dim0, int dim1)
| ~~~~^~~~
Ben Clayton [Mon, 29 Jun 2020 13:06:35 +0000 (14:06 +0100)]
CMake: Compile with -fPIC when building SOs
Without this embedding static libraries into shared libraries may result in link time errors.
Issue: #2283
Ben Clayton [Mon, 29 Jun 2020 12:46:26 +0000 (13:46 +0100)]
CMake: Error on unresolved symbols
Issue: #1484
Ben Clayton [Mon, 29 Jun 2020 13:52:54 +0000 (14:52 +0100)]
Remove root kokoro/linux-*-cmake configs
These have been superseded by the `static` and `shared` variants in the respective subdirectories.
Issue: #2283
John Kessenich [Mon, 29 Jun 2020 04:44:29 +0000 (22:44 -0600)]
Merge pull request #2286 from ben-clayton/kokoro-static-shared
Kokoro: Split linux cmake cfgs into static/shared
John Kessenich [Sun, 28 Jun 2020 11:10:54 +0000 (05:10 -0600)]
Merge pull request #2294 from KhronosGroup/fix-arg-precision
Fix #2293: Get correct RelaxedPrecision settings for various ways of passing arguments to formal parameters.
John Kessenich [Fri, 26 Jun 2020 15:05:31 +0000 (09:05 -0600)]
SPV: Fix #2293: keep relaxed precision on arg passed to relaxed param
When arguments are copied to make space for a writable formal parameter,
and the formal parameter is relaxed precision, make the copy also
relaxed precision.
John Kessenich [Fri, 26 Jun 2020 14:37:06 +0000 (08:37 -0600)]
SPV: Partially address #2293: correct "const in" precision matching.
Track whether formal parameters declare reduced precision and match
that with arguments, and if they differ, make a copy to promote the
precision.
lriki [Thu, 25 Jun 2020 03:27:28 +0000 (12:27 +0900)]
Add pack_matrix test
lriki [Fri, 12 Jun 2020 12:26:48 +0000 (21:26 +0900)]
HLSL: Fix #pragma pack_matrix(row_major) not work on global uniforms