Commit Graph

606 Commits

Author SHA1 Message Date
Gabriele Di Bari
353ef3ac3e Add test for the instance param (geometry shader) 2022-05-24 18:53:39 +02:00
ahagan
b5aae62731 Add whitelist filtering for debug comments in SPIRV-Remap. 2022-05-11 12:08:25 -04:00
ZhiqianXia
07f677028c The first redeclarations of gl_FragCoord must appear before any
use of gl_FragCoord.
2022-03-11 14:42:11 +08:00
ZhiqianXia
438999d24f 1. refine the check for "origin_upper_left" and "pixel_center_integer"
2. gl_FragCoord can be used at ogl140 with extension "GL_ARB_fragment_coord_conventions".




Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
2022-03-01 15:06:04 +08:00
Greg Fischer
79a35ace7c Don't do updatePrecision on float16_t operations
float16_t does not take GLSL precisions and SPIR-V does not
support RelaxedPrecision on float16_t.

Fixes #2894
2022-02-24 15:03:13 -07:00
Greg Fischer
3005da6e6e
Merge pull request #2874 from mbechard/master
fix cases where symbols in the tree didn't get updated during block merging
2022-02-01 15:46:25 -07:00
Malcolm Bechard
b8338311ea fix cases where symbols in the tree didn't get updated during block merging
For GL_EXT_vulkan_glsl_relaxed. When merging the default uniform block,
there were cases where symbols in the tree wern't updated to match the
new block structure after merging blocks together.

This change traverses the symbol tree and updates any references to the
merged block.
2022-01-28 23:38:56 -05:00
Greg Fischer
9ebd8ff6c1 Add Vulkan 1.3 support
Also update known goods to Vulkan 1.3 support
Also re-enable SPIR-V 1.6 tests with vulkan1.3 target
Also re-cache SPIRV 1.6 header which somehow regressed back to 1.5
2022-01-26 17:57:31 -07:00
Greg Fischer
140a76a447 Temporarily disable spirv1.6 tests
These tests will be re-enabled when a Vulkan version is released that
supports spirv1.6.

Fixes #2858
2022-01-11 13:13:50 -07:00
Greg Fischer
364b169807
Merge branch 'master' into EndStreamPrimitive 2022-01-10 11:49:19 -07:00
ZhiqianXia
0a59dd5107 Support the floatBitsToint function at GL_ARB_gpu_shader5 Extension. 2022-01-07 13:50:30 +08:00
Greg Fischer
17232d21d7
Merge pull request #2847 from jeremy-lunarg/hayes-fix-issue-2846
Unblock unsized error from assert
2022-01-05 11:34:32 -07:00
Jeremy Hayes
95e15366e7 Unblock unsized error from assert
Fix issue #2846.
2022-01-04 21:24:05 -07:00
Jeremy Hayes
294c8f1d51 Fix GCC sign-compare warnings 2022-01-04 19:55:41 -07:00
ZhiqianXia
1b01aaaf29 EndStreamPrimitive not supported when there is #extension GL_ARB_gpu_shader5
Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
2022-01-04 10:40:04 +08:00
Greg Fischer
950c6ddc11
Merge pull request #2849 from jeremy-lunarg/hayes-fix-issue-2848
Fix seg fault
2022-01-03 16:39:45 -07:00
Jeremy Hayes
46466be045 Fix seg fault
Check types before accessing typeName.

Fix #2848.
2021-12-28 17:09:57 -07:00
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
69f9dce708
Merge branch 'master' into GL_ARB_fragment_coord_conventions 2021-11-24 11:52:08 -07: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
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
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
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
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
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
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
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
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
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
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
Nathan Reed
fc9897d1ba
Fix OpImageRead result type when compiling HLSL (#2706)
Fix OpImageRead result type when compiling HLSL

- Per the Vulkan spec, OpImageRead must return a 4-component vector always. When compiling HLSL, loads from a RWTexture of a template type with < 4 components would incorrectly generate an OpImageRead with a < 4 component result, resulting in validation errors.
- This was previously fixed for OpImageFetch in commit 4425f24; this commit does the same thing for OpImageRead.
- Added associated tests and expanded existing image fetch tests to check all the different types of textures, in both float and int incarnations, for completeness.
- Update other HLSL tests involving OpImageRead
2021-07-28 09:29:17 -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
Shahbaz Youssefi
097215f618 Fix loading bool arrays from interface blocks
SPIR-V disallows bool in interface blocks, which is emulated with uint.
When loading a bool variable (through accessChainLoad()), it's converted
from uint to bool if it came from an interface block.

This was handled for bool and bvecN, but not for bool arrays.  This
change implements the conversion for bool arrays.

Closes #2694
2021-07-15 22:29:48 -04: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
ZhiqianXia
8a5c5e8210
Merge branch 'KhronosGroup:master' into master 2021-07-07 14:12:33 +08:00