Commit Graph

4622 Commits

Author SHA1 Message Date
Greg Fischer
90c5214344 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
2022-11-01 12:06:51 -06:00
Greg Fischer
980ac50813
Merge pull request #3047 from akien-mga/spirv.hpp-dos2unix
Convert spirv.hpp line endings to LF (Unix style)
2022-10-19 11:33:25 -06:00
Jeremy Hayes
0c3c37de1b
Merge pull request #3046 from amdrexu/bugfix
Fix incorrect parse message of mesh shader
2022-10-19 10:45:29 -06:00
Greg Fischer
a0ad0d7067
Merge pull request #3043 from gnl21/helper-invocation
Change Volatile generation for HelperInvocation
2022-10-17 13:51:33 -06:00
Graeme Leese
5c352476c7 Test for spv1.6 + memory model HelperInvocation
This should generate a Volatile tag on the access, not on the variable
itself.
2022-10-14 15:30:03 +01:00
Graeme Leese
d570b2b05b 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
2022-10-14 15:23:41 +01:00
Greg Fischer
5755de46b0
Merge pull request #3049 from jeremy-lunarg/hayes-update-changes
Update CHANGES for release 11.12.0
2022-10-13 11:29:59 -06:00
Jeremy Hayes
78221d619e Update CHANGES for release 11.12.0 2022-10-13 10:58:53 -06:00
Greg Fischer
ef6c9714a8
Merge pull request #3048 from jeremy-lunarg/hayes-update-known-good
Update known_good.json
2022-10-12 17:48:02 -06:00
Jeremy Hayes
a77d26f0af Update known_good.json 2022-10-12 16:56:40 -06:00
Greg Fischer
568e233ecf
Merge pull request #3037 from mbechard/master
only use dead input elimination on vertex shaders
2022-10-12 14:29:15 -06:00
Jeremy Hayes
15bd50483f
Merge pull request #3045 from James2022-rgb/feature/c_interface_preamble_support
Add preamble support to the C interface.
2022-10-12 11:55:38 -06:00
Rémi Verschelde
7541f39849 Convert spirv.hpp line endings to LF (Unix style)
This was the only header using CRLF, the rest already uses LF.
2022-10-11 10:59:19 +02:00
Rex Xu
17b0a21877 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.
2022-10-11 15:01:35 +08:00
James0124
573e9849be CInterface: Add preamble support.
Add interface for `TShader::setPreamble`.
2022-10-08 09:33:21 +09:00
Jeremy Hayes
89db4e1caa
Merge pull request #3038 from ewerness-nv/extmicromapongithubmaster
GL_EXT_opacity_micromap
2022-10-05 22:35:58 -06:00
Jeremy Hayes
1846ead23b
Merge pull request #3028 from rhabacker/fix-shared-build-mode
cmake: Do not install static libraries in shared build mode
2022-10-05 22:20:52 -06:00
Eric Werness
1b1824f90f GL_EXT_opacity_micromap 2022-09-29 10:21:01 -07:00
Jeremy Hayes
28b53119bd
Merge pull request #3027 from rhabacker/fix-cmake-files-install-location
cmake: Use common installation directory for cmake support files.
2022-09-28 08:08:49 -06:00
Malcolm Bechard
d11c3ff315 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.
2022-09-28 00:07:01 -04:00
Jeremy Hayes
2ab42a9a1f
Merge pull request #3012 from JohannesKauffmann/fix-wundef
Fix -Wundef warnings for MINGW_HAS_SECURE_API
2022-09-27 20:03:16 -06:00
Jeremy Hayes
c799e7bea2
Merge pull request #3036 from pmistryNV/bug3019
Fix for bug #3019 : That incorrectly removed perVertexEXT qualifier as…
2022-09-27 15:19:44 -06:00
Pankaj Mistry
559a5f1d82 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
2022-09-26 12:47:12 -07:00
Jeremy Hayes
8ba94fc9de
Merge pull request #3034 from jeremy-lunarg/hayes-fix-debugdeclare-debugvalue
Use DebugDeclare for local variables
2022-09-23 10:18:45 -06:00
Jeremy Hayes
ee442785dd Use DebugDeclare for local variables
Previously we had decided to issue DebugValue directly in glslang.
However, this was incorrect and causing issues with RenderDoc.
2022-09-23 09:33:50 -06:00
Greg Fischer
8243ca3c30
Merge pull request #3021 from qingyuanzNV/fix_opline_prepending_opfunction_with_pp
Fix OpLine prepending OpFunction reports wrong file when #line is pre…
2022-09-21 16:49:46 -06:00
Greg Fischer
3400e9bfbd
Merge pull request #3031 from rg3igalia/sub-group-size-arb-flat-fix
Make gl_SubGroupARB a flat int in Vulkan
2022-09-21 16:42:24 -06:00
Ricardo Garcia
d4865f0b68 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.
2022-09-21 10:05:15 +02:00
Greg Fischer
b40f87f1d3
Merge pull request #3032 from mbechard/master
Improve naming in link validation
2022-09-20 10:19:08 -06:00
Malcolm Bechard
7f7831c67b further updates to 67384dd18b
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.
2022-09-16 17:53:08 -04:00
Ralf Habacker
7cd519511c 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.
2022-09-13 15:57:44 +02:00
Ralf Habacker
50ec8ae584 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.
2022-09-13 15:35:30 +02:00
Greg Fischer
c0cf8ad876
Merge pull request #3025 from pmistryNV/GL_EXT_mesh_shader
Make a spirv builder utility function for termination instructions that take input …
2022-09-12 16:28:30 -06:00
Pankaj Mistry
cd9b971a5e Make a utility function for termination instructions that take input operands.
Use the new utility function for generating OpEmitMeshTasksEXT.
2022-09-09 13:11:20 -07:00
Greg Fischer
df7fec2cfa
Merge pull request #3023 from pmistryNV/GL_EXT_mesh_shader
Make OpEmitMeshTasksEXT a terminal instruction
2022-09-09 11:44:17 -06:00
Greg Fischer
284ceb6d45
Merge pull request #2985 from jeremy-lunarg/hayes-nonsemantic-shader-debuginfo-rebase
Implement NonSemantic.Shader.DebugInfo.100 debug instruction generation.

These instructions will be generated under the -gV and -gVS  command line options. These instructions enable source-level shader debugging with Renderdoc.

This is an alpha release of this capability. Additional improvements are forthcoming. Use and feedback are welcome.
2022-09-09 10:13:02 -06:00
Pankaj Mistry
71f5f219ad Fix for issue #3020
Make OpEmitTMeshasksEXT a terminal instructions
2022-09-08 18:58:55 -07:00
Qingyuan Zheng
c52b3d5075 Fix OpLine prepending OpFunction reports wrong file when #line is present 2022-09-06 23:57:18 -07:00
Greg Fischer
7757cbebe4
Merge pull request #3016 from ichordev/patch-1
Fixed a small grammatical error
2022-09-06 12:22:10 -06:00
Greg Fischer
5487373dbf
Merge pull request #3015 from spnda/remove_nv_c_interface
Fix: Remove NV suffix from glslang C interface
2022-09-06 12:20:53 -06:00
sean
17e0a9a563
Fix: Remove NV suffix from C interface 2022-09-02 19:25:06 +02:00
Greg Fischer
a53aa3e94f
Merge pull request #3014 from pmistryNV/GL_EXT_mesh_shader
GL_EXT_mesh_shader/SPV_EXT_mesh_shader implementation
2022-09-02 10:52:48 -06:00
ichordev
86bb449e64
Fixed a small grammatical error 2022-09-03 02:13:55 +10:00
Pankaj Mistry
228c67228a 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
2022-09-01 18:02:21 -07:00
Greg Fischer
69ae9e7460
Merge pull request #2997 from RandomShaper/remove_unused
Remove the unused `OS_CleanupThreadData`
2022-08-31 17:25:02 -06:00
Greg Fischer
ae42b05ba3
Merge pull request #3011 from hbatagelo/fix_type_punning_ub
Fix strict aliasing violation
2022-08-31 17:21:56 -06:00
Johannes Kauffmann
f3cf7a452c Fix -Wundef warnings for MINGW_HAS_SECURE_API
Since 12e27e17de, 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.
2022-08-31 15:49:54 +00:00
Jeremy Hayes
7a914ce926 Implement NonSemantic.Shader.DebugInfo.100
See https://github.com/KhronosGroup/SPIRV-Registry.
2022-08-26 16:17:54 -06:00
Pedro J. Estébanez
30d9aa5c54 Remove the unused OS_CleanupThreadData 2022-08-26 20:40:29 +02:00
Harlen
cc86f0d13f Fix strict aliasing violation 2022-08-26 13:26:56 -03:00