4747 Commits

Author SHA1 Message Date
Greg Fischer
69f9dce708
Merge branch 'master' into GL_ARB_fragment_coord_conventions 2021-11-24 11:52:08 -07:00
Greg Fischer
042aaea516
Merge pull request #2831 from amdrexu/bugfix
Fix an issue of spirv_by_reference
2021-11-23 13:39:57 -07:00
Rex Xu
fe54126c05 Fix an issue of spirv_by_reference
When using this qualifier for a parameter, we make it as a pointer.
However, the function TranslateStorageClass() is therefore called and
the storage class should only be set to Function when it is invoked
to translate parameter types rather than actual argument types.
2021-11-23 16:40:45 +08:00
Jeremy Hayes
509a39212d Migrate travis to github actions 2021-11-22 15:57:03 -07:00
Greg Fischer
7a0b9b212c
Merge pull request #2723 from ZhiqianXia/textureQueryLOD
Support the textureQueryLOD at #extension GL_ARB_texture_query_lod.
2021-11-22 15:21:33 -07:00
Greg Fischer
a40e4ac3f7
Merge branch 'master' into textureQueryLOD 2021-11-22 10:39:03 -07:00
Greg Fischer
7efa90e528
Merge pull request #2829 from amdrexu/bugfix2
Remove the test spv.intrinsicsSpecConst
2021-11-22 10:36:12 -07:00
Rex Xu
3e9e60af86 Remove the test spv.intrinsicsSpecConst
According to current SPIR-V spec, we couldn't write a valid case that
references OpExecutionModeId and OpDecorateId.
2021-11-22 21:33:36 +08:00
Greg Fischer
2c54c20813
Merge pull request #2782 from kevin-mccullough/FixIomapperSeperableShaderValidation
Fix issue with separable shader validation in iomapper
2021-11-19 15:19:27 -07:00
Greg Fischer
dd83c37b98
Merge pull request #2826 from amdrexu/bugfix
Fix an issue of spirv_type used in local variable definitions
2021-11-18 11:20:02 -07:00
Greg Fischer
a0c7b6fe87
Merge pull request #2811 from mbechard/master
remove unneeded extra constructions now that pool allocation is fixed
2021-11-18 10:18:22 -07:00
Rex Xu
bee91eb479 Fix an issue of spirv_type used in local variable definitions
We previously use createOp() in SPV builder to create type declaration.
However, all type declarations should be placed in const-type-variable
declaration section. And duplicated type defintions ought to be avoided.
We now make a method in SPV builder to perform this operation with a
more general solution: makeGenericType().
2021-11-18 20:17:04 +08:00
Malcolm Bechard
eebb48f5fc remove unneeded extra constructions now that pool allocation is fixed 2021-11-17 18:11:10 -05:00
Kevin McCullough
cbab732905 Fix issue with separable shader validation in iomapper 2021-11-17 14:28:16 -08:00
Greg Fischer
0d468a7eee
Merge pull request #2824 from alan-baker/update-tools
Update SPIRV-Tools
2021-11-17 15:26:19 -07:00
Greg Fischer
74b0abb9cd
Merge pull request #2825 from greg-lunarg/i2244
Add --hlsl-dx-position-w option
2021-11-17 09:55:17 -07:00
Greg Fischer
e9564feb55 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
2021-11-16 18:42:12 -07:00
Alan Baker
1025f4736a Update SPIRV-Tools
* Fix test expectations
2021-11-16 19:03:12 -05:00
Greg Fischer
d51d01ccfb
Merge pull request #2823 from kda/master
Initialize member TSymbol::uniqueId.
2021-11-16 11:20:42 -07:00
Kevin Athey
cd187e201a Initialize member TSymbol::uniqueId. 2021-11-15 16:33:08 -08:00
Greg Fischer
8a7860e4cb
Merge pull request #2821 from greg-lunarg/conv0
[RFC] add more negative float conversions to test constantUnaryConversion.comp and remove the undefined ones
2021-11-15 14:49:53 -07:00
Marius Hillenbrand
d13f81510f 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.
2021-11-15 14:01:15 -07:00
Marius Hillenbrand
0d85595e33 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.
2021-11-15 14:00:22 -07:00
Greg Fischer
7141f89a89
Merge pull request #2806 from ZhiqianXia/bestFunctionMatching
#extension GL_ARB_gpu_shader5 support the implicit conversion ,
2021-11-15 13:28:53 -07:00
Greg Fischer
7d27f667a3
Merge pull request #2818 from mhillenbrand/promoteConstantUnion_signed_char
TIntermediate::promoteConstantUnion(): fix conversion to int8
2021-11-15 10:52:12 -07:00
Greg Fischer
f669f13998
Merge pull request #2819 from greg-lunarg/i2812
Fix struct type sharing
2021-11-12 19:16:35 -07:00
Greg Fischer
3074ec94bf
Merge pull request #2814 from mhillenbrand/isinf_isnan2
Use intermOut.cpp's IsNan and IsInfinity for parse-time constant folding (updated)
2021-11-12 17:38:11 -07:00
Greg Fischer
10be28ac9b Fix struct type sharing
Fixes #2812
2021-11-12 16:57:11 -07:00
Greg Fischer
c9706bdda0
Merge pull request #2817 from greg-lunarg/sdk0
Revert port GL_EXT_shader_realtime_clock to GL_EXT_spirv_intrinsics
2021-11-12 07:42:16 -07:00
Marius Hillenbrand
f1fa8afa25 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
2021-11-12 10:35:31 +01:00
Greg Fischer
1f8c8b88c7 Revert port of GL_EXT_shader_realtime_clock to GL_EXT_spirv_intrinsics
Could not be found by glslang library interface. Blocking SDK build.
2021-11-11 23:39:47 -07:00
Greg Fischer
925503088e
Merge pull request #2816 from greg-lunarg/v11.7.0
Release 11.7.0
2021-11-11 15:14:06 -07:00
Greg Fischer
ea73494af9
Merge pull request #2813 from greg-lunarg/kg120
Update to latest spirv-headers
2021-11-11 11:12:01 -07:00
Greg Fischer
0bc8932aba Release 11.7.0 2021-11-11 09:08:05 -07:00
Marius Hillenbrand
0eda343970 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
2021-11-11 16:49:40 +01:00
Greg Fischer
77415296b2 Update to latest spirv-headers 2021-11-11 08:43:30 -07:00
Greg Fischer
600c5037ba
Merge pull request #2810 from greg-lunarg/push1
Generate error for binding on push_constant
2021-11-11 08:18:59 -07:00
Greg Fischer
ac1880cc7b
Merge pull request #2809 from KhronosGroup/revert-2803-isinf_isnan
Revert "Use intermOut.cpp's IsNan and IsInfinity for parse-time constant folding"
2021-11-10 15:59:10 -07:00
Greg Fischer
002b3f55c7 Generate error for binding on push_constant 2021-11-10 15:15:43 -07:00
Greg Fischer
22a5e36446
Revert "Use intermOut.cpp's IsNan and IsInfinity for parse-time constant folding" 2021-11-10 14:13:37 -07:00
Greg Fischer
9c5309a22a
Merge pull request #2805 from greg-lunarg/push0
Fix test spv.1.4.OpEntryPoint.frag
2021-11-10 10:01:54 -07:00
ZhiqianXia
50a6a51625 Support the #extension GL_ARB_fragment_coord_conventions.
Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
2021-11-10 10:41:40 +08:00
ZhiqianXia
77b0d72c68 #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>
2021-11-10 09:44:16 +08:00
Greg Fischer
9600b97c6a Fix test spv.1.4.OpEntryPoint.frag
Cannot apply binding qualifier to push_constant
2021-11-09 15:46:08 -07:00
Greg Fischer
bb5b357550
Merge pull request #2781 from kevin-mccullough/FixLinkTimeValidationForGl_PerVertex
Fix incorrect link time validation for unused gl_PerVertex members
2021-11-09 13:44:32 -07:00
Greg Fischer
627f409aec
Merge pull request #2801 from haasn/thread_safety
Thread safety fixes
2021-11-09 11:43:38 -07:00
Greg Fischer
fa26462394
Merge pull request #2803 from mhillenbrand/isinf_isnan
Use intermOut.cpp's IsNan and IsInfinity for parse-time constant folding
2021-11-09 11:08:41 -07:00
Marius Hillenbrand
d1ee644e1d 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
2021-11-09 16:58:21 +01:00
Greg Fischer
8f56d73800
Merge pull request #2799 from cyanreg/master
Add support for targeting Vulkan 1.2 in the C API
2021-11-08 18:47:27 -07:00
Greg Fischer
9535746aa3
Merge pull request #2798 from alan-baker/update-tools
Update tools
2021-11-08 18:29:53 -07:00