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
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
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
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
Kevin McCullough
13fd2d6470
Fix incorrect link time validation for unused gl_PerVertex members
2021-11-08 15:23:02 -08: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
ZhiqianXia
46d3a30bd9
Support the #extension GL_ARB_draw_instanced.
...
Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
2021-11-08 13:48:03 +08: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
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
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
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
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
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
Malcolm Bechard
7b57c6e32a
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).
2021-09-29 15:31:28 -04:00
Greg Fischer
994987bc90
Fix variable scoping of do-while
...
Fixes #2744
2021-09-24 10:48:52 -06:00
Malcolm Bechard
3f04389a18
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
2021-09-22 11:41:10 -06:00
Greg Fischer
c2604615f4
Merge pull request #2685 from kevin-mccullough/FixIsIoResizeArrayTesselationStageHandling
...
Fix isIoResizeArray() tessellation stage handling
2021-09-21 16:29:30 -06:00
Greg Fischer
0f886fe7d3
Merge pull request #2759 from mbechard/vkRelaxed-RetargetID
...
GL_EXT_vulkan_glsl_relaxed - retarget gl_VertexID to gl_VertexIndex
2021-09-17 13:58:48 -06:00
Malcolm Bechard
05794b46a7
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.
2021-09-16 17:40:49 -04:00
Malcolm Bechard
d3bff63cae
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.
2021-09-15 23:39:02 -04:00
Greg Fischer
80dcc36907
Merge pull request #2745 from jeremy-lunarg/hayes-fix-warnings
...
Fix GCC warnings
2021-09-15 11:09:14 -06:00
Greg Fischer
62ed14518f
Run update_precision() on array and matrix constructors.
2021-09-14 12:17:58 -06:00
Greg Fischer
8ef6a4cb4d
Perform update_precision on constructors and converts
...
Fixes #2740
2021-09-02 14:18:51 -06:00
Jeremy Hayes
012436d680
Fix GCC warnings
...
Fix -Wsign-compare warnings.
Fix -Wunused-parameter warnings.
2021-08-31 16:40:35 -06:00
Greg Fischer
a4599ef756
Merge pull request #2718 from ZhiqianXia/AtomicOpsARB
...
Support the atomic_counter_xxxARB built-in functons at #extension GL_ARB_shader_atomic_counter_ops.
2021-08-18 12:59:27 -06:00
alelenv
fc60f77aa2
Add support for GL_NV_ray_tracing_motion_blur.
2021-08-10 10:40:28 -07:00
ZhiqianXia
78de10954e
Support the textureQueryLOD at #extension GL_ARB_texture_query_lod.
...
Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
2021-08-02 16:20:02 +08:00
ZhiqianXia
bf56773517
Support Extension GL_ARB_shader_atomic_counter_ops and relative intrisic functions.
...
refs:
https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_shader_atomic_counter_ops.txt
Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
2021-08-02 10:16:25 +08:00
Greg Fischer
e0f3fdf433
Merge pull request #2716 from greg-lunarg/i2689
...
Add support for pragma STDGL invariant(all)
2021-08-01 00:13:10 -06:00
Greg Fischer
715f5c6cf1
Add support for pragma STDGL invariant(all)
...
Fixes #2689
2021-07-31 15:55:25 -06:00
Greg Fischer
27384e04f6
Allow layout(std430) uniform with GL_EXT_scalar_block_layout
2021-07-30 11:11:16 -06:00
Greg Fischer
9ff6cd0bd6
Merge branch 'master' into BugPoint
2021-07-29 14:48:24 -06:00
ZhiqianXia
8cd85272ad
Support Uint to Int implicit conversions at #extension GL_ARB_gpu_shader5.
...
Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
2021-07-19 17:24:28 +08:00
ZhiqianXia
cf52f73a0c
Atomic memory function can only be used for shader storage block member or shared variable.
...
Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
2021-07-12 16:57:25 +08:00
Kevin McCullough
5597c8d7cf
Fix isIoResizeArray() tessellation stage handling
2021-07-09 09:51:16 -07:00
Greg Fischer
263e50f6aa
Revert "Atomic memory function can only be used for shader storage block member or shared variable."
2021-07-08 13:10:58 -06:00
Greg Fischer
9e707294f1
Merge pull request #2684 from ZhiqianXia/Dev
...
Add support for gl_MaxVaryingVectors for ogl.
2021-07-07 15:08:55 -06:00
ZhiqianXia
5531fbc662
Add support for gl_MaxVaryingVectors for ogl.
2021-07-07 15:32:52 +08:00
ZhiqianXia
8a5c5e8210
Merge branch 'KhronosGroup:master' into master
2021-07-07 14:12:33 +08:00