Commit Graph

4750 Commits

Author SHA1 Message Date
Johan Mattsson
4959424f12 Fix potential NULL dereference 2023-12-11 20:03:15 +00:00
Randall C. O'Reilly
0ab71c6180 updated test to test atomic float add and test results 2023-12-11 20:03:15 +00:00
Randall C. O'Reilly
5aa37e39cc change HLSL/hlslParseables.cpp to support InterlockedAdd on F=float types 2023-12-11 20:03:15 +00:00
Jan Engelhardt
b8f0b00b36 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-12-11 20:03:15 +00:00
David Neto
20aded7722 Use the ninja already in the docker build. 2023-12-11 20:03:15 +00:00
David Neto
579686849b 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-12-11 20:03:15 +00:00
Maciej
9dec5d66ce Add test 2023-12-11 20:03:15 +00:00
Maciej
0afb68fbb8 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-12-11 20:03:15 +00:00
Hans Wennborg
bd1b8f8a5b 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-12-11 20:03:15 +00:00
rdb
1465a518fc HLSL: Add missing relaxed-precision float/int matrix expansions 2023-12-11 20:03:15 +00:00
Jeremy Hayes
4d9426830f 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-12-11 20:03:15 +00:00
Maciej
d881c507ea Move check if useStorageBuffer needs to be set.
From TParseContext used only by GLSL, to TParseContextBase inherited by both GLSL and HLSL paths.
It caused compilations from HLSL to SPIR-V 1.3+ to use BufferBlock decoration which is no longer valid.
2023-12-11 20:03:14 +00:00
Arcady Goldmints-Orlov
2d537a62b1 Reject non-float inputs/outputs with version < 120
GLSL 1.20 and prior stated that "the attribute qualifier can be used
only with float, floating-point vectors, and matrices" and likewise
for varying.

Fixes: #3111
2023-12-11 20:03:14 +00:00
Amir Masoud Abdol
127aba47ee Replace the deprecated $<CONFIGURATION> with $<CONFIG> 2023-12-11 20:03:14 +00:00
Jeremy Hayes
da0206e706 Update readme with upcoming branch rename 2023-12-11 20:03:14 +00:00
Jeremy Hayes
913b17ac0a Update CHANGES for release 12.0.0 2023-12-11 20:03:14 +00:00
Jeremy Hayes
bcba7dae74 Update known_good.json 2023-12-11 20:03:14 +00:00
Jeremy Hayes
a2b9ca1643 Update appveyor environment
SPIRV-Tools now requires 3.17.2 or higher. The version provided by
Visual Studio 2015 is 3.16.2.
2023-12-11 20:03:14 +00:00
Greg Fischer
254c47f875 Fix crash on bad structure member reference
Fixes #3105
2023-12-11 20:03:14 +00:00
Juan Ramos
532f78d433 build: Remove AMD_EXTENSIONS / NV_EXTENSIONS defines
These defines aren't needed anymore
2023-12-11 20:03:14 +00:00
Daniel Story
17b1314933 Fix issues with MaxDualSourceDrawBuffersEXT 2023-12-11 20:03:14 +00:00
Jeremy Hayes
2002626a54 Fix debuginfo disassembly 2023-12-11 20:03:14 +00:00
Jeremy Hayes
c7a35b5490 Fix const parameter debug types
Constant qualified parameter types were not being correctly added to
the DebugTypeFunction instruction.

Fix #3095.
2023-12-11 20:03:14 +00:00
Jeremy Hayes
ba6c32edbf Remove languages from cmake project statement
Fix #3088
2023-12-11 20:03:14 +00:00
Chow
fa1570a4c0 [glslang] Refine implicit array size interfaces. (#3074)
* [glslang] Refine implicit array size interfaces.

Help to check builtin and other variables if across stages.
2023-12-11 20:03:14 +00:00
David Neto
2a7fe2486e Remove the name of unused formal paramters
This eliminates a compiler warning in some configurations.
2023-12-11 20:03:14 +00:00
alelenv
1624aa0011 Add support for GL_NV_shader_invocation_reorder. (#3054) 2023-12-11 20:03:14 +00:00
alelenv
7f2dc1ba32 Add support for GL_NV_shader_invocation_reorder. (#3054) 2023-12-11 20:03:14 +00:00
Jeremy Hayes
ae283d8ba0 Guard AppleClang linker options
Fix #3073
2023-12-11 20:03:14 +00:00
Zhou
28759b4557 [glslang][EXT] Support extension ARB_bindless_texture.
Add missing callgraph clean for bindless status flag.

Add test cases. Add support to check special extensions not be available for Vulkan when using GLSL.
2023-12-11 20:03:14 +00:00
Jeremy Hayes
223413f207 Update CHANGES for release 11.13.0 2023-12-11 20:03:14 +00:00
Jeremy Hayes
78e1a764ed Update known_good.json 2023-12-11 20:03:14 +00:00
Gilad Ben-Yossef
0c5e1e3dd8 GL_ARM_shader_core_builtins support
Add support for GL_ARM_shader_core_builtins and SPV_ARM_core_builtins,
including initial tests
2023-12-11 20:03:14 +00:00
Johannes Kauffmann
1a0a931fb7 Use nullptr where possible instead of NULL or 0 2023-12-11 20:03:14 +00:00
Johannes Kauffmann
99db4aed13 Include: PoolAlloc: do not rely on CMake define
On Windows, _DEBUG is defined by CMake if CMAKE_BUILD_TYPE is Debug. But
on other platforms, this is not the case and thus in debug mode, the
guard checks are not enabled.

Instead, rely on the NDEBUG define, which is always defined in release
mode (Release, RelWithDebInfo and MinSizeRel). This works reliably on
all platforms: It is also used to enable or disable assertions.
2023-12-11 20:03:14 +00:00
Greg Fischer
317014c0aa Add EliminateDeadOutputStores to API.
Also eliminates dead output variables and unused output variable
components. Finally calls aggressive dead code elimination.

AnalyzeDeadOutputStores also supplied to be called on the following
shader to provide input for the Eliminate* function.
2023-12-11 20:03:14 +00:00
Greg Fischer
83c5ae4998 Update known goods 2023-12-11 20:03:14 +00:00
Sven-Hendrik Haase
405aba1aa8 Fix locations of cmake files in side compat shims
In https://github.com/KhronosGroup/glslang/pull/3027, the installed cmake files were
stuck into a /cmake subdir but this isn't reflected in these compatibility shims.
2023-12-11 20:03:14 +00:00
Shahbaz Youssefi
c68ce50997 Remove GLSLANG_ANGLE
ANGLE no longer links with glslang.  This change reverts
1ef2e250fc which added a flag to strip
glslang to reduce its binary size.  This flag is no longer needed.
2023-12-11 20:03:14 +00:00
Greg Fischer
939434340d Fix include in resource_limits_c.h
Fixes #3059
2023-12-11 20:03:14 +00:00
Shahbaz Youssefi
c5b60c5bc6 Fix gn build 2023-12-11 20:03:14 +00:00
Greg Fischer
fb8d82b2c0 Improve ResourceLimits interface to be more forward compatible
New interface allows users to generate ResourceLimits for interface so
that additions to TBuiltInResource do not break the ABI.

Users should use the glslang-default-resource-limits library and the
Public/ResourceLimits.h header. Similar changes have been made to the
C interface. Use Public/resource_limits_c.h.

Fixes #2822
2023-12-11 20:03:13 +00:00
Try
866b02800d update failing test-cases 2023-12-11 20:03:13 +00:00
Try
6049a8ce61 mesh shader: fix implicit index-array size calculation for lines and triangles
#fixed #3041
2023-12-11 20:03:13 +00:00
Rémi Verschelde
5c603db0eb Convert spirv.hpp line endings to LF (Unix style)
This was the only header using CRLF, the rest already uses LF.
2023-12-11 20:03:13 +00:00
Rex Xu
30cead5ffd Fix incorrect parse message of mesh shader
When GL_EXT_mesh_shader is enabled, the check of layout qualifiers
'max_vertices' and 'max_primitives' should use
gl_MaxMeshOutputVerticesEXT and gl_MaxMeshOutputPrimitivesEXT.
2023-12-11 20:03:13 +00:00
Graeme Leese
e1c40b6d32 Test for spv1.6 + memory model HelperInvocation
This should generate a Volatile tag on the access, not on the variable
itself.
2023-12-11 20:03:13 +00:00
Graeme Leese
1f233fa5c9 Change Volatile generation for HelperInvocation
For SPIR-V 1.6 HelperInvocation accesses need to be volatile to avoid
undefined values when shaders execute 'demote'. Previously this was
always decorated on the gl_HelperInvocation variable, but this is not
valid when the Vulkan memory model is in use.

When the memory model is enabled, stop decorating the variable
declaration and apply the memory semantic to access chain loads instead.

Fixes #3042
2023-12-11 20:03:13 +00:00
Jeremy Hayes
45374da698 Update CHANGES for release 11.12.0 2023-12-11 20:03:13 +00:00
Jeremy Hayes
da51b5d137 Update known_good.json 2023-12-11 20:03:13 +00:00