Neil Henning
81a63f1de0
Add conversion folding when the source is a constant.
...
This change adds unary conversion folding when the source is a constant.
This fixes an ISV issue whereby:
```
const float16_t f = float16_t(42.0);
```
Wouldn't compile because the conversion operator would always produce an
EvqTemporary when it could have produced an EvqConst.
I've also added a test case that proves out that all basic-type to
basic-type conversions work.
2018-11-26 12:45:33 +00:00
John Kessenich
0e6c82ce93
Merge pull request #1592 from KhronosGroup/subgroupBroadcast-const-id
...
GLSL: Fix #1591 : Require the id in subgroupBroadcast to be constant.
2018-11-24 23:13:25 -07:00
John Kessenich
f2675d4d6c
GLSL: Fix #1591 : Require the id in subgroupBroadcast to be constant.
2018-11-21 15:16:30 -07:00
John Kessenich
d2a7b07a64
Merge pull request #1587 from dneto0/update-known-good
...
Update to newer SPIRV-Tools, including VK_EXT_scalar_block_layout
2018-11-16 14:41:13 -07:00
David Neto
2d1739d57a
Update to newer SPIRV-Tools, including VK_EXT_scalar_block_layout
...
Validator has more refined messages about what kind of block layout
rules have been applied.
2018-11-16 16:16:31 -05:00
John Kessenich
1a5e3a9ba6
Bump minor version.
2018-11-16 10:02:18 -07:00
John Kessenich
654544e96b
Merge branch 'jeffbolznv-scalar_block_layout'
2018-11-16 09:57:59 -07:00
John Kessenich
e3b76ed608
Merge branch 'scalar_block_layout' of https://github.com/jeffbolznv/glslang into jeffbolznv-scalar_block_layout
2018-11-16 09:57:33 -07:00
John Kessenich
30cb924538
Move to next SPIRV-Tools known good.
2018-11-15 23:43:35 -07:00
John Kessenich
f4ba9522ec
GLSL: Increase supported sizes of XBF strides and offsets.
2018-11-15 15:12:07 -07:00
John Kessenich
579ccece45
Merge pull request #1583 from TiemoJung/fix_dot_int
...
[HLSL/Spir-V] fix for incorrect spir-v on int dot(int, int)
2018-11-15 11:29:12 -07:00
John Kessenich
1bc601c674
Bump revision.
2018-11-15 10:37:21 -07:00
John Kessenich
75cbfcc278
Update to latest SPIR-V Tools.
2018-11-15 09:57:43 -07:00
t.jung
b16bea801c
[HLSL/Spir-V] fix for incorrect spir-v on int dot(int, int)
...
Decomposes OpDot into corresponding multiplies and additions.
2018-11-15 11:02:30 +01:00
John Kessenich
e3cc0d35f3
Merge pull request #1579 from TiemoJung/handle_c_register
...
HLSL: implemented c register handling
2018-11-14 11:40:45 -07:00
John Kessenich
844e0773a3
Merge pull request #1580 from TiemoJung/float1_times_scalar_fix
...
HLSL: fix invalid spir-v vector * scalar for float1
2018-11-14 11:39:22 -07:00
John Kessenich
e323a4544c
Merge pull request #1577 from TiemoJung/fix_broken_type_system
...
Updated type conversion rules for HLSL frontend
2018-11-14 11:35:22 -07:00
Jeff Bolz
7da39ed968
Implement GL_EXT_scalar_block_layout
2018-11-14 09:30:53 -06:00
t.jung
697fdf015f
HLSL: fix invalid spir-v vector * scalar for float1
...
Missing check for float results in always emitting OpIMul even for float types
2018-11-14 14:27:22 +01:00
t.jung
31cd98c7b2
HLSL: implemented c register handling
...
Adjusted a test not to use c register for
a structured buffer, they are supposed to
use t registers
Added comments with hints for what are the
register types are used for.
2018-11-14 13:12:12 +01:00
t.jung
8279f0728a
Updated type conversion rules for HLSL frontend
2018-11-14 08:13:32 +01:00
John Kessenich
7274bbc27c
Merge pull request #1571 from dj2/result
...
Handle potentially uninitialized result
2018-11-13 08:36:43 -07:00
Dan Sinclair
12fcaa2cc2
Review feedback
2018-11-13 09:17:44 -05:00
John Kessenich
97573b0c41
Merge pull request #1573 from dneto0/fix-pch
...
PCH filename depends on current binary dir
2018-11-12 16:13:40 -07:00
David Neto
0392544b7a
PCH filename depends on current binary dir
...
Fixes #1572
2018-11-12 17:09:07 -05:00
Dan Sinclair
70661b9c08
Handle potentially uninitialized result
2018-11-12 13:56:52 -05:00
John Kessenich
d509a5eec6
Merge pull request #1569 from amdrexu/bugfix
...
Fix parser issue: redeclare gl_FragStencilRefARB is not supported
2018-11-12 09:01:35 -07:00
Rex Xu
7bf5fcc541
Fix parser issue: redeclare gl_FragStencilRefARB is not supported
2018-11-12 15:15:57 +08:00
Alejandro Piñeiro
adba7dfc68
ParseHelper: assign global XfbBuffer to a block missing it
...
If a block has assigned a XfbOffset it is assumed that it would
inherit the current global XfbBuffer. This commit fixes two use cases:
1) Getting the members of a Block with a XfbOffset to be assigned an
offset, as explained on GLSL 4.60 spec, section "4.4.2 Output
Layout Qualifiers", subsection "Transform Feedback Layout
Qualifiers".
2) Compute properly an error on overlapping ranges if a block is
assigned a XfbOffset and one of it members is assigned a explicit
one. This gets working because when the members of a block get
assigned a Offset/Buffer at fixBlockXfbOffsets, then the block is
deassigned the Offsets, so ranges are computed only with the block
members.
BTW, this is already done when redeclaring block builtins.
Fixes #1535
2018-11-10 11:35:50 +01:00
John Kessenich
918caa7ee4
Merge pull request #1547 from Igalia/apinheiro/xfb-struct-assignment
...
Apinheiro/xfb struct assignment
2018-11-09 12:27:39 -07:00
John Kessenich
685fccd97a
Merge pull request #1565 from greg-lunarg/kg25
...
Add DeadBranchElim before MergeReturn in legalization.
2018-11-08 21:08:54 -07:00
GregF
68fbda9862
Add DeadBranchElim before MergeReturn in legalization.
...
MergeReturn now requires this or could throw an error.
2018-11-08 10:35:45 -07:00
John Kessenich
4207c97b93
Fix #1563 : Corrupt token when an object macro miscalls a function macro
2018-11-07 18:25:56 -07:00
John Kessenich
4ee2f75294
PP: More clearly distinguish funtion-like and object-like macros
2018-11-07 17:22:17 -07:00
John Kessenich
0a339ec20c
Merge pull request #1564 from jeffbolznv/spirv-pch
...
Rename PCH macro to glslang_pch (to avoid name collision) and update to latest spirv-tools
2018-11-07 10:01:25 -07:00
Jeff Bolz
02ed310ac3
Rename PCH macro to glslang_pch (to avoid name collision) and update to latest spirv-tools
2018-11-07 09:35:31 -06:00
John Kessenich
8b782e77df
Tests: Add test for ways of calling no-argument macro with ().
2018-11-06 14:51:27 -07:00
John Kessenich
1c1c2d643a
Merge pull request #1559 from jeffbolznv/glslang_pch
...
Use precompiled headers for some glslang projects (MSVC-only)
2018-11-02 10:24:48 -06:00
John Kessenich
cdf7a85b14
Merge pull request #1557 from nicebyte/spec-const-decorations
...
Add names for composite spec constants in SPIR-V
2018-11-02 10:23:22 -06:00
Grigory Dzhavadyan
4c9876b34c
Add names for composite constants in SPIR-V
...
Consider the following code:
layout(constant_id=0) const int Y = 1;
layout(constant_id=1) const int Z = 2;
layout(constant_id=3) const int X = Y + Z;
Previously, it would produce SPIR-V decorations like this:
Decorate 21(Y) SpecId 1
Decorate 22 SpecId 3
Decorate 33(Z) SpecId 0
This seems inaccurate, since the spec constant `X` that is dependent on
the two others did not get a name in the SPIR-V decorations. This behavior
may potentially negatively affect shader introspection capabilities.
This change alters the behavior to always add a name, which results in the code
above producing the following decorations:
Decorate 21(Y) SpecId 1
Decorate 22(X) SpecId 3
Decorate 33(Z) SpecId 0
2018-11-02 00:45:12 -07:00
Jeff Bolz
22d0b7cbad
Use precompiled headers for some glslang projects
2018-10-31 15:38:08 -05:00
John Kessenich
a440fbb04f
Merge pull request #1543 from alelenv/nv-raytracing-final
...
Add support for nv_ray_tracing final
2018-10-31 12:00:36 -06:00
Ashwin Lele
ff1783db87
Multiple features and misc fixes for final raytracing non experimental version.
2018-10-31 07:55:24 -07:00
Alejandro Piñeiro
af8c1bdb16
ParseHelper: assign xfb_offset for struct members too
...
If the out variable is a struct type, with a xfb_offset explicitly
assigned, the members need to get their xfb_offset assigned. This is
specially relevant, as we cannot use layout qualifiers on struct
members.
2018-10-31 10:34:44 +01:00
John Kessenich
0ac199df32
Merge pull request #1558 from Kangz/fix_build_gn
...
BUILD.gn: remove reference to non-existent header
2018-10-30 17:17:11 -06:00
Corentin Wallez
ab5382cf79
BUILD.gn: remove reference to non-existent header
2018-10-30 16:11:46 +01:00
John Kessenich
b2b3d81e9b
Merge pull request #1556 from Kangz/msvc
...
Fix MSVC warning C4065: 'default' but no 'case' labels
2018-10-29 16:16:46 -06:00
Corentin Wallez
04a2fe93d0
Fix MSVC warning C4065: 'default' but no 'case' labels
...
This would happen in SpvPostProcess when we don't enable AMD extensions.
2018-10-29 16:24:00 +01:00
John Kessenich
f0928b3f56
Build: Pin googletest to a version that works with visual studio 2013.
2018-10-26 11:28:37 -06:00
John Kessenich
25ed3fce0c
Merge pull request #1542 from sheredom/fix_8bit_storagebuffer
...
Fix 8-bit storage nearly always using the UniformAndStorageBuffer8BitAccess capability.
2018-10-26 10:27:46 -06:00