Commit Graph

4721 Commits

Author SHA1 Message Date
Eric Werness
9d8c7b75c9 GL_EXT_ray_tracing_position_fetch 2023-05-05 09:12:37 -06:00
juan-lunarg
d6e9d3bb4e cmake: Remove USE_CCACHE
This is no longer needed with modern CMake.

I've already removed this from several Khronos repos.

See this stackoverflow for modern approaches to setting ccache via cmake:
https://stackoverflow.com/a/74120112/19739129
2023-05-05 09:11:06 -06:00
juan-lunarg
955f21aad2 cmake: Remove explicitly setting CMAKE_EXPORT_COMPILE_COMMANDS
Modern IDEs / C++ environments will just set this for you.

EX: vscode will set this for you.
2023-05-05 09:11:06 -06:00
Sruthik P
bc6b2bc17a glslang: Do not link with pthread on QNX
On QNX, pthread APIs are provided as part of libc and a separate pthread
library does not exist.

This change updates the makefile of glslang to not link with pthread on
QNX, thereby enabling glslang to be built for QNX platforms.
2023-05-03 09:09:01 -06:00
Chuang Zhu
dfc97740ff Use CMAKE_INSTALL_FULL_LIBDIR in compat cmake files
According to
https://cmake.org/cmake/help/v3.25/module/GNUInstallDirs.html,
CMAKE_INSTALL_LIBDIR can be an absolute path. For instance, Nixpkgs
[defined it to an absolute path in /nix/store](3d17b4c305/pkgs/development/tools/build-managers/cmake/setup-hook.sh (L101)).
The output in this case is:

	# result-glslang/lib/cmake/glslangTargets.cmake:5
	include("${CMAKE_CURRENT_LIST_DIR}/../..//nix/store/3mif2zibig0cilk5dbz334278n0vlq9s-glslang-1.3.231.0/lib/glslang/glslang-targets.cmake")

Signed-off-by: Chuang Zhu <git@chuang.cz>
2023-05-02 15:46:45 -06:00
Brad Smith
9c7fd1a33e Fix building on OpenBSD when building shared libs
OpenBSD does not link shared libs against libc so it is expected
that the use of --no-undefined when linking will fail.

Also garbage collect CMAKE_VERSION check while here, as requested, since
the minimum version is already 3.14.
2023-04-21 20:51:32 -04:00
David Neto
b8955549ef fix error message for vertex struct input
Vertex shaders can have pipeline inputs that are arrays, but not structure
inputs. (GLSL 4.5 section 4.3.4)

But the error message for struct inputs says "cannot be a structure or array".
This PR removes the "or array" part.

Note: The array case is handled immediately after the check for
structure type.

Co-authored-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
2023-04-20 18:25:55 -04:00
Jeremy Hayes
dfdd0ed2ca Delete appveyor configuration
Windows CI is now covered by GitHub actions.
2023-04-20 11:03:54 -06:00
sean
f46f4b192a Fix: Migrate Windows CI to GitHub Actions 2023-04-19 14:51:55 -06:00
Arcady Goldmints-Orlov
68f073b195 Add a test for empty structs in HLSL hull shaders 2023-04-13 09:49:00 -04:00
Try
4142fead74 fix crash in HLSL frontend
fix crash, when converting HLSL return of hull shader into spirv/glsl like arrayed output.

fix #2914
2023-04-13 09:49:00 -04:00
Arcady Goldmints-Orlov
f766ee96f5 Improve help text for the new -P option 2023-04-12 18:24:35 -04:00
Jeremy Hayes
a270fdae55 Fix appveyor build worker image 2023-04-11 13:38:56 -06:00
spencer-lunarg
9fe5223370 Improve error message of alignment offset 2023-04-10 16:21:15 -04:00
Moritz Heinemann
bdba39bae6 Add more preamble tests 2023-04-06 13:38:39 -04:00
Moritz Heinemann
893145ead2 Add option to glslangValidator to inject preamble 2023-04-06 13:38:39 -04:00
Jeremy Hayes
1aefd184a6 Fix DebugCompilationUnit scope
Fix 3167.
2023-04-04 10:56:17 -04:00
Rex Xu
77f7cdfb1e Fix an issue when we merge multiple spirv_decorate_xxx directives
There is a typo.
2023-04-03 18:02:49 -04:00
Rex Xu
8ff8b45131 Parameters of spirv_decorate_id should accept variables
spirv_decorate_id will generate OpDecorateId. The parameter list should
accept variables as part of decorations. This is because OpDecorateId
allows this. The spec says:

  All such <id> Extra Operands must be constant instructions or
  OpVariable instructions.
2023-04-03 18:02:49 -04:00
Arcady Goldmints-Orlov
adcc7e8163 Add tests for conditionals that return a struct value
There are 3 separate tests added to cover the 3 cases in
visitSelection(). With SPIR-V versions prior to 1.4, control flow is
generated, with GLSL generating code to execute only the appropriate
branch of the conditional while HLSL executes both branches and uses the
control flow to select the appropriate one. Finally, with SPIR-V
versions newer than 1.4, OpSelect can be used on structs.

Note that the hlsl.structcopy.comp and hlsl.structcopylogical.comp tests
have identical shader code, but are compiled with different versions of
SPIR-V and result in different codepaths being used and different SPIR-V
generated.
2023-04-03 12:33:59 -04:00
Arcady Goldmints-Orlov
cdb350b356 Fix generation of conditionals with a struct result in SPIR-V
It is possible for the SPIR-V code generator to receive a conditional
where the two branches have the same shader language level type but
different SPIR-V types because of things like offset decorations. This
change modifies visitSelection() to handle this case by using either
multiTypeStore() or, if that is available, OpCopyLogical.

Fixes #3164
2023-04-03 12:33:59 -04:00
Qingyuan Zheng
f8a2442a16 Improve line info for symbol access and assignment 2023-04-01 21:04:46 -06:00
Arcady Goldmints-Orlov
fbabd37aca Remove a redundant condition in an if statement
This was added erroneously in commit 12bc9aa9c.
2023-03-31 19:53:42 -06:00
Arcady Goldmints-Orlov
2aca6d419c Refactor Builder::createTextureCall() to use std::vector
Use a temporary std::vector to accumulate arguments, rather than a
stack-allocated array with a fixed size. This is safer and more
future-proof.
2023-03-31 19:53:42 -06:00
Faith Ekstrand
45405e1d94 Add a .mailmap file
This will make my name and e-mail address remap properly in command-line
Git tools.
2023-03-25 12:26:55 -04:00
Moritz Heinemann
1db9cd2854 Fix CMake for OSDependent install 2023-03-24 16:31:40 -04:00
Arcady Goldmints-Orlov
c43008e829 Fix double expansion of macro arguments.
This adds a new fullyExpanded flag that makes sure that macro arguments
only get expanded once. This can happen either in PrescanMacroArg, or, if
there is token pasting or a function-like macro name has been passed as
an argument and may need to be expanded when used as a function.
2023-03-23 17:45:57 -04:00
Jeremy Hayes
14e5a04e70 Update CHANGES for release 12.1.0 2023-03-21 16:20:54 -06:00
Jeremy Hayes
59abdcf912 Update known_good.json 2023-03-21 15:38:26 -06:00
Nathan Gauër
b34f619e1c kokoro: always chown files after build 2023-03-17 12:53:47 -06:00
Juan Ramos
ef77cf3a92 cmake: No need to set CMP0048/CMP0054
Now that the minimum is 3.14.0 setting these policies is redundant
2023-03-16 10:41:39 -06:00
Juan Ramos
43978b7c96 cmake: Remove outdated comment 2023-03-16 10:41:39 -06:00
Jeremy Hayes
0094e47972 Fix outdated cmake conditional
Remove cmake condition. The minimum is 3.14. The condition is no longer
required.

C++17 is now required. Update the landing page.
2023-03-16 10:05:58 -06:00
Joyce
cd2082e058
Set token permissions to workflows (#3156)
Signed-off-by: Joyce <joycebrum@google.com>
2023-03-08 11:27:09 -05:00
Greg Fischer
204812694c
Merge pull request #3153 from greg-lunarg/i3150
Fix installation of resource limits headers
2023-03-03 16:08:30 -07:00
Greg Fischer
aae2a7ae08 Fix installation of resource limits headers
Fixes #3150
2023-03-03 15:17:03 -07:00
Greg Fischer
2ca0ee3ba4
Merge pull request #3137 from moritz-h/resource-limits
Move ResourceLimits from StandAlone to glslang dir
2023-03-02 11:43:06 -07:00
Johan Mattsson
9cdfc5a511 Fix potential NULL dereference 2023-02-20 18:31:34 -05:00
Johan Mattsson
c64c98267c Fix potential NULL dereference 2023-02-20 17:33:15 -05:00
Moritz Heinemann
f5fa593143 move ResourceLimits from StandAlone to glslang dir (Fix #3064) 2023-02-15 20:06:26 +01:00
Randall C. O'Reilly
6d41bb9c55 updated test to test atomic float add and test results 2023-02-08 13:28:52 -07:00
Randall C. O'Reilly
ae55d83a88 change HLSL/hlslParseables.cpp to support InterlockedAdd on F=float types 2023-02-08 13:28:52 -07:00
Jan Engelhardt
4386679bcd build: set SOVERSION on all libraries
Commit fbe9a23baf erroneously
only added SOVERSION to libglslang.so, but none of the others
that are produced.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
2023-02-03 15:19:35 -07:00
David Neto
d62ef8a20a Use the ninja already in the docker build. 2023-02-02 16:34:01 -07:00
David Neto
8329d4a44b kokoro: avoid git permissions issue that GN fails on
In the docker build script that Kokoro runs, the directories
are owned by a different user.  Git complains about that and in the GN
flow GN will error out.
In this docker flow we don't care about that warning, so within
the docker config set a git global option to ignore the issue.
2023-02-02 16:34:01 -07:00
Maciej
d604f26843 Add test 2023-02-02 16:33:32 -07:00
Maciej
95ad533eb0 Block-decorate Vulkan Structs with RuntimeArrays
Fixes KhronosGroup/glslang#2439

When decorating a struct for Vulkan, add [Buffer]Block decoration if the
struct has a RuntimeArray member, as required by VUID-...-04680.
2023-02-02 16:33:32 -07:00
Hans Wennborg
7341a21b34 GLSL: Fix integer overflow warnings in Constant.cpp
New versions of Clang warn:

```
glslang/MachineIndependent/Constant.cpp(216,114):
error: overflow in expression; result is -9223372036854775808 with type 'long long' [-Werror,-Winteger-overflow]
                else if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == (long long)-0x8000000000000000ll)
                                                                                                                 ^
glslang/MachineIndependent/Constant.cpp(217,61):
error: overflow in expression; result is -9223372036854775808 with type 'long long' [-Werror,-Winteger-overflow]
                    newConstArray[i].setI64Const((long long)-0x8000000000000000ll);
                                                            ^
2 errors generated.
```

Using LLONG_MIN instead avoids the problem. I think it's also more
clear, and the code for EOpMod further down already does this.
2023-02-02 11:20:54 -07:00
rdb
5137ce1a95 HLSL: Add missing relaxed-precision float/int matrix expansions 2023-02-02 11:14:33 -07:00
Jeremy Hayes
58d302cfa2 Rename master to main and update news
Update CI and README to reflect rename.
Update News:
    * Notify users of rename.
    * Update minimum required VS compiler to 2019.
    * Remove notice about versioning. This has been completed.
    * Remove notice about SPIRV folder relocation. It has been 2.5 years
    since this occured.
2023-01-30 15:31:05 -07:00