4774 Commits

Author SHA1 Message Date
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
1ef2e250fc36d862573cc5e92f04b1d0e2d89867 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
Malcolm Bechard
067f33d239 only use dead input elimination on vertex shaders
It can't be safely used unilaterally on other stages, since that will
result in output/input mismatches between stages. They arn't
having their output variables eliminated accordingly.
2023-12-11 20:03:13 +00:00
James0124
0226373c81 CInterface: Add preamble support.
Add interface for `TShader::setPreamble`.
2023-12-11 20:03:13 +00:00
Eric Werness
6abc9f768f GL_EXT_opacity_micromap 2023-12-11 20:03:13 +00:00
Ralf Habacker
316bb9f17d cmake: Do not install static libraries in shared build mode.
The glslang cmake build system installs static libraries in addition to
the dynamic glslang library, which are required when used in a package
that uses glslang when calling find_package().

Distributions such as openSUSE (and perhaps others) use a "shared only"
strategy, which conflicts with the current state of the glslang build
system.
The static libraries mentioned are already all included in glslang and
thus not needed. With this commit, these will no longer install the
associated cmake support files when glslang is built shared.
2023-12-11 20:03:13 +00:00
Ralf Habacker
5789f5d0f5 cmake: Use common installation directory for cmake support files.
At least on openSUSE, the usual installation location for cmake support
files is ${MAKE_INSTALL_LIBDIR}/cmake/<name>

   $ find /usr/lib64 -name '*.cmake' | grep /cmake/ | wc -l
   834
   $ find /usr/lib64 -name '*.cmake' | grep -v /cmake/ | wc -l
   8

which is also used by glslang with these changes.
2023-12-11 20:03:12 +00:00
Johannes Kauffmann
ed25e50b7d Fix -Wundef warnings for MINGW_HAS_SECURE_API
Since 12e27e17deb3102f1f6f08ec19caf5e32becb3f8, it was assumed that the
MINGW_HAS_SECURE_API macro was unconditionally defined. This is not
always the case, and GCC produces -Wundef warnings when that happens.

Fix this, by first checking if MINGW_HAS_SECURE_API is defined, and if
so, also check that it does not evaluate to zero.

As a drive-by, place parentheses around _MSC_VER for consistency.
2023-12-11 20:03:12 +00:00
Pankaj Mistry
4470b29085 Fix for bug #3019 : That incorrectly removed perVertexEXT qualifier as arrayed IO
This bug got introduced as part of EXT_mesh_shader changes 228c672
Also updated barycentric test cases to add coverage for multiple pervertexEXT array inputs
2023-12-11 20:03:12 +00:00
Jeremy Hayes
d3fcb30389 Use DebugDeclare for local variables
Previously we had decided to issue DebugValue directly in glslang.
However, this was incorrect and causing issues with RenderDoc.
2023-12-11 20:03:12 +00:00
Qingyuan Zheng
7015946384 Fix OpLine prepending OpFunction reports wrong file when #line is present 2023-12-11 20:03:12 +00:00
Ricardo Garcia
c6202b20fc Make gl_SubGroupARB a flat int in Vulkan
gl_SubGroupARB was being correctly declared as an Input variable in
Vulkan but it was missing the Flat decoration, which made spirv-val emit
the VUID-StandaloneSpirv-Flat-04744 validation error with shaders using
that built-in.
2023-12-11 20:03:12 +00:00
Malcolm Bechard
86ed5819f3 further updates to 67384dd18b1715
since we are changing the type before the visitBinary now, we need to be
comparing against the new type.
Previous test cases worked since the 'unitType' was a shallow copy and
ended up getting updated in some cases to match the new type, but not all.
2023-12-11 20:03:12 +00:00
Pankaj Mistry
5c688f77fa Make a utility function for termination instructions that take input operands.
Use the new utility function for generating OpEmitMeshTasksEXT.
2023-12-11 20:03:12 +00:00
Pankaj Mistry
56de853fda Fix for issue #3020
Make OpEmitTMeshasksEXT a terminal instructions
2023-12-11 20:03:12 +00:00
Jeremy Hayes
deb8e38707 Implement NonSemantic.Shader.DebugInfo.100
See https://github.com/KhronosGroup/SPIRV-Registry.
2023-12-11 20:03:12 +00:00
ichordev
04afbb6052 Fixed a small grammatical error 2023-12-11 20:03:12 +00:00
sean
828a040306 Fix: Remove NV suffix from C interface 2023-12-11 20:03:12 +00:00
Pankaj Mistry
ed789649ce GL_EXT_mesh_shader/SPV_EXT_mesh_shader implementation
Added following updates to GL_EXT_mesh_shader implementation:

1. Added SPIRV and GLSL test cases
2. Added checks to ensure NV and EXT mesh shader builtins cannot be used interchangeably.
3. Updated the language name by removing the postfix "NV" to MeshShader and TaskShader.
4. Added checks for grammar checking to comply with the spec.

5. Added gl_NumWorkGroups builtin to Mesh shader
6. Fixed data type of gl_PrimitiveLineIndicesEXT and gl_PrimitiveTriangleIndicesEXT
7. Added new constants to the resources table
8. Updates to handle new storage qualifier "taskPayloadSharedEXT"
9. Updated test cases by replacing "taskEXT" with storage qualifier "taskPayloadSharedEXT"

Addressed  Review comments
1. Fixed instruction description used by glslang disassembly.
2. Updated OpEmitMeshTasksEXT as per spec update
3. Fixed implementation that errors out if there are more then one taskPayloadSharedEXT varjables.
4. Fixed miscellaneous error logs and removed unwanted code.

SPIRV 1.6 related build failure fixes
- Update SPIRV header to 1.6
- Fix conflict wiht SPIRV 1.6 change, where localSizeId is used for execution mode for mesh/task shaders

Enable SPIRV generated for EXT_mesh_shader to be version 1.4

GL_EXT_mesh_shader: Add checks for atomic support and corresponding test cases
2023-12-11 20:03:12 +00:00
Pedro J. Estébanez
91ff31a64e Remove the unused OS_CleanupThreadData 2023-12-11 20:03:12 +00:00
Harlen
557f31d8fe Fix strict aliasing violation 2023-12-11 20:03:12 +00:00
Andrea Pappacoda
a06a94a446 build: install glslang-config.cmake to libdir
As glslang ships architecture dependant files, the Config file should be
installed to libdir, not datadir. See
https://github.com/KhronosGroup/glslang/pull/2989#discussion_r955367103
for more details.

Here's the diff between the install tree before and after this patch:

    $ diff <(tree install-datadir) <(tree install)
    1c1
    < install-datadir
    ---
    > install
    74,99c74,98
    <         ├── lib
    <         │   ├── cmake
    <         │   │   ├── glslang-default-resource-limitsTargets.cmake
    <         │   │   ├── glslangTargets.cmake
    <         │   │   ├── glslangValidatorTargets.cmake
    <         │   │   ├── HLSLTargets.cmake
    <         │   │   ├── OGLCompilerTargets.cmake
    <         │   │   ├── OSDependentTargets.cmake
    <         │   │   ├── spirv-remapTargets.cmake
    <         │   │   ├── SPIRVTargets.cmake
    <         │   │   └── SPVRemapperTargets.cmake
    <         │   ├── libGenericCodeGen.a
    <         │   ├── libglslang.a
    <         │   ├── libglslang-default-resource-limits.a
    <         │   ├── libHLSL.a
    <         │   ├── libMachineIndependent.a
    <         │   ├── libOGLCompiler.a
    <         │   ├── libOSDependent.a
    <         │   ├── libSPIRV.a
    <         │   └── libSPVRemapper.a
    <         └── share
    <             └── glslang
    <                 ├── glslang-config.cmake
    <                 ├── glslang-config-version.cmake
    <                 ├── glslang-targets.cmake
    <                 └── glslang-targets-debug.cmake
    ---
    >         └── lib
    >             ├── cmake
    >             │   ├── glslang-default-resource-limitsTargets.cmake
    >             │   ├── glslangTargets.cmake
    >             │   ├── glslangValidatorTargets.cmake
    >             │   ├── HLSLTargets.cmake
    >             │   ├── OGLCompilerTargets.cmake
    >             │   ├── OSDependentTargets.cmake
    >             │   ├── spirv-remapTargets.cmake
    >             │   ├── SPIRVTargets.cmake
    >             │   └── SPVRemapperTargets.cmake
    >             ├── glslang
    >             │   ├── glslang-config.cmake
    >             │   ├── glslang-config-version.cmake
    >             │   ├── glslang-targets.cmake
    >             │   └── glslang-targets-debug.cmake
    >             ├── libGenericCodeGen.a
    >             ├── libglslang.a
    >             ├── libglslang-default-resource-limits.a
    >             ├── libHLSL.a
    >             ├── libMachineIndependent.a
    >             ├── libOGLCompiler.a
    >             ├── libOSDependent.a
    >             ├── libSPIRV.a
    >             └── libSPVRemapper.a
    101c100
    < 15 directories, 83 files
    ---
    > 14 directories, 83 files
2023-12-11 20:03:12 +00:00
kd-11
b8f9add95a
Merge pull request #3 from kd-11/sdk_224
Sync with SDK ver 224
master-tot
2022-12-11 01:36:02 +03:00
kd-11
fe192e9b58 Sync with upstream SDK ver 1.3.224.1 2022-12-11 01:33:15 +03:00
Jeremy Hayes
10423ec659
Merge pull request #3000 from jeremy-lunarg/hayes-update-cmake-minimum
Update cmake minimum required version
2022-08-12 11:44:16 -06:00
Jeremy Hayes
56e19ed8ce Update cmake minimum required version 2022-08-12 10:29:31 -06:00
Jeremy Hayes
73c9630da9
Merge pull request #2998 from jeremy-lunarg/hayes-update-changes
Update CHANGES for release 11.11.0
2022-08-12 09:32:10 -06:00
Jeremy Hayes
6079f49dea Update CHANGES for release 11.11.0 2022-08-11 14:09:38 -06:00