John Kessenich
e8c9fd602f
Merge pull request #2326 from ben-clayton/always_pic
...
Remove GLSLANG_BUILD_PIC flag
2020-07-07 09:12:12 -06:00
John Kessenich
ba17d8bcf0
Merge pull request #2324 from ben-clayton/gitignore
...
Add new rules to .gitignore
2020-07-07 04:56:39 -06:00
Ben Clayton
3604be156c
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.
2020-07-07 11:49:40 +01:00
Ben Clayton
948dc034c5
Add new static targets to VS solution folders
...
`GenericCodeGen` and `MachineIndependent` were missing from the generated visual studio solutions. Add these.
2020-07-07 11:45:11 +01:00
Ben Clayton
a21c5f3604
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.
2020-07-07 11:15:24 +01:00
John Kessenich
f5ed7a69d5
Merge pull request #2322 from ShabbyX/fix-dawn-tests
...
gn: Fix dawn tests in Chromium
2020-07-06 06:07:58 -06:00
John Kessenich
309ffa294c
Merge pull request #2314 from marcinslusarz/quiet
...
Add --quiet option.
2020-07-06 05:36:34 -06:00
Marcin Ślusarz
245c30c296
Add --quiet option.
...
Being quiet should have been the default, but I guess it's too late
now to change it.
2020-07-06 10:55:40 +02:00
Shahbaz Youssefi
a55029d098
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>
2020-07-05 16:48:34 -04:00
John Kessenich
e7cb8bf080
Merge pull request #2320 from ShabbyX/fix-gn-check
...
gn: Fix `gn gen --check` by adding missing dependency
2020-07-05 10:12:27 -06:00
Shahbaz Youssefi
e2b7983593
gn: Fix gn gen --check
by adding missing dependency
...
Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
2020-07-05 06:26:04 -04:00
John Kessenich
909bca8ab9
Merge pull request #2317 from ShabbyX/glslang_angle
...
gn: Optionally disable optimizations and HLSL
2020-07-04 08:40:19 -06:00
John Kessenich
257e9a3f19
Merge pull request #2319 from ben-clayton/build-pic
...
Add GLSLANG_BUILD_PIC CMake flag
2020-07-03 22:37:25 -06:00
John Kessenich
0638724baa
Merge pull request #2316 from ben-clayton/fix-2315
...
Don't use add_link_options() on old CMake versions
2020-07-03 21:19:42 -06:00
Ben Clayton
1125f1b269
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)`.
2020-07-03 23:24:08 +01:00
Shahbaz Youssefi
8f8f1bc518
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>
2020-07-03 15:06:19 -04:00
Ben Clayton
4af48da4e3
Don't use add_link_options() on old CMake versions
...
Fixes : #2315
2020-07-03 15:41:03 +01:00
John Kessenich
73e001a752
Merge pull request #2311 from ben-clayton/license-checker
...
Kokoro: Correct the `build_file' path to build.sh
2020-07-03 05:24:45 -06:00
John Kessenich
3ec0d74c05
Merge pull request #2312 from ben-clayton/fix-copyright
...
License headers: s/Google/The Khronos Group
2020-07-03 05:23:15 -06:00
Ben Clayton
cb261e3c21
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.
2020-07-03 12:21:01 +01:00
Ben Clayton
751b3f83c5
Kokoro: Correct the `build_file' path to build.sh
2020-07-03 11:07:43 +01:00
John Kessenich
4728509962
Merge pull request #2310 from ben-clayton/license-checker
...
Add license checking continuous and presubmit tests
2020-07-02 23:33:30 -06:00
John Kessenich
ed3d5dbe99
Merge pull request #2309 from ben-clayton/fix-msvc-linker-warnings
...
Fix GLSLANG_IS_SHARED_LIBRARY define
2020-07-02 23:32:01 -06:00
Ben Clayton
fb187f3063
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.
2020-07-02 18:59:34 +01:00
Ben Clayton
cb4788c7a6
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`
2020-07-02 16:10:20 +01:00
Ben Clayton
1d21270ebf
Add missing copyright headers
...
Add copyright headers to build files and scripts.
Simplifies automated scanning for bad license headers.
2020-07-02 16:03:48 +01:00
John Kessenich
a70f7dea77
Merge pull request #2268 from lriki/hlsl-pack_matrix
...
HLSL: Fix #pragma pack_matrix(row_major) not work on global uniforms
2020-07-02 05:21:45 -06:00
John Kessenich
5d4d211933
Merge pull request #2303 from ben-clayton/limit-public-2
...
glslang: Only export public interface for SOs
2020-07-02 05:02:59 -06:00
John Kessenich
9e4429f31e
Bump revision.
2020-07-02 05:02:17 -06:00
John Kessenich
57002d0447
Merge pull request #2307 from KhronosGroup/location-validation
...
Location validation, with update to SPIR-V tools validating location
2020-07-01 09:52:18 -06:00
John Kessenich
863ea235bb
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
2020-07-01 07:18:57 -06:00
John Kessenich
f6facfa189
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.
2020-07-01 06:40:13 -06:00
John Kessenich
b5cc1465f2
Merge pull request #2306 from ben-clayton/licenses
...
Add additional licenses in use to LICENSE.txt
2020-07-01 05:38:22 -06:00
Ben Clayton
2962be40ba
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
2020-07-01 10:48:27 +01:00
John Kessenich
b112fac003
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.
2020-07-01 00:53:37 -06:00
John Kessenich
8d3f3b7dac
Merge pull request #2302 from KhronosGroup/fix-texture-precision
...
SPV: RelaxedPrecision: use the result precision for texture sampling.
2020-06-30 12:41:15 -06:00
John Kessenich
d5b5215a88
Merge pull request #2300 from KhronosGroup/generalize-precision
...
SPV: RelaxedPrecision: Generalize fix #2293 to cover more operations.
2020-06-30 10:57:16 -06:00
Ben Clayton
d64e859987
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
2020-06-30 17:06:17 +01:00
John Kessenich
c858d7bd81
Merge pull request #2301 from ben-clayton/split-libs
...
CMake: break up glslang into smaller static libs
2020-06-30 10:05:37 -06:00
Ben Clayton
b8c3386ec0
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
2020-06-30 14:57:40 +01:00
John Kessenich
8f4251a708
Merge pull request #2297 from ben-clayton/fpic
...
CMake: Compile with -fPIC when building SOs
2020-06-30 07:55:53 -06:00
John Kessenich
12c155f303
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.
2020-06-30 07:52:05 -06:00
John Kessenich
90f1d6ab58
Merge pull request #2296 from ben-clayton/err-unresolved
...
CMake: Error on unresolved symbols
2020-06-30 05:27:14 -06:00
John Kessenich
435dd8028b
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
2020-06-30 02:44:52 -06:00
John Kessenich
dca47063cc
Merge pull request #2295 from ben-clayton/rm-old-kokoro-cfgs
...
Remove root kokoro/linux-*-cmake configs
2020-06-29 22:07:40 -06:00
John Kessenich
2b6a18bd84
Merge pull request #2292 from proydakov/gcc-unused-parameter
...
Fixed GCC -Wunused-parameter in hlslParseables.cpp.
2020-06-29 21:54:06 -06:00
Evgeny Proydakov
f6e3446363
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)
| ~~~~^~~~
2020-06-29 17:07:34 +03:00
Ben Clayton
981e127698
CMake: Compile with -fPIC when building SOs
...
Without this embedding static libraries into shared libraries may result in link time errors.
Issue: #2283
2020-06-29 14:57:47 +01:00
Ben Clayton
1fee6072d0
CMake: Error on unresolved symbols
...
Issue: #1484
2020-06-29 14:57:12 +01:00
Ben Clayton
08bc7cf5fc
Remove root kokoro/linux-*-cmake configs
...
These have been superseded by the `static` and `shared` variants in the respective subdirectories.
Issue: #2283
2020-06-29 14:52:54 +01:00