2314 Commits

Author SHA1 Message Date
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
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
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
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
8b87b84001 Fix SPIR-V for SampleBias
Fixes #2757
2021-09-17 17:22:39 -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
14943d4e7d
Merge pull request #2752 from InsertAReallyCreativeNameHere/master
Change MINGW_HAS_SECURE_API checks.
2021-09-15 10:57:44 -06:00
Greg Fischer
62ed14518f Run update_precision() on array and matrix constructors. 2021-09-14 12:17:58 -06:00
InsertAReallyCreativeNameHere
12e27e17de
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.
2021-09-09 06:43:23 +10: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
Greg Fischer
ba540202cd
Merge pull request #2700 from ZhiqianXia/u2i
Support Uint to Int implicit conversions at #extension GL_ARB_gpu_shader5.
2021-07-29 14:10:40 -06:00
Peter Kasting
e8cffa5b7f Fix some instances of -Wunused-but-set-variable.
Bug: chromium:1203071
2021-07-26 07:34:37 -07: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
Greg Fischer
b38100f6bc
Merge pull request #2669 from sudonatalie/remove-unused-var
Remove unused variable Num_string_literal_EXTs
2021-06-17 15:29:34 -06:00
Greg Fischer
e74b35f3f5
Merge pull request #2664 from mbechard/master
only declare compatibility gl_ variables in compatibility mode
2021-06-17 14:49:02 -06:00
Natalie Chouinard
c5f30ff6fe Remove unused variable Num_string_literal_EXTs
Remove an unused variable that causes build failures in downstream
repository.
2021-06-17 11:10:10 -07:00
Greg Fischer
b9d06bdb01
Merge pull request #2668 from cmarcelo/GLSL_EXT_shader_atomic_float2
Implement GLSL_EXT_shader_atomic_float2
2021-06-17 11:27:47 -06:00
Greg Fischer
71612a7e5d
Merge pull request #2625 from amdrexu/feature
Implement the extension GL_EXT_spirv_intrinsics
2021-06-16 14:52:35 -06:00
Jason Ekstrand
d352577a99 Implement GLSL_EXT_shader_atomic_float2 2021-06-16 09:11:14 -07:00
Malcolm Bechard
275d7ae882 only declare compatibility gl_ variables in compatibility mode
avoid declaring them in GLSL 1.50+ if core profile is chosen by the
version statement

fixes #2663
2021-06-10 21:52:09 -04:00
Greg Fischer
230168d5d9 Add support for float spec const vector initialization
Fixes #2025
2021-06-09 10:07:03 -06:00