Niklas Haas [Tue, 12 Jul 2022 14:59:22 +0000 (16:59 +0200)]
Fix version check macros
These were defined backwards to the usual convention.
#if GLSLANG_VERSION_GREATER_THAN(11, 10, 0)
This reads as "if glslang version is greater than 11.10.0" to any
reasonable sane programmer, and should therefore expand to
"glslang_version > macro_argument".
Yet the check it references was actually written as "macro_argument >
glslang_version", thus expressing the completely opposite condition of
"if glslang version is *less than* 11.10.0". This is definitely
backwards and extremely, dangerously surprising behavior to any
programmer familiar with such version macros.
I'm not sure if anybody actually ever used them. I certainly didn't, on
account of them being backwards. I could not find a single reference to
them on GitHub (other than in copies of this header) - every project I
found just used the GLSLANG_VERSION_MAJOR etc. macros directly.
Greg Fischer [Thu, 7 Jul 2022 18:14:29 +0000 (12:14 -0600)]
Merge pull request #2970 from greg-lunarg/i2969
Fix getEnhancedMsgs to work when HLSL not enabled
Greg Fischer [Thu, 7 Jul 2022 17:40:02 +0000 (11:40 -0600)]
Fix getEnhancedMsgs to work when HLSL not enabled
Fixes #2969
Greg Fischer [Wed, 22 Jun 2022 19:08:13 +0000 (13:08 -0600)]
Merge pull request #2963 from greg-lunarg/i2956
Do not generate samplerBuffer for spirv1.6 and beyond
Greg Fischer [Tue, 21 Jun 2022 23:33:57 +0000 (17:33 -0600)]
Do not generate samplerBuffer for spirv1.6 and beyond
This type was removed from spirv1.6. If samplerBuffer is specified in
GLSL, generate textureBuffer. If samplerBuffer type is constructed,
just return the buffer.
Fixes #2956
Greg Fischer [Mon, 13 Jun 2022 23:28:18 +0000 (17:28 -0600)]
Merge pull request #2962 from James2022-rgb/feature/c_interface_opsource_support
Add OpSource support to the C interface.
James0124 [Mon, 6 Jun 2022 16:13:21 +0000 (01:13 +0900)]
CInterface: Add OpSource support.
Add interface for `TIntermediate::addSourceText` and `TIntermediate::setSourceFile`.
Greg Fischer [Fri, 3 Jun 2022 00:01:12 +0000 (18:01 -0600)]
Merge pull request #2961 from jeremy-lunarg/hayes-update-changes
Release 11.10.0
Jeremy Hayes [Thu, 2 Jun 2022 23:34:26 +0000 (17:34 -0600)]
Release 11.10.0
Greg Fischer [Thu, 2 Jun 2022 22:49:28 +0000 (16:49 -0600)]
Merge pull request #2960 from jeremy-lunarg/hayes-update-known-good
Update known_good.json
Jeremy Hayes [Thu, 2 Jun 2022 17:51:07 +0000 (11:51 -0600)]
Update known_good.json
Greg Fischer [Wed, 1 Jun 2022 23:20:20 +0000 (17:20 -0600)]
Merge pull request #2957 from greg-lunarg/p2933
Restore legacy interface for remap()
Greg Fischer [Wed, 1 Jun 2022 22:40:29 +0000 (16:40 -0600)]
Restore legacy interface for remap()
Fixes ABI breakage caused by #2933
Greg Fischer [Wed, 1 Jun 2022 20:07:18 +0000 (14:07 -0600)]
Merge pull request #2955 from andfau-arm/duplicate-builtin-clash
Avoid duplicate BuiltIn variables for ray tracing matrices (fix #2921)
Andrea Faulds [Wed, 1 Jun 2022 08:43:13 +0000 (10:43 +0200)]
Avoid duplicate BuiltIn variables for ray tracing matrices (fix #2921)
Fixes an issue where invalid SPIR-V was generated when
gl_ObjectToWorldEXT and gl_ObjectToWorld3x4EXT, or
gl_WorldToObjectEXT and gl_WorldToObject3x4EXT, were used in the same
shader. The SPIR-V specification requires that there be at most one
OpVariable decorated with a given BuiltIn value.
Greg Fischer [Tue, 31 May 2022 19:25:22 +0000 (13:25 -0600)]
Merge pull request #2950 from qingyuanzNV/insert_opline_before_opfunction2
Generate OpLine Before OpFunction
Qingyuan Zheng [Tue, 31 May 2022 17:40:25 +0000 (10:40 -0700)]
avoid using make_unique for c++11 compatibility
Qingyuan Zheng [Tue, 31 May 2022 06:08:50 +0000 (23:08 -0700)]
use unique_ptr to avoid calling deleted move ctor
Greg Fischer [Thu, 26 May 2022 16:41:25 +0000 (10:41 -0600)]
Merge pull request #2952 from stu-s/EXT_fragment_shader_barycentric
Add support for VK_EXT_fragment_shader_barycentric
Greg Fischer [Wed, 25 May 2022 18:07:12 +0000 (12:07 -0600)]
Merge pull request #2953 from greg-lunarg/mingw0
Fix build for clang + mingw32-make
Greg Fischer [Tue, 24 May 2022 19:31:03 +0000 (13:31 -0600)]
Fix build for clang + mingw32-make
Fixes #2951
stusmith [Fri, 13 May 2022 16:23:29 +0000 (17:23 +0100)]
Add support for VK_EXT_fragment_shader_barycentric
Greg Fischer [Tue, 24 May 2022 20:14:56 +0000 (14:14 -0600)]
Merge pull request #2947 from corporateshark/master
Add CInterface files and documentation
Greg Fischer [Tue, 24 May 2022 20:11:43 +0000 (14:11 -0600)]
Merge pull request #2948 from Gabriele91/fix/HLSL-Instance-attribute-as-spirv-invocation-attribute
HLSL Instance attribute translated as spirv invocations attribute
Gabriele91 [Tue, 24 May 2022 18:09:20 +0000 (20:09 +0200)]
Add hlsl.instance.geom output
Gabriele Di Bari [Tue, 24 May 2022 16:53:39 +0000 (18:53 +0200)]
Add test for the instance param (geometry shader)
Qingyuan Zheng [Tue, 24 May 2022 06:05:43 +0000 (23:05 -0700)]
generate OpLine before OpFunction
Sergey Kosarevsky [Sat, 21 May 2022 19:30:39 +0000 (22:30 +0300)]
Add a new C interface example to README.md
Gabriele Di Bari [Sat, 21 May 2022 15:00:24 +0000 (17:00 +0200)]
handleEntryPointAttributes add EatInstance case
Sergey Kosarevsky [Sat, 21 May 2022 06:00:29 +0000 (23:00 -0700)]
Android.mk: Add CInterface files
Greg Fischer [Fri, 20 May 2022 15:46:45 +0000 (09:46 -0600)]
Merge pull request #2945 from dneto0/remove-unused-var
Remove unused variable
David Neto [Thu, 19 May 2022 17:27:12 +0000 (13:27 -0400)]
Remove unused variable
Greg Fischer [Wed, 18 May 2022 19:19:28 +0000 (13:19 -0600)]
Merge pull request #2943 from mbechard/master
fix structure indexing reassignment during block merging
Malcolm Bechard [Tue, 17 May 2022 03:03:37 +0000 (23:03 -0400)]
fix structure indexing reassignment during block merging
For EOpIndexDirectStruct binaries, we want to visit the left symbol (the
structure) before we visit the binary, so it gets updated first.
That way we are comparing the updated structure against the target
'unitType', not the original structure.
Greg Fischer [Wed, 11 May 2022 19:45:33 +0000 (13:45 -0600)]
Merge pull request #2933 from AaronHaganAMD/whitelist
Add whitelist filtering for debug comments in SPIRV-Remap.
ahagan [Wed, 27 Apr 2022 03:36:57 +0000 (23:36 -0400)]
Add whitelist filtering for debug comments in SPIRV-Remap.
Greg Fischer [Fri, 6 May 2022 17:09:55 +0000 (11:09 -0600)]
Merge pull request #2940 from alelenv/spirv_intrinsics_rt_ops
Disable layout error check for RT ops in presence of EXT_spirv_intrinsics
Greg Fischer [Fri, 6 May 2022 17:07:14 +0000 (11:07 -0600)]
Merge pull request #2938 from mariusbjorge/GL_EXT_ray_cull_mask
Adding support for GL_EXT_ray_cull_mask
alelenv [Fri, 6 May 2022 04:46:58 +0000 (21:46 -0700)]
Disable layout error check for RT ops in presence of EXT_spirv_intrinsics
Fixes #2935
Marius Bjorge [Thu, 5 May 2022 12:03:57 +0000 (14:03 +0200)]
Update spirv-tools and spirv-headers known good
Marius Bjorge [Thu, 5 May 2022 10:56:04 +0000 (12:56 +0200)]
Adding support for GL_EXT_ray_cull_mask
Greg Fischer [Fri, 22 Apr 2022 21:44:20 +0000 (15:44 -0600)]
Merge pull request #2932 from Ryp/master
Fix WavePrefixCountBits() being off by one.
Greg Fischer [Fri, 22 Apr 2022 21:31:55 +0000 (15:31 -0600)]
Merge pull request #2928 from tellowkrinkle/patch-1
Add macOS hidden files to gitignore
Ryp [Thu, 21 Apr 2022 19:05:17 +0000 (22:05 +0300)]
Fix WavePrefixCountBits() being off by one.
It was counting bits up to the current lane included, whereas the
documentation says it should be excluded. This now matches dxc's behavior
as well.
Fix #2929
tellowkrinkle [Sun, 17 Apr 2022 01:21:41 +0000 (20:21 -0500)]
Add macOS hidden files to gitignore
Greg Fischer [Fri, 15 Apr 2022 16:45:00 +0000 (10:45 -0600)]
Merge pull request #2927 from ggfan/ndk-env-variable-update
Change ANDROID_NDK_ROOT to ANDROID_NDK_HOME in README.md
Gerry Fan [Wed, 13 Apr 2022 17:08:51 +0000 (17:08 +0000)]
Change ANDROID_NDK_ROOT to ANDROID_NDK_HOME in README.md
Greg Fischer [Fri, 8 Apr 2022 00:33:03 +0000 (18:33 -0600)]
Merge pull request #2925 from SpaceIm/fix-mingw
CMake: fix MinGW build
SpaceIm [Thu, 7 Apr 2022 19:18:27 +0000 (21:18 +0200)]
fix MinGW
pre compiled headers leads to "internal error in mingw32_gt_pch_use_address, at config/i386/host-mingw32.c:192: MapViewOfFileEx: Attempt to access invalid address"
Greg Fischer [Wed, 6 Apr 2022 19:42:55 +0000 (13:42 -0600)]
Merge pull request #2924 from greg-lunarg/r.11.9.0a
Release 11.9.0
Greg Fischer [Wed, 6 Apr 2022 18:21:33 +0000 (12:21 -0600)]
Release 11.9.0
Greg Fischer [Wed, 6 Apr 2022 19:01:04 +0000 (13:01 -0600)]
Merge pull request #2923 from greg-lunarg/kg123
Update spirv-tools known good
Greg Fischer [Wed, 6 Apr 2022 18:00:57 +0000 (12:00 -0600)]
Update spirv-tools known good
Greg Fischer [Mon, 28 Mar 2022 18:07:30 +0000 (12:07 -0600)]
Merge pull request #2915 from EdoardoLuciani/master
Update README.md with ray tracing shader stages filename extensions
Greg Fischer [Mon, 28 Mar 2022 18:04:17 +0000 (12:04 -0600)]
Merge pull request #2917 from greg-lunarg/i2907
Improved comment for glslang_optimization_level_t
Greg Fischer [Mon, 28 Mar 2022 17:34:40 +0000 (11:34 -0600)]
Improved comment for glslang_optimization_level_t
Edoardo Luciani [Sat, 26 Mar 2022 15:26:46 +0000 (15:26 +0000)]
Update README.md
Greg Fischer [Fri, 25 Mar 2022 21:56:18 +0000 (15:56 -0600)]
Merge pull request #2913 from greg-lunarg/i2905
Generate Int8, Int16 and Float16 capabilities for constants
Greg Fischer [Fri, 25 Mar 2022 20:36:01 +0000 (14:36 -0600)]
Generate Int8, Int16 and Float16 capabilities for constants
Fixes #2905
Greg Fischer [Thu, 24 Mar 2022 23:51:54 +0000 (17:51 -0600)]
Merge pull request #2851 from chaoticbob/version-override
Added GLSL version override functionality and CLI
Greg Fischer [Thu, 24 Mar 2022 22:41:52 +0000 (16:41 -0600)]
Update glsl.versionOverride.vert
Change shader original version to 110
Greg Fischer [Thu, 24 Mar 2022 22:41:15 +0000 (16:41 -0600)]
Update glsl.versionOverride.tese
Change shader original version to 110
Greg Fischer [Thu, 24 Mar 2022 22:40:18 +0000 (16:40 -0600)]
Update glsl.versionOverride.tesc
Change original shader to version 110
Greg Fischer [Thu, 24 Mar 2022 22:39:34 +0000 (16:39 -0600)]
Update glsl.versionOverride.geom
Change original shader to version 110
Greg Fischer [Thu, 24 Mar 2022 22:37:42 +0000 (16:37 -0600)]
Update glsl.versionOverride.frag
Change original shader to version 110
Greg Fischer [Thu, 24 Mar 2022 22:36:48 +0000 (16:36 -0600)]
Update glsl.versionOverride.comp
Change original shader to version 110
Greg Fischer [Thu, 24 Mar 2022 19:43:40 +0000 (13:43 -0600)]
Merge pull request #2912 from greg-lunarg/edic1
Add eliminate-dead-input-components to -Os
Greg Fischer [Thu, 24 Mar 2022 19:25:38 +0000 (13:25 -0600)]
Merge pull request #2908 from Biswa96/cmake-spirv-remap
cmake: Install SPVRemapper runtime library
Greg Fischer [Thu, 24 Mar 2022 18:13:59 +0000 (12:13 -0600)]
Add eliminate-dead-input-components to -Os
Greg Fischer [Thu, 24 Mar 2022 18:12:40 +0000 (12:12 -0600)]
Merge pull request #2911 from greg-lunarg/kg122
Update spirv-tools and spirv-headers known good
Greg Fischer [Thu, 24 Mar 2022 16:23:19 +0000 (10:23 -0600)]
Update spirv-tools and spirv-headers known good
To pick up support for spirv-opt --eliminate-dead-input-components
Greg Fischer [Wed, 23 Mar 2022 17:43:43 +0000 (11:43 -0600)]
Merge pull request #2906 from apanteleev/escape-deps
Make depfiles compatible with Windows paths
sfricke-samsung [Wed, 23 Mar 2022 17:42:21 +0000 (12:42 -0500)]
Prevent Push Constant blocks being an array (#2904)
* Prevent Push Constant blocks being an array
* Add push constant array error test
Co-authored-by: Greg Fischer <greg@lunarg.com>
Greg Fischer [Mon, 21 Mar 2022 18:03:34 +0000 (12:03 -0600)]
Merge pull request #2902 from ZhiqianXia/gl_FragCoord
The first redeclarations of gl_FragCoord must appear before any use.
Biswapriyo Nath [Tue, 15 Mar 2022 13:56:57 +0000 (19:26 +0530)]
cmake: Install SPVRemapper runtime library
This installs SPVRemapper.dll file which was missing previously.
Alexey Panteleev [Sat, 12 Mar 2022 01:56:15 +0000 (17:56 -0800)]
Escape the characters that Make considers special in the dependency files.
ZhiqianXia [Wed, 2 Mar 2022 11:54:33 +0000 (19:54 +0800)]
The first redeclarations of gl_FragCoord must appear before any
use of gl_FragCoord.
Greg Fischer [Tue, 1 Mar 2022 21:50:55 +0000 (14:50 -0700)]
Merge pull request #2897 from ZhiqianXia/origin_upper_left
Fix the issue for GL_ARB_fragment_coord_conventions extension.
ZhiqianXia [Tue, 1 Mar 2022 07:06:04 +0000 (15:06 +0800)]
1. refine the check for "origin_upper_left" and "pixel_center_integer"
2. gl_FragCoord can be used at ogl140 with extension "GL_ARB_fragment_coord_conventions".
Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
Greg Fischer [Fri, 25 Feb 2022 00:57:22 +0000 (17:57 -0700)]
Merge pull request #2895 from greg-lunarg/i2894
Don't do updatePrecision on float16_t operations
Greg Fischer [Thu, 24 Feb 2022 20:50:41 +0000 (13:50 -0700)]
Don't do updatePrecision on float16_t operations
float16_t does not take GLSL precisions and SPIR-V does not
support RelaxedPrecision on float16_t.
Fixes #2894
Greg Fischer [Wed, 23 Feb 2022 23:34:36 +0000 (16:34 -0700)]
Merge pull request #2892 from greg-lunarg/mb
Improve error message for image/sampler functions under enhanced-msgs
Greg Fischer [Fri, 18 Feb 2022 22:08:28 +0000 (15:08 -0700)]
Improve error message for image/sampler functions for enhanced-msgs
For recent GLSL versions, if texture2D function call appears, the error
message reports an unsupported type constructor. Change message to
unsupported function. Likewise for other removed texture* function calls.
Greg Fischer [Wed, 16 Feb 2022 23:15:20 +0000 (16:15 -0700)]
Merge pull request #2891 from dneto0/hlsl-namespace
Fix Test/hlsl.namespace.frag test case
David Neto [Wed, 16 Feb 2022 22:10:29 +0000 (17:10 -0500)]
Fix Test/hlsl.namespace.frag test case
Before this change, the example is rejected by DXC:
$ dxc -T ps_6_0 hlsl.namespace.frag
hlsl.namespace.frag:22:73: error: call to non-static member function
without an object argument
return N1::getVec() + N2::getVec() + N2::N3::getVec() + N2::N3::C1::getVec() * N2::gf;
~~~~~~~~~~~~^~~~~~
The call to the class member function requires an object, or we ned to
make the function static. This update makes the function static.
This also fixes SPIR-V validation: without this change the call
to that getVec does not have enough arguments:
error: line 69: OpFunctionCall Function <id>'s parameter count does not
match the argument count.
%43 = OpFunctionCall %v4float %N2__N3__C1__getVec_
Greg Fischer [Thu, 10 Feb 2022 21:16:44 +0000 (14:16 -0700)]
Merge pull request #2888 from mrpippy/python3
Explicitly use Python 3 for scripts
Greg Fischer [Thu, 10 Feb 2022 18:57:37 +0000 (11:57 -0700)]
Merge pull request #2887 from mbechard/master
avoid leaving decorations on auto-push-constants
Brendan Shanks [Thu, 10 Feb 2022 17:24:03 +0000 (09:24 -0800)]
Explicitly use Python 3 for scripts
Malcolm Bechard [Wed, 9 Feb 2022 23:44:22 +0000 (18:44 -0500)]
avoid leaving decorations on auto-push-constants
uniform blocks that are upgraded to push_constants shouldn't have
set/binding etc. decorations applied to them
Greg Fischer [Mon, 7 Feb 2022 20:09:13 +0000 (13:09 -0700)]
Merge pull request #2886 from greg-lunarg/i2875
Fix sameElementShape test of sampler
Greg Fischer [Mon, 7 Feb 2022 19:15:31 +0000 (12:15 -0700)]
Fix sameElementShape test of sampler
There is apparently a hole in the initialization of sampler in TType
so that a simple comparison which should pass might fail. Until the
hole is found, also test that both types are samplers before comparing
the sampler field for equality.
Fixes #2875
Greg Fischer [Thu, 3 Feb 2022 16:26:44 +0000 (09:26 -0700)]
Merge pull request #2885 from greg-lunarg/kg121
Update spirv-tools known good
Greg Fischer [Thu, 3 Feb 2022 01:37:43 +0000 (18:37 -0700)]
Update spirv-tools known good
Picking up some spirv-tools bug fixes
Greg Fischer [Tue, 1 Feb 2022 22:47:19 +0000 (15:47 -0700)]
Merge pull request #2883 from greg-lunarg/link2
Enhance readability of error messages for GLSL
Greg Fischer [Tue, 1 Feb 2022 22:46:25 +0000 (15:46 -0700)]
Merge pull request #2874 from mbechard/master
fix cases where symbols in the tree didn't get updated during block merging
Greg Fischer [Thu, 30 Dec 2021 18:56:57 +0000 (11:56 -0700)]
Enhance readability of error messages for GLSL
Specifically, make GLSL link error messages more specific and output
only information relevant to the error.
Also change type printing to more closely reflect GLSL syntax. This
is the default for link error messages, but must me enabled with the
new option --enhanced-msgs for compilation error messages.
Also with --enhanced-msgs, only emit one error message per source
line.
Malcolm Bechard [Wed, 26 Jan 2022 02:31:31 +0000 (21:31 -0500)]
fix cases where symbols in the tree didn't get updated during block merging
For GL_EXT_vulkan_glsl_relaxed. When merging the default uniform block,
there were cases where symbols in the tree wern't updated to match the
new block structure after merging blocks together.
This change traverses the symbol tree and updates any references to the
merged block.
Greg Fischer [Thu, 27 Jan 2022 20:21:18 +0000 (13:21 -0700)]
Merge pull request #2879 from greg-lunarg/vulkan-1.3-B
Release 11.8.0
Greg Fischer [Thu, 27 Jan 2022 19:23:47 +0000 (12:23 -0700)]
Release 11.8.0
Greg Fischer [Thu, 27 Jan 2022 19:13:43 +0000 (12:13 -0700)]
Merge pull request #2878 from greg-lunarg/vulkan-1.3-A
Fix size_t to int warning