Commit Graph

3789 Commits

Author SHA1 Message Date
rdb
78a3c915a1
HLSL: Add better diagnostic when using in/out qualifiers in global scope (#2258) 2020-06-02 00:32:35 -06:00
rdb
b56e0e441b
HLSL: Recognize POSITION semantic et al in DX9 compatibility mode (#2255) 2020-06-02 00:30:50 -06:00
rdb
d8edfd8e66
HLSL: fix handling of uniform qualifier in entry point parameters (#2254)
* HLSL: Fix handling of uniforms in entry point parameters

* HLSL: fix handling of "uniform in"

* Tests: Update baseResults of hlsl.function.frag.out for #2254

* HLSL: fix uniforms in function parameters for opaque types
2020-06-02 00:30:07 -06:00
alelenv
999d4fdcdd
Add default descriptorset decoration for acceleration structure (#2257)
variables.
2020-06-02 00:24:41 -06:00
John Kessenich
0cc27fb68c Update news for header location change and recommendation. 2020-06-01 23:24:37 -06:00
dan sinclair
f15982ebeb
Remove install to the SPIRV/ folder. (#2256)
This CL updates the build scripts to only install to glslang/SPIRV
instead of also installing to the SPIRV/ folder. The deprecation notice
is also removed.

Note, this may cause downstream build issues if include directories have
not been updated

Fixes #1964 #2216
2020-06-01 23:21:03 -06:00
alelenv
d39b8afc47
EXT_ray_tracing requires spv1.4 (#2237)
* EXT_ray_tracing requires spv1.4

* Fix typo.

* Add extension data table.

* Updated feedback #2.
2020-05-28 09:18:07 -06:00
nihui
d0c9129d2f
fix warning unused parameter in release build (#2251) 2020-05-28 06:12:01 -06:00
greg-lunarg
e00d27c6d6
Fix missing patch decoration for TessFactor PCF arg (#2249)
Fixes #1553
2020-05-27 22:12:42 -06:00
greg-lunarg
41f62a81ab
Update SPIRV-Tools to stable. Also SPIRV-Headers to TOT. (#2250) 2020-05-27 22:10:36 -06:00
alan-baker
2b0eafb1de
Update spirv tools (#2246)
* Update known good SPIRV-Tools

* Update test expectations
2020-05-25 10:18:42 -06:00
David Neto
2cf9621d6d
Reorder member init to match decl order (#2241)
Fixes field reorder warning.
2020-05-21 09:17:30 -06:00
alelenv
59216d5cd8
Add support for primitive culling layout qualifier. (#2220)
* Add support for primitive culling layout qualifier.

* Add error checks for primitive flags and negative test.
2020-05-21 05:38:41 -06:00
Ryan Harrison
eba1389a01
Replace incorrect uint32_t with correct int vars (#2235) 2020-05-21 05:37:13 -06:00
nihui
a0cce739bc
Do not build glslang-testsuite when ENABLE_CTEST is disabled (#2240) 2020-05-21 05:33:17 -06:00
Malcolm Bechard
6f723ebbe3
fix incorrect error when multiple compilation units don't declare layouts (#2238)
when using multiple compilation units, input/output layouts don't need
to be declared in every unit.
2020-05-21 00:10:33 -06:00
nihui
044113abe8
Add an option to make Exceptions enabled (#2239)
* Add an option to make Exceptions enabled

* /EHsc enable exceptions since vs2003
2020-05-20 23:55:24 -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