Commit Graph

601 Commits

Author SHA1 Message Date
Nathaniel Cesario
c8ef4f8a9f cmake: Remove "conditions" from endif
See https://cmake.org/cmake/help/latest/command/endif.html and
https://cmake.org/cmake/help/latest/command/if.html.

If the else/endif condition does not match the if condition verbatim,
an error is produced on some versions of cmake. This change removes
these "legacy conditions."
2021-09-30 11:00:09 -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
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
Ben Clayton
f49820dd6b Move hlsl/ source to glslang/HLSL/
Now that the HLSL source files are part of the `glslang` target (#2271), it makes sense for these to sit in the `glslang` directory.

Changed the case of the directory from `hlsl` to `HLSL` to better match the sibling directories.
2020-06-16 11:55:28 +01:00
John Kessenich
4928d556e6
Merge pull request #2271 from ben-clayton/fold-hlsl
Untangle build target cyclic dependencies (approach #2)
2020-06-16 04:20:32 -06:00
Ben Clayton
dcad9ad056 CMake: Fold HLSL source into glslang
... and stub the HLSL target.

Fixes the building of shared libraries.

This breaks the cyclic dependency between the `glslang` and `hlsl` targets (by essentially removing the `hlsl` target).

The `BUILD.gn` and `BUILD.bazel` build rules already pull the `HLSL` source into the `glslang` target.

`Android.mk` is the only remaining build config that has a dedicated `HLSL` target, but this is explicity static and does not suffer the same link-time issues with the cyclic dependency (we may wish to stub this target too).

Related issue: #1484, #2147
Related PR: #2267
2020-06-16 10:46:06 +01:00
dan sinclair
00965b9fa9
Remove unused variable. (#2273)
The `isMat` variable is no longer used in the HLSL parser. Removed.
2020-06-15 12:10:44 -06:00
Ryan Harrison
8496b782fb
Remove unused function, BaseTypeName (#2272) 2020-06-15 10:58:02 -06:00
John Kessenich
a58978ac9a HLSL: Remove support for having GLSL versions of HLSL intrinsics.
Related to PR #2265.
2020-06-15 10:28:09 -06:00
rdb
ebf55a0711
HLSL: Fix incorrect case in name of DX9-style cube sampler type (#2265) 2020-06-15 06:39:43 -06:00
rdb
78a3c915a1
HLSL: Add better diagnostic when using in/out qualifiers in global scope (#2258) 2020-06-02 00:32:35 -06:00
rdb
b56e0e441b
HLSL: Recognize POSITION semantic et al in DX9 compatibility mode (#2255) 2020-06-02 00:30:50 -06:00
rdb
d8edfd8e66
HLSL: fix handling of uniform qualifier in entry point parameters (#2254)
* HLSL: Fix handling of uniforms in entry point parameters

* HLSL: fix handling of "uniform in"

* Tests: Update baseResults of hlsl.function.frag.out for #2254

* HLSL: fix uniforms in function parameters for opaque types
2020-06-02 00:30:07 -06:00
greg-lunarg
e00d27c6d6
Fix missing patch decoration for TessFactor PCF arg (#2249)
Fixes #1553
2020-05-27 22:12:42 -06:00
greg-lunarg
7c753a7253
Flatten all interface variables (#2217)
Specifically, add flattening of arrayed io for geometry and
tesselation shaders. Previously some interface structs just had
builtins split out which caused some interfaces to not be exactly
the same as that of flattened adjacent stages, affecting validation
and correctness.

This obviates builtin splitting. That will be removed in a followup
commit. It was left in for this commit to better exhibit the functional
changes that were made.

Fixes #1660.
2020-05-18 02:13:10 -06:00
ntfs.hard
f68024543f opposite inner condition 2020-03-30 00:55:49 +03:00
John Kessenich
abfc4c2ceb Fix part of #2070: Correctly handle promotion for <unary-op>(int).
This still only handles a scalar correctly, and some
vector cases need additional fixes.
2020-02-18 06:53:39 -07:00
John Kessenich
b0ada80356 HLSL: Fix #1974: ignore input primitives on non-entry-point functions. 2020-01-17 00:14:51 -07:00
Arfrever Frehtes Taifersar Arahesis
bd69a4fb12 Respect CMAKE_INSTALL_LIBDIR in installed CMake files
Fixes #1965
2019-11-18 11:11:55 -08: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
8a97d38913 HLSL: Fix #1912: add attribute syntax for nonreadable/nonwritable 2019-09-29 19:16:25 -06:00
John Kessenich
2d9b0a3550 HLSL: Fix #1912: add attribute syntax for overriding image formats. 2019-09-28 11:39:15 -06:00
John Kessenich
54c72c6d24 HLSL: Fix #1903 Catch 0-argument case to constructors. 2019-09-18 00:04:57 -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
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
4b4b41a634 HLSL: Fix #1815: Don't constant fold spec-constant array indexing. 2019-07-03 01:28:51 -06:00
Matthew Albrecht
cda52d5333 Fixed .dll install on MSVC. 2019-05-23 19:06:44 -05:00
John Kessenich
5cb2fa2ad2 Fix #1759: Check for specialization constants when literals required. 2019-05-03 08:40:35 -06:00
Dan Sinclair
0560138e66 Fixup leak of TString
In decomposeIntrinsic a new TString was being allocated and passed into
a TVariable. That string was leaking. This CL converts the new TString
to call NewPoolTString to allocate from the TString pool.
2019-02-20 16:40:13 -05:00
John Kessenich
567396b6b4 Whitespace: Fix some tabs->spaces, mostly to retriggered failed bots. 2019-02-11 03:43:12 -07:00
Rex Xu
eaf31ab98c Add 8-bit/16-bit transform feedback support for future use 2019-02-03 23:31:32 +08:00
John Kessenich
544c039d26 HLSL: Fix #1679: Add HLSL earlydepthstencil -> SPV EarlyFragmentTests. 2019-01-28 22:19:43 -07:00
John Kessenich
d9cee59afa
Merge pull request #1626 from KhronosGroup/extension-support
Infrastructure: Generalize and broaden per-variable extension checking.
2019-01-23 12:05:22 -08:00
Hodgman
0bb89f5809 HLSL: Protect against some crashes 2019-01-21 18:21:11 -08:00
John Kessenich
493dee0ade
Merge pull request #1656 from amdrexu/bugfix
Fix xfb_stride incorrectness(#1654)
2019-01-17 21:53:34 -07:00
John Kessenich
d9739794e9
Merge pull request #1662 from dneto0/fix-leak2
HLSL: Avoid leaking a shadow sampler struct
2019-01-17 06:29:41 +07:00
David Neto
edadbed6fb HLSL: Avoid leaking a shadow sampler struct 2019-01-16 17:04:58 -05:00
David Neto
806e0573da Avoid leaking name for counter buffer 2019-01-16 10:44:31 -05:00
John Kessenich
b2395e9ddf HLSL: Fix #1655; use "" for nullptr file names. Needs test cases. 2019-01-16 16:07:51 +07:00
Rex Xu
75c5603ada Fix xfb_stride incorrectness(#1654)
Add int64 support in XFB. Change containsDouble to contains64BitType. Make
it more general.
2019-01-14 12:02:58 +08:00
John Kessenich
28be4543cd Infrastructure: Generalize and broaden per-variable extension checking. 2019-01-09 22:21:22 +07:00
John Kessenich
b23d232ec5 Licensing. Fixes #958. Add licenes file and update copyrights. 2018-12-14 10:47:35 -07: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
greg-lunarg
5d43c4aac7 SPV: Fix #1575, fix #1593: Support HLSL #line
SPIR-V OpLines now contain filenames from HLSL-style #lines.
2018-12-07 17:36:33 -07:00
John Kessenich
e3b76ed608 Merge branch 'scalar_block_layout' of https://github.com/jeffbolznv/glslang into jeffbolznv-scalar_block_layout 2018-11-16 09:57:33 -07:00
Jeff Bolz
7da39ed968 Implement GL_EXT_scalar_block_layout 2018-11-14 09:30:53 -06:00
t.jung
31cd98c7b2 HLSL: implemented c register handling
Adjusted a test not to use c register for
a structured buffer, they are supposed to
use t registers

Added comments with hints for what are the
register types are used for.
2018-11-14 13:12:12 +01:00
John Kessenich
918caa7ee4
Merge pull request #1547 from Igalia/apinheiro/xfb-struct-assignment
Apinheiro/xfb struct assignment
2018-11-09 12:27:39 -07:00