Commit Graph

3773 Commits

Author SHA1 Message Date
John Kessenich
a6470e8f45 Tests: fix some paths not automapping, and some shaders with no main. 2020-05-20 07:39:05 -06:00
John Kessenich
2e0f0a0517 Fix #2227, which was coded incorrectly, to be simpler/safer. 2020-05-20 01:56:11 -06:00
John Kessenich
9514c6be66 Build: Fix #2228, by correcting the type used. 2020-05-19 22:23:07 -06:00
Roy.li
8e3b73e37b
Code refine. (#2227) 2020-05-19 22:11:12 -06:00
Chow
0ab78114a9
Add check for DOUBLE in low versions (#2223)
Add check for DOUBLE in low versions, fix issue #2206
2020-05-18 03:41:52 -06:00
greg-lunarg
7c753a7253
Flatten all interface variables (#2217)
Specifically, add flattening of arrayed io for geometry and
tesselation shaders. Previously some interface structs just had
builtins split out which caused some interfaces to not be exactly
the same as that of flattened adjacent stages, affecting validation
and correctness.

This obviates builtin splitting. That will be removed in a followup
commit. It was left in for this commit to better exhibit the functional
changes that were made.

Fixes #1660.
2020-05-18 02:13:10 -06:00
John Kessenich
1a906168cd Bump version. 2020-05-18 02:12:35 -06:00
Roy.li
24dcbd1b1f
Reserve unused std140 uniform block in reflection, and fix uniform block matrix layout (#2041)
According to the spec glsl4.60.7:
4.4.5. Uniform and Shader Storage Block Layout Qualifiers:
"The packed qualifier overrides only std140, std430, and shared; other qualifiers are inherited.
When packed is used, no shareable layout is guaranteed. The compiler and linker can optimize
memory use based on what variables actively get used and on other criteria. Offsets must be
queried, as there is no other way of guaranteeing where (and which) variables reside within the
block"

we should reserve std140 block and shared block in reflection.

According to the spec glsl4.60.7:
4.4.5. Uniform and Shader Storage Block Layout Qualifiers:
"The row_major and column_major qualifiers only affect the layout of matrices, including all
matrices contained in structures and arrays they are applied to, to all depths of nesting. These
qualifiers can be applied to other types, but will have no effect."

We need ensure all matrix block member been effect.

Support EShMsgKeepUncalled in reflection

EShMsgKeepUncalled  is a link message for link program.
We need only one option to control uncalled function optimization.
If we set EShMsgKeepUncalled as false in link time, linker won't be keep the uncall function sequence in AST,  and if we set EShMsgKeepUncalled as true in link time, linker will keep all uncalled function sequence in AST.
So, in reflecte time, we just only travers all function sequence. It make EShMsgKeepUncalled  only work at linker, and can effect reflection.

Recursively layout packing to "block member"

layout packing isn't set recursively, it causes TReflection::getOffsets doesn't work correctly.
2020-05-15 02:26:48 -06:00
John Kessenich
c6874320de Bump version. 2020-05-15 02:16:13 -06:00
Jaebaek Seo
08a05bc2b9
Move to newer version of SPIRV-Tools
* Update tests according to spirv-opt update

We refactored function inlining pass of spirv-opt and it results in
different numbering of result ids in SPIR-V code. This commit updates
test cases to avoid a test failure according to the spirv-opt update.

* Update known good
2020-05-14 11:06:05 -06:00
John Kessenich
4fa68edd68 Address #2211: Improve the copy constructor of TVarLivePair. 2020-05-12 02:59:47 -06:00
John Kessenich
55f9d97f3b
Merge pull request #2214 from maierfelix/master
Fix Web build
2020-05-11 21:55:22 -06:00
Felix Maier
8e18714bb6 Fix Web build 2020-05-11 22:06:21 +02:00
John Kessenich
5d88edf13a
Merge pull request #2210 from Flakebi/ubsan
Explicitly mark EShLanguageMask as unsigned
2020-05-11 10:43:58 -06:00
Sebastian Neubauer
91ac60fc52 Explicitly mark some enums as unsigned
This allows casting from and to any unsigned value, previously this was
undefined behavior.

This fixes ubsan complaining in `TParseContext::layoutQualifierCheck`,
where `~EShLangComputeMask` is used.
2020-05-11 10:24:32 +02:00
John Kessenich
b5f003d7a3 Fix #2191: Error check for indexing reference containing unsize array. 2020-05-01 08:19:59 -06:00
John Kessenich
2ac3c5b6d6 GLSL: Separate out swizzle handling (potentially fixing bugs).
Noticed this when looking at swizzles.  It's at least better structure,
removing hard-to-see early returns, which might be contributing to bugs.
2020-05-01 07:35:30 -06:00
John Kessenich
bfaf88ee6a
Merge pull request #2205 from pmistryNV/GL_EXT_blend_func_extended
Add support for es extension GL_EXT_blend_func_extended
2020-05-01 02:42:49 -06:00
John Kessenich
7c4dc1299e
Merge branch 'master' into GL_EXT_blend_func_extended 2020-05-01 02:41:31 -06:00
John Kessenich
c2fd3003a3
Merge pull request #2204 from pmistryNV/GL_EXT_shader_implicit_conversions
Add support for extension GL_EXT_shader_implicit_conversions
2020-05-01 02:40:36 -06:00
Pankaj Mistry
e05cc20ec2 Add support for es extension GL_EXT_blend_func_extended
* Introduces builtin variables gl_SecondaryFragColorEXT and gl_SecondaryFragDataEXT
* Introduces builtin constant gl_MaxDualSourceDrawBuffersEXT
* enables support for layout qualifier "index" in es profile
2020-04-30 23:21:14 -07:00
John Kessenich
9fcc078724
Merge branch 'master' into GL_EXT_shader_implicit_conversions 2020-04-30 23:09:13 -06:00
pmistryNV
2c53baedbb
Add support for extension GL_EXT_shader_integer_mix (#2203) 2020-04-30 22:41:33 -06:00
Pankaj Mistry
2a8ead2109 Add support for extension GL_EXT_shader_implicit_conversions
Updated extension management in TIntermediate class.
2020-04-30 08:41:23 -07:00
John Kessenich
97ee5c88de Fix #2201: Improve const and copy constructor for TVarLivePair. 2020-04-30 01:59:50 -06:00
pmistryNV
39281fb710
Add support for extension GL_ARB_vertex_attrib_64bit (#2193) 2020-04-29 06:58:49 -06:00
pmistryNV
f03cb290ac
Add support for extension GL_ARB_texture_query_lod. (#2194) 2020-04-27 23:46:54 -06:00
dan sinclair
b858d41964
Remove unused Es310Desktop430 (#2200)
This variable is no longer used, remove.
2020-04-27 22:05:24 -06:00
pmistryNV
ea50f6d77e
Add support for extension GL_ARB_shading_language_packing (#2192) 2020-04-27 02:46:32 -06:00
John Kessenich
bcf6a2430e Move to SPIR-V 1.5 Rev. 3, bump revision, remove a status from README. 2020-04-27 02:12:05 -06:00
John Kessenich
1b57332746
Note about Build Status. 2020-04-24 12:01:14 -06:00
John Kessenich
52d34b4c65 Move to latest SPIR-V header, and bump glslang revision. 2020-04-24 08:46:32 -06:00
pmistryNV
7d65f09b83
Add support for extension GL_ARB_shader_storage_buffer_object (#2184)
Enable below features for GL Core version 420:
* layout qualifier "std430"
* storage qualifier "buffer"
* atomic memory functions
2020-04-22 22:46:52 -06:00
Phillip Stephens
02c70ad10e
TPpToken: Fix compiling on clang-10 (#2189) 2020-04-22 08:19:43 -06:00
MennoVink
c9b28b9f33
xcode warnings fix (#2188) 2020-04-21 07:06:12 -06:00
pmistryNV
3f4e5c4563
Add support for extension GL_ARB_shader_image_size (#2185) 2020-04-19 20:47:54 -06:00
pmistryNV
9f46e3dd5e
Add support for extension GL_ARB_shader_bit_encoding (#2183) 2020-04-17 05:24:12 -06:00
Cody Northrop
4d2298bfd7
Support multiple swizzled out operands (#2175)
Swizzled out operands were added in bbbd9a2a. This was sufficient
for most tests, but we ran into problems with umulExtended and
imulExtended, which have two.

This CL converts the tracking values to vectors so multiple operands
can be supported.

Test: KHR-GLES31.core.shader_bitfield_operation.*
Test: ctest
2020-04-13 21:59:49 -06:00
John Kessenich
4657244018 Fix #2178: Allow specialization constants for texel offsets. 2020-04-12 22:57:07 -06:00
Malacath-92
fd593d5f08
Get rid of all warnings with MSVC and clang-cl (#2177) 2020-04-10 02:39:16 -06:00
alelenv
75de196cec
Add support for EXT_ray_flags_primitive_culling. (#2173)
Fixes issue #2169.
2020-04-08 22:09:20 -06:00
John Kessenich
9c3204a1fd Error message: Finish addressing #2097, better texture error message. 2020-04-07 02:18:23 -06:00
Ryan Harrison
b5757b9500
Remove extra semicolons (#2170)
This is causing downstream users compiler errors if they have Werror or other
particularly restrictive flags turned on.
2020-04-02 23:04:09 -06:00
Malcolm Bechard
0b66fa3b62
Shader interface matching rework to fix #2136 (#2156)
* rework how shader interface block naming rules are handled

* Fixes 2136

According to the spec, shader interfaces (uniform blocks, buffer
blocks, input blocks, output blocks) all should be matched up via
their block names across all compilation units, not instance names.
Also, all block names can be re-used between all 4 interface types
without conflict. This change makes it so all of these blocks are
matched and remapped using block name and not by instance name.
Additional the rule that matched uniform and buffer blocks must
either be anonymous or named (but not nessearily the same name) is
now imposed.

* add warning if instance names differ between matched shader interfaces

* Add test cases from #2137 which is now fixed as well.

* replace some tab characters with spaces

* buffer blocks and uniform blocks now share the same block namespace
2020-04-02 02:03:53 -06:00
John Kessenich
1fff362355 Build warning: Fix #2167: Remove nested reuse of 'unreachable'. 2020-04-01 00:46:57 -06:00
John Kessenich
e157435c1e Bump revision. 2020-03-31 00:02:31 -06:00
John Kessenich
e7c94f4973
Merge pull request #2166 from alelenv/rq_lvalue_fix
Error out assignments to objects of rayQueryEXT type.
2020-03-30 23:24:14 -06:00
alelenv
f986436a90 Error assigns to objects of rayQueryEXT type. 2020-03-30 10:24:30 -07:00
John Kessenich
08c02ced79
Merge pull request #2164 from dj2/unused
Remove unused variables.
2020-03-30 08:35:39 -06:00
dan sinclair
d50acf97c4 Remove unused variables.
This CL removes two unused variables from the initialization code.
2020-03-30 10:03:13 -04:00