Greg Fischer [Wed, 17 Nov 2021 22:26:19 +0000 (15:26 -0700)]
Merge pull request #2824 from alan-baker/update-tools
Update SPIRV-Tools
Greg Fischer [Wed, 17 Nov 2021 16:55:17 +0000 (09:55 -0700)]
Merge pull request #2825 from greg-lunarg/i2244
Add --hlsl-dx-position-w option
Greg Fischer [Wed, 17 Nov 2021 01:42:12 +0000 (18:42 -0700)]
Add --hlsl-dx-position-w option
This reciprocates the w component of SV_Position in HLSL fragment shaders
to provide DirectX compatibility for HLSL shaders in Vulkan.
Fixes #2244
Alan Baker [Wed, 17 Nov 2021 00:03:12 +0000 (19:03 -0500)]
Update SPIRV-Tools
* Fix test expectations
Greg Fischer [Tue, 16 Nov 2021 18:20:42 +0000 (11:20 -0700)]
Merge pull request #2823 from kda/master
Initialize member TSymbol::uniqueId.
Kevin Athey [Tue, 16 Nov 2021 00:33:08 +0000 (16:33 -0800)]
Initialize member TSymbol::uniqueId.
Greg Fischer [Mon, 15 Nov 2021 21:49:53 +0000 (14:49 -0700)]
Merge pull request #2821 from greg-lunarg/conv0
[RFC] add more negative float conversions to test constantUnaryConversion.comp and remove the undefined ones
Marius Hillenbrand [Mon, 15 Nov 2021 15:31:50 +0000 (16:31 +0100)]
remove undefined conversions from test constantUnaryConversion.comp
Remove remaining conversions from negative float64_t to unsigned
integers, which are undefined behavior.
As a result, this test will also succeed on platforms that implement
those conversions differently than x86. That addresses one of the issues
in #2815.
Marius Hillenbrand [Mon, 15 Nov 2021 15:30:15 +0000 (16:30 +0100)]
add negative float conversions to test constantUnaryConversion.comp
Add conversions from negative float16_t and float32_t to bool, all
signed integer types (i.e., including those in
GL_EXT_shader_explicit_arithmetic_types), and all float types (from the
same extension) to extend coverage.
Note that converting negative float values to unsigned integers is
undefined behavior. Thus, we exclude them.
Greg Fischer [Mon, 15 Nov 2021 20:28:53 +0000 (13:28 -0700)]
Merge pull request #2806 from ZhiqianXia/bestFunctionMatching
#extension GL_ARB_gpu_shader5 support the implicit conversion ,
Greg Fischer [Mon, 15 Nov 2021 17:52:12 +0000 (10:52 -0700)]
Merge pull request #2818 from mhillenbrand/promoteConstantUnion_signed_char
TIntermediate::promoteConstantUnion(): fix conversion to int8
Greg Fischer [Sat, 13 Nov 2021 02:16:35 +0000 (19:16 -0700)]
Merge pull request #2819 from greg-lunarg/i2812
Fix struct type sharing
Greg Fischer [Sat, 13 Nov 2021 00:38:11 +0000 (17:38 -0700)]
Merge pull request #2814 from mhillenbrand/isinf_isnan2
Use intermOut.cpp's IsNan and IsInfinity for parse-time constant folding (updated)
Greg Fischer [Fri, 12 Nov 2021 23:54:22 +0000 (16:54 -0700)]
Fix struct type sharing
Fixes #2812
Greg Fischer [Fri, 12 Nov 2021 14:42:16 +0000 (07:42 -0700)]
Merge pull request #2817 from greg-lunarg/sdk0
Revert port GL_EXT_shader_realtime_clock to GL_EXT_spirv_intrinsics
Marius Hillenbrand [Wed, 10 Nov 2021 17:10:58 +0000 (18:10 +0100)]
TIntermediate::promoteConstantUnion(): fix conversion to int8
The signedness of type char is implementation-defined in C++. The
conversion to (signed) int8 currently uses a cast to char, which is
undefined for negative values when the type char is implemented as
unsigned. Thus, fix to cast to "signed char", which has the intended
semantic on all implementations.
Fixes #2807
Greg Fischer [Fri, 12 Nov 2021 01:48:05 +0000 (18:48 -0700)]
Revert port of GL_EXT_shader_realtime_clock to GL_EXT_spirv_intrinsics
Could not be found by glslang library interface. Blocking SDK build.
Greg Fischer [Thu, 11 Nov 2021 22:14:06 +0000 (15:14 -0700)]
Merge pull request #2816 from greg-lunarg/v11.7.0
Release 11.7.0
Greg Fischer [Thu, 11 Nov 2021 18:12:01 +0000 (11:12 -0700)]
Merge pull request #2813 from greg-lunarg/kg120
Update to latest spirv-headers
Greg Fischer [Thu, 11 Nov 2021 16:08:05 +0000 (09:08 -0700)]
Release 11.7.0
Marius Hillenbrand [Tue, 9 Nov 2021 15:31:22 +0000 (16:31 +0100)]
Use intermOut.cpp's IsNan and IsInfinity for parse-time constant folding (updated)
There were two implementations of isInf() and isNan(), in Constant.cpp
and in intermOut.cpp. The former only works on little-endian systems,
the latter is a wrapper for library functions and works regardless of
endianness. Move the second version into Common.h and adopt it in both
places. Thereby avoid the duplication and fix for big-endian systems.
A previous commit with the same intent and purpose had missed a required
header for builds on Windows.
On s390x, this fixes the test case
Glsl/CompileToAstTest.FromFile/constFold_frag.
Fixes #2802
Greg Fischer [Thu, 11 Nov 2021 15:43:30 +0000 (08:43 -0700)]
Update to latest spirv-headers
Greg Fischer [Thu, 11 Nov 2021 15:18:59 +0000 (08:18 -0700)]
Merge pull request #2810 from greg-lunarg/push1
Generate error for binding on push_constant
Greg Fischer [Wed, 10 Nov 2021 22:59:10 +0000 (15:59 -0700)]
Merge pull request #2809 from KhronosGroup/revert-2803-isinf_isnan
Revert "Use intermOut.cpp's IsNan and IsInfinity for parse-time constant folding"
Greg Fischer [Wed, 10 Nov 2021 22:03:07 +0000 (15:03 -0700)]
Generate error for binding on push_constant
Greg Fischer [Wed, 10 Nov 2021 21:13:37 +0000 (14:13 -0700)]
Revert "Use intermOut.cpp's IsNan and IsInfinity for parse-time constant folding"
Greg Fischer [Wed, 10 Nov 2021 17:01:54 +0000 (10:01 -0700)]
Merge pull request #2805 from greg-lunarg/push0
Fix test spv.1.4.OpEntryPoint.frag
ZhiqianXia [Mon, 2 Aug 2021 08:41:21 +0000 (16:41 +0800)]
#extension GL_ARB_gpu_shader5 support the implicit conversion ,
So the best function matching algorithm should be actived.
Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
Greg Fischer [Tue, 9 Nov 2021 22:46:08 +0000 (15:46 -0700)]
Fix test spv.1.4.OpEntryPoint.frag
Cannot apply binding qualifier to push_constant
Greg Fischer [Tue, 9 Nov 2021 20:44:32 +0000 (13:44 -0700)]
Merge pull request #2781 from kevin-mccullough/FixLinkTimeValidationForGl_PerVertex
Fix incorrect link time validation for unused gl_PerVertex members
Greg Fischer [Tue, 9 Nov 2021 18:43:38 +0000 (11:43 -0700)]
Merge pull request #2801 from haasn/thread_safety
Thread safety fixes
Greg Fischer [Tue, 9 Nov 2021 18:08:41 +0000 (11:08 -0700)]
Merge pull request #2803 from mhillenbrand/isinf_isnan
Use intermOut.cpp's IsNan and IsInfinity for parse-time constant folding
Marius Hillenbrand [Tue, 9 Nov 2021 15:31:22 +0000 (16:31 +0100)]
Use intermOut.cpp's IsNan and IsInfinity for parse-time constant folding
There were two implementations of isInf() and isNan(), in Constant.cpp
and in intermOut.cpp. The former only works on little-endian systems,
the latter is a wrapper for library functions and works regardless of
endianness. Move the second version into Common.h and adopt it in both
places. Thereby avoid the duplication and fix for big-endian systems.
On s390x, this fixes the test case
Glsl/CompileToAstTest.FromFile/constFold_frag.
Fixes #2802
Greg Fischer [Tue, 9 Nov 2021 01:47:27 +0000 (18:47 -0700)]
Merge pull request #2799 from cyanreg/master
Add support for targeting Vulkan 1.2 in the C API
Greg Fischer [Tue, 9 Nov 2021 01:29:53 +0000 (18:29 -0700)]
Merge pull request #2798 from alan-baker/update-tools
Update tools
Kevin McCullough [Wed, 13 Oct 2021 22:28:45 +0000 (15:28 -0700)]
Fix incorrect link time validation for unused gl_PerVertex members
Greg Fischer [Mon, 8 Nov 2021 18:32:46 +0000 (11:32 -0700)]
Merge pull request #2722 from ZhiqianXia/GL_ARB_draw_instanced
Support the #extension GL_ARB_draw_instanced.
Niklas Haas [Mon, 8 Nov 2021 13:58:50 +0000 (14:58 +0100)]
Don't release global mutex before initialize/finalize is done
Otherwise this can race with other threads for access to the fields it's
supposed to be initializing/finalizing.
For example, imagine another thread is calling ShInitialize() while the
first thread is calling ShFinalize() - the finalize function would
destroy the state at the same time as the initialize function is trying
to initialize it.
Holding on to the global lock for the entire function prevents all of
these failure modes.
Niklas Haas [Mon, 8 Nov 2021 13:47:32 +0000 (14:47 +0100)]
Initialize global mutex in a thread-safe manner
Currently, ShInitialize() and friends call glslang::InitGlobalLock()
which *overwrites* the global mutex. As such, even though it ostensibly
takes a mutex, this function is actually completely thread-unsafe.
Fix it by using pthread_once to ensure the mutex is only initialized
once, and then never again.
Lynne [Mon, 8 Nov 2021 09:48:38 +0000 (10:48 +0100)]
Add support for targeting Vulkan 1.2 in the C API
ZhiqianXia [Mon, 2 Aug 2021 06:52:11 +0000 (14:52 +0800)]
Support the #extension GL_ARB_draw_instanced.
Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
Alan Baker [Fri, 5 Nov 2021 18:33:46 +0000 (14:33 -0400)]
Update test expectations
Alan Baker [Fri, 5 Nov 2021 18:33:31 +0000 (14:33 -0400)]
Update SPIRV-Tools and SPIRV-Headers
Greg Fischer [Tue, 2 Nov 2021 17:03:45 +0000 (11:03 -0600)]
Merge pull request #2719 from ZhiqianXia/GL_EXT_shader_integer_mix
Add the preamble for GL_EXT_shader_integer_mix
ZhiqianXia [Mon, 2 Aug 2021 03:10:33 +0000 (11:10 +0800)]
Add the GL_EXT_shader_integer_mix Preamble for glsl.
Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
Greg Fischer [Mon, 1 Nov 2021 16:19:09 +0000 (10:19 -0600)]
Merge pull request #2712 from ZhiqianXia/switch_error
glslang should report a error for Feature: last case/default label not followed by statements'.
ZhiqianXia [Thu, 29 Jul 2021 02:01:40 +0000 (10:01 +0800)]
To be compatible with Feature: 'last case/default label not followed by statements'.
Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
Greg Fischer [Wed, 27 Oct 2021 19:28:57 +0000 (13:28 -0600)]
Merge pull request #2796 from greg-lunarg/i2793
Remove support for double trig, pow, exp and log
Greg Fischer [Wed, 27 Oct 2021 17:59:26 +0000 (11:59 -0600)]
Remove support for double trig, pow, exp and log
These are not supported in core GLSL or under any extension
Fixes 2793
Greg Fischer [Tue, 26 Oct 2021 16:52:19 +0000 (10:52 -0600)]
Merge pull request #2792 from jeremy-lunarg/hayes-2760
Return new allocator for copied containers
Jeremy Hayes [Tue, 5 Oct 2021 04:10:00 +0000 (22:10 -0600)]
Return new allocator for copied containers
Fix #2760.
Implement the optional function select_on_container_copy_contruction to
return a default-contructed allocator for containers that are
copy-constructed. This gives copy-constructed containers a pool
allocator for the current thead.
There may be a similar problem with the copy contructor which takes
allocators of type "Other" but, in practice, there is only one place
where this is being used and the allocators are always the same. (i.e.
executing from the same thread)
Greg Fischer [Fri, 22 Oct 2021 20:44:10 +0000 (14:44 -0600)]
Merge pull request #2780 from kevin-mccullough/FixCrossStageCheck
Fix cross-stage check to allow subsequent stage to use previous stage's binding
Greg Fischer [Thu, 21 Oct 2021 18:59:22 +0000 (12:59 -0600)]
Merge pull request #2777 from amdrexu/bugfix
Make modifications of GL_EXT_spirv_intrinsics
Greg Fischer [Thu, 21 Oct 2021 00:26:59 +0000 (18:26 -0600)]
Merge pull request #2787 from greg-lunarg/i2779
Allow 8/16-bit integer as array index
Greg Fischer [Wed, 20 Oct 2021 22:28:11 +0000 (16:28 -0600)]
Merge pull request #2788 from alelenv/iomapper_sr_fix
Skip auto decorating shader record buffer blocks with 'set' and 'binding'.
Greg Fischer [Wed, 20 Oct 2021 21:17:21 +0000 (15:17 -0600)]
Merge pull request #2789 from greg-lunarg/i2785
Accept gl_ViewportMask in version 430 and later
Greg Fischer [Tue, 19 Oct 2021 00:28:01 +0000 (18:28 -0600)]
Allow 8/16-bit integer as array index
Also enable 8/16 bit int capability in SPIR-V in such cases.
Also enable 64 bit capabilities when used in operations.
Fixes #2779
Greg Fischer [Wed, 20 Oct 2021 19:48:22 +0000 (13:48 -0600)]
Accept gl_ViewportMask in version 430 and later
Was previously accepted only in 450 or later.
Fixes #2785
alelenv [Wed, 20 Oct 2021 03:59:35 +0000 (20:59 -0700)]
Skip auto decorating shader record buffer blocks with 'set' and
'binding'.
Greg Fischer [Tue, 19 Oct 2021 23:09:56 +0000 (17:09 -0600)]
Merge pull request #2786 from dneto0/current-source-dir
Fix Cmake rule for extension header generation
David Neto [Tue, 19 Oct 2021 21:32:52 +0000 (17:32 -0400)]
Fix Cmake rule for extension header generation
Allow glslang to be embedded in an enclosing project (such as Shaderc)
Greg Fischer [Tue, 19 Oct 2021 17:20:42 +0000 (11:20 -0600)]
Merge pull request #2783 from chrisforbes/untangle
Untangle use of core glslang version enums in SpvPostProcess
Greg Fischer [Mon, 18 Oct 2021 21:14:07 +0000 (15:14 -0600)]
Merge pull request #2749 from AaronHaganAMD/master
GL_EXT_spirv_intrinsics port of GL_EXT_shader_realtime_clock
amhagan [Wed, 1 Sep 2021 15:33:21 +0000 (11:33 -0400)]
GL_EXT_spirv_intrinsics - Port extensions
Add mechanism to use GL_EXT_spirv_intrinsics headers in glslang.
Ported GL_EXT_shader_realtime_clock as an example.
Rex Xu [Wed, 13 Oct 2021 06:12:47 +0000 (14:12 +0800)]
Make modifications of GL_EXT_spirv_intrinsics
1. spirv_execution_mode_id and spirv_decorate_id could support
specialization constants. The original implementation always
assume only normal frontend constants are valid. It is not true.
2. spirv_type donesn't support type_specifier as an option of
spirv_type_parameter. At present, only constant_expression is the
valid option.
Chris Forbes [Thu, 14 Oct 2021 15:41:16 +0000 (08:41 -0700)]
Untangle use of core glslang version enums in SpvPostProcess
This is the only thing requiring GlslangToSpv.h to be included here.
Change-Id: I72e9e278aa1e6d717e83f9dbf11e089aafe2eb0e
Kevin McCullough [Wed, 13 Oct 2021 21:57:06 +0000 (14:57 -0700)]
Fix cross-stage check to allow subsequent stage to use previous stage's binding
Greg Fischer [Thu, 7 Oct 2021 18:33:37 +0000 (12:33 -0600)]
Merge pull request #2770 from ncesario-lunarg/ncesario-cmake-endif
cmake: Remove "conditions" from endif
Greg Fischer [Wed, 6 Oct 2021 16:15:06 +0000 (10:15 -0600)]
Merge pull request #2771 from mbechard/master
rename member variable for clarity
Nathaniel Cesario [Tue, 28 Sep 2021 23:01:21 +0000 (17:01 -0600)]
cmake: Remove "conditions" from endif
See https://cmake.org/cmake/help/latest/command/endif.html and
https://cmake.org/cmake/help/latest/command/if.html.
If the else/endif condition does not match the if condition verbatim,
an error is produced on some versions of cmake. This change removes
these "legacy conditions."
Malcolm Bechard [Wed, 29 Sep 2021 19:31:28 +0000 (15:31 -0400)]
rename member variable for clarity
it's a little strange how the resolver takes an arbitrary intermediate
in it's constructor. Really this should be an 'options' object that
holds the various resolve/remapping options which are read from this
intermediate.
At least for now rename it so it's more clear it's used differently from
other intermediates that are accessed in the resolver (such as the per
stage ones).
Greg Fischer [Fri, 24 Sep 2021 19:27:08 +0000 (13:27 -0600)]
Merge pull request #2768 from greg-lunarg/i2744
Fix variable scoping of do-while
Greg Fischer [Fri, 24 Sep 2021 16:12:37 +0000 (10:12 -0600)]
Fix variable scoping of do-while
Fixes #2744
Greg Fischer [Thu, 23 Sep 2021 16:41:34 +0000 (10:41 -0600)]
Merge pull request #2767 from greg-lunarg/i2763
Fix unreachable code in getSampledType()
Greg Fischer [Thu, 23 Sep 2021 16:40:43 +0000 (10:40 -0600)]
Scalarize vector readFirstInvocationARB (#2766)
Fixes #2761
Greg Fischer [Wed, 22 Sep 2021 21:12:49 +0000 (15:12 -0600)]
Fix unreachable code in getSampledType()
Fixed #2763
Malcolm Bechard [Wed, 22 Sep 2021 17:41:10 +0000 (13:41 -0400)]
Auto push constant blocks (#2764)
* add ability to upgrade uniform block to push constants assuming it fits within the size limit imposed by the caller
* allow selecting the packing for the auto push constants
* check the size using the potential layout packing of the push constants
Greg Fischer [Tue, 21 Sep 2021 22:29:30 +0000 (16:29 -0600)]
Merge pull request #2685 from kevin-mccullough/FixIsIoResizeArrayTesselationStageHandling
Fix isIoResizeArray() tessellation stage handling
Greg Fischer [Mon, 20 Sep 2021 16:14:47 +0000 (10:14 -0600)]
Merge pull request #2762 from greg-lunarg/2757
Fix SPIR-V for HLSL SampleBias
Greg Fischer [Fri, 17 Sep 2021 23:14:36 +0000 (17:14 -0600)]
Fix SPIR-V for SampleBias
Fixes #2757
Greg Fischer [Fri, 17 Sep 2021 19:58:48 +0000 (13:58 -0600)]
Merge pull request #2759 from mbechard/vkRelaxed-RetargetID
GL_EXT_vulkan_glsl_relaxed - retarget gl_VertexID to gl_VertexIndex
Greg Fischer [Fri, 17 Sep 2021 19:58:04 +0000 (13:58 -0600)]
Merge pull request #2756 from mbechard/vkRelaxed-AvoidDuplicateUniform
GL_EXT_vulkan_glsl_relaxed - avoid growing the global uniform block with duplicates
Malcolm Bechard [Thu, 16 Sep 2021 21:40:49 +0000 (17:40 -0400)]
GL_EXT_vulkan_glsl_relaxed - retarget gl_VertexID to gl_VertexIndex
instead of allowing for multiple declarations of the variable in the
resulting SPIR-V, instead use a retargeted mechanism to cause references
to gl_VertexID and gl_InstanceID to use the gl_VertexIndex and
gl_InstanceIndex symbol.
Malcolm Bechard [Thu, 16 Sep 2021 03:39:02 +0000 (23:39 -0400)]
avoid growing the global uniform block with duplicates
When using GL_EXT_vulkan_glsl_relaxed, check to see if a
uniform already exists in the block uniform block, and if so,
ensure they are the same type. Otherwise, avoid growing the block
with a duplicate.
Greg Fischer [Wed, 15 Sep 2021 17:09:14 +0000 (11:09 -0600)]
Merge pull request #2745 from jeremy-lunarg/hayes-fix-warnings
Fix GCC warnings
Greg Fischer [Wed, 15 Sep 2021 16:57:44 +0000 (10:57 -0600)]
Merge pull request #2752 from InsertAReallyCreativeNameHere/master
Change MINGW_HAS_SECURE_API checks.
Greg Fischer [Wed, 15 Sep 2021 15:42:34 +0000 (09:42 -0600)]
Merge pull request #2755 from greg-lunarg/2748
Run update_precision() on array and matrix constructors.
Greg Fischer [Tue, 14 Sep 2021 18:17:58 +0000 (12:17 -0600)]
Run update_precision() on array and matrix constructors.
InsertAReallyCreativeNameHere [Wed, 8 Sep 2021 20:43:23 +0000 (06:43 +1000)]
Change MINGW_HAS_SECURE_API checks.
MINGW_HAS_SECURE_API can be defined as 0, but this will be ignored here without this change.
Without these *_s "safe" functions, this code will also build on Windows XP.
Greg Fischer [Thu, 2 Sep 2021 22:11:37 +0000 (16:11 -0600)]
Merge pull request #2747 from greg-lunarg/i2740
Perform update_precision on constructors and converts
Greg Fischer [Thu, 2 Sep 2021 16:49:46 +0000 (10:49 -0600)]
Perform update_precision on constructors and converts
Fixes #2740
Jeremy Hayes [Mon, 9 Aug 2021 20:41:50 +0000 (14:41 -0600)]
Fix GCC warnings
Fix -Wsign-compare warnings.
Fix -Wunused-parameter warnings.
Greg Fischer [Wed, 25 Aug 2021 21:21:08 +0000 (15:21 -0600)]
Merge pull request #2738 from greg-lunarg/kg119
Update known goods and CHANGES for 11.6.0
Greg Fischer [Wed, 25 Aug 2021 19:32:27 +0000 (13:32 -0600)]
Update known goods and CHANGES for 11.6.0
Greg Fischer [Wed, 18 Aug 2021 18:59:27 +0000 (12:59 -0600)]
Merge pull request #2718 from ZhiqianXia/AtomicOpsARB
Support the atomic_counter_xxxARB built-in functons at #extension GL_ARB_shader_atomic_counter_ops.
Greg Fischer [Fri, 13 Aug 2021 15:48:37 +0000 (09:48 -0600)]
Merge pull request #2731 from alelenv/rt_motion
Add support for GL_NV_ray_tracing_motion_blur.
alelenv [Thu, 12 Aug 2021 16:57:22 +0000 (09:57 -0700)]
Update known_good for SPV_NV_ray_tracing_motion_blur.
alelenv [Tue, 10 Aug 2021 19:02:09 +0000 (12:02 -0700)]
Merge branch 'KhronosGroup:master' into rt_motion
alelenv [Tue, 10 Aug 2021 17:40:28 +0000 (10:40 -0700)]
Add support for GL_NV_ray_tracing_motion_blur.
Greg Fischer [Tue, 10 Aug 2021 07:01:39 +0000 (01:01 -0600)]
Merge pull request #2726 from TheMindVirus/master
Update CMakeLists.txt