Greg Fischer
7a49192d23
Add support for spirv1.6
...
Add command line support which enables the following behavior:
- Remap discard
Map discard to DemoteToHelperInvocation for HLSL shaders. Map to
OpTerminateInvocation for GLSL shaders.
- Decorate HelperInvocation with Volatile
- Use localSizeId for execution mode
WorkGroupSize is deprecated in spirv1.6
Also update known goods to SPIRV 1.6
2021-12-16 15:01:42 -07:00
Greg Fischer
ca13951205
Merge pull request #2840 from alelenv/no_location2
...
Do not output location decoration for certain variables in ray tracing storage classes.
2021-12-09 11:45:32 -07:00
Greg Fischer
fbb39aa461
Fix --hlsl-dx-position-w to work for SV_Position embedded in struct
...
Fixes #2244
2021-12-07 15:34:52 -07:00
Ashwin Lele
e306f02927
Do not output location decoration for certain variables in ray tracing storage
...
classes.
2021-12-06 13:09:03 -08:00
Rex Xu
6c1db7fd6c
Fix validation failures of test cases regarding GL_EXT_spirv_intrinsics
...
1. The test cases of OpReadClockKHR is invalid. The return type is
unsigned integer rather than signed integer.
2. When SPIR-V decorate or SPIR-V type is specified, we should avoid
auto location mapping because the semantics are totally decided by
SPIR-V tokens.
2021-11-25 16:24:37 +08:00
Greg Fischer
69f9dce708
Merge branch 'master' into GL_ARB_fragment_coord_conventions
2021-11-24 11:52:08 -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
Greg Fischer
a40e4ac3f7
Merge branch 'master' into textureQueryLOD
2021-11-22 10:39:03 -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
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
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
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
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
10be28ac9b
Fix struct type sharing
...
Fixes #2812
2021-11-12 16:57:11 -07:00
Greg Fischer
002b3f55c7
Generate error for binding on push_constant
2021-11-10 15:15:43 -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
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
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
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
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
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
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
Greg Fischer
3d03b7822e
Scalarize vector readFirstInvocationARB ( #2766 )
...
Fixes #2761
2021-09-23 10:40:43 -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
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
Greg Fischer
8ef6a4cb4d
Perform update_precision on constructors and converts
...
Fixes #2740
2021-09-02 14:18:51 -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