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
Kevin McCullough
13fd2d6470
Fix incorrect link time validation for unused gl_PerVertex members
2021-11-08 15:23:02 -08:00
Greg Fischer
ae2e2707df
Merge pull request #2722 from ZhiqianXia/GL_ARB_draw_instanced
...
Support the #extension GL_ARB_draw_instanced.
2021-11-08 11:32:46 -07:00
Niklas Haas
4302d51868
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.
2021-11-08 15:00:28 +01:00
Niklas Haas
3971424207
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.
2021-11-08 14:47:32 +01:00
Marius Hillenbrand
78ce7e567f
Fix encoding/decoding of string literals for big-endian systems
...
Per SPIR-V spec, a string literal's UTF-8 octets are encoded packed into
words with little-endian convention. Explicitly perform that encoding
instead of assuming that the host system is little-endian.
Note that this change requires corresponding fixes in SPIRV-Tools.
Fixes #202
2021-11-08 14:12:01 +01:00
Lynne
5ec47530b7
Add support for targeting Vulkan 1.2 in the C API
2021-11-08 10:48:38 +01:00
ZhiqianXia
46d3a30bd9
Support the #extension GL_ARB_draw_instanced.
...
Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
2021-11-08 13:48:03 +08:00
Alan Baker
8092870281
Update test expectations
2021-11-05 14:33:46 -04:00
Alan Baker
855f496170
Update SPIRV-Tools and SPIRV-Headers
2021-11-05 14:33:31 -04:00
Greg Fischer
eb92526d5e
Merge pull request #2719 from ZhiqianXia/GL_EXT_shader_integer_mix
...
Add the preamble for GL_EXT_shader_integer_mix
2021-11-02 11:03:45 -06:00
ZhiqianXia
e76116982a
Add the GL_EXT_shader_integer_mix Preamble for glsl.
...
Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
2021-11-02 14:39:28 +08:00
Greg Fischer
77d680e1c3
Merge pull request #2712 from ZhiqianXia/switch_error
...
glslang should report a error for Feature: last case/default label not followed by statements'.
2021-11-01 10:19:09 -06:00
ZhiqianXia
1de2d1745b
To be compatible with Feature: 'last case/default label not followed by statements'.
...
Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
2021-10-28 09:23:19 +08:00
Greg Fischer
d1608ab1ef
Merge pull request #2796 from greg-lunarg/i2793
...
Remove support for double trig, pow, exp and log
2021-10-27 13:28:57 -06:00
Greg Fischer
432a43cccb
Remove support for double trig, pow, exp and log
...
These are not supported in core GLSL or under any extension
Fixes 2793
2021-10-27 11:59:26 -06:00
Greg Fischer
44b57597d8
Merge pull request #2792 from jeremy-lunarg/hayes-2760
...
Return new allocator for copied containers
2021-10-26 10:52:19 -06:00
Jeremy Hayes
c9cc4845b9
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)
2021-10-25 10:59:27 -06:00
Greg Fischer
3afa350331
Merge pull request #2780 from kevin-mccullough/FixCrossStageCheck
...
Fix cross-stage check to allow subsequent stage to use previous stage's binding
2021-10-22 14:44:10 -06:00
Greg Fischer
38fd9221db
Merge pull request #2777 from amdrexu/bugfix
...
Make modifications of GL_EXT_spirv_intrinsics
2021-10-21 12:59:22 -06:00
Greg Fischer
9290474dcf
Merge pull request #2787 from greg-lunarg/i2779
...
Allow 8/16-bit integer as array index
2021-10-20 18:26:59 -06:00
Greg Fischer
8020da3f18
Merge pull request #2788 from alelenv/iomapper_sr_fix
...
Skip auto decorating shader record buffer blocks with 'set' and 'binding'.
2021-10-20 16:28:11 -06:00
Greg Fischer
a450fe757b
Merge pull request #2789 from greg-lunarg/i2785
...
Accept gl_ViewportMask in version 430 and later
2021-10-20 15:17:21 -06:00
Greg Fischer
82b2668d58
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
2021-10-20 15:15:30 -06:00
Greg Fischer
6639be7c2d
Accept gl_ViewportMask in version 430 and later
...
Was previously accepted only in 450 or later.
Fixes #2785
2021-10-20 13:51:23 -06:00
alelenv
c571cd8f89
Skip auto decorating shader record buffer blocks with 'set' and
...
'binding'.
2021-10-19 20:59:35 -07:00
Greg Fischer
6351fcef28
Merge pull request #2786 from dneto0/current-source-dir
...
Fix Cmake rule for extension header generation
2021-10-19 17:09:56 -06:00
David Neto
36333d1fb9
Fix Cmake rule for extension header generation
...
Allow glslang to be embedded in an enclosing project (such as Shaderc)
2021-10-19 17:32:52 -04:00
Greg Fischer
2598bc7a5b
Merge pull request #2783 from chrisforbes/untangle
...
Untangle use of core glslang version enums in SpvPostProcess
2021-10-19 11:20:42 -06:00
Greg Fischer
7f1d926a3a
Merge pull request #2749 from AaronHaganAMD/master
...
GL_EXT_spirv_intrinsics port of GL_EXT_shader_realtime_clock
2021-10-18 15:14:07 -06:00
amhagan
035a3bbc4a
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.
2021-10-15 14:13:08 -04:00
Rex Xu
07aec25f82
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.
2021-10-15 20:22:36 +08:00
Chris Forbes
dd097e5adb
Untangle use of core glslang version enums in SpvPostProcess
...
This is the only thing requiring GlslangToSpv.h to be included here.
Change-Id: I72e9e278aa1e6d717e83f9dbf11e089aafe2eb0e
2021-10-14 08:43:34 -07:00
Kevin McCullough
d3567231eb
Fix cross-stage check to allow subsequent stage to use previous stage's binding
2021-10-13 14:57:06 -07:00
Greg Fischer
b9ba4c5743
Merge pull request #2770 from ncesario-lunarg/ncesario-cmake-endif
...
cmake: Remove "conditions" from endif
2021-10-07 12:33:37 -06:00
Greg Fischer
c8cdbac705
Merge pull request #2771 from mbechard/master
...
rename member variable for clarity
2021-10-06 10:15:06 -06:00
Nathaniel Cesario
c8ef4f8a9f
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."
2021-09-30 11:00:09 -06:00