Commit Graph

1324 Commits

Author SHA1 Message Date
danginsburg
5a69b675d6 Update gold results 2018-04-13 09:51:22 -04:00
John Kessenich
0f8d43e505 GLSL/Vulkan: Enforce no location aliasing in vertex inputs. 2018-04-12 11:37:57 -06:00
John Kessenich
e891afacf4 GLSL: Fix #1330: default outputs for GL_NV_geometry_shader_passthrough 2018-04-10 22:01:19 -06:00
John Kessenich
6ae18707f9 HLSL: Fix #1332: consistently use uint for counter buf typing. 2018-04-10 11:59:33 -06:00
John Kessenich
1dcd162399 GLSL/SPV: no location on atomic_uint; Fix #1339. 2018-04-09 17:21:30 -06:00
John Kessenich
b92ce60fc7 GLSL/SPV: Fix #1310: don't create unnecessary integer matrices. 2018-04-07 18:49:54 -06:00
John Kessenich
f52b63812a Fix #1331: Emit SPV_GOOGLE_hlsl_functionality1 for counters.
It was missing when there were no semantics.
2018-04-05 19:35:38 -06:00
John Kessenich
5611c6d27b GLSL/SPV: Implement SPV_EXT_descriptor_indexing and GL_EXT_nonuniform_qualifier 2018-04-05 11:25:02 -06:00
John Kessenich
6a4a427efe GLSL: Implement correct semantic checking for run-time sized arrays. 2018-04-02 14:52:15 -06:00
John Kessenich
5a867acad5 Linker: Fix #1329: correctly merge unsized arrays, and fix link tests. 2018-04-01 21:22:34 -06:00
Jeff Bolz
2abe9a4d34 Implement GL_NV_shader_subgroup_partitioned 2018-03-29 22:52:17 -05:00
GregF
fb03a55e0f Only print legalization warning if optimizer disabled 2018-03-29 13:17:54 -06:00
John Kessenich
7be36647fc
Merge pull request #1319 from KhronosGroup/array-rationalization
Array rationalization
2018-03-28 23:26:27 -06:00
John Kessenich
ead8622484 Non-functional. Rationalizations enabling future generalizations:
- Use much simpler method to update implicit array sizes.
  The previous overly complicated method was error prone.
- Rationalize all use of unsized arrays.
- Combine decorations when generating SPIR-V, to simplify
  adding extensions.
2018-03-28 18:01:20 -06:00
Rex Xu
ae06d1fe94 Add int16 support to AMD_trinary_minmax and AMD_shader_ballot 2018-03-28 16:33:01 +08:00
John Kessenich
643e57cddf
Merge pull request #1313 from greg-lunarg/kg15
Update SPIRV-Tools known good.
2018-03-27 00:46:18 -06:00
greg-lunarg
0b46c1edbf
Merge branch 'master' into kg15 2018-03-26 12:20:43 -06:00
GregF
eecb874c35 Update SPIRV-Tools known good.
Also update spirv-opt recipes.
2018-03-26 12:11:55 -06:00
John Kessenich
859b0342b8 Types: Fix #1290: Rationalize and correct "mixed" style array dimensioning.
There a couple functional problems, which when reduced down also led to
some good simplifications and rationalization.  So, this commit:
 - corrects "mixed" functionality: int[A] f[B] -> f[B][A]
 - correct multi-identifier decls: int[A] f[B], g[C] -> f and g are independently sized.
 - increases symmetry between different places in the code that do this
 - makes fewer ways to do the same thing; several methods are just gone now
 - makes more clear when something is copied or shared
2018-03-26 00:38:53 -06:00
John Kessenich
1c3ab274b1 Test Results Only: Include size in implicitly sized arrays (change to unsized).
This effects 60 tests, in a trivial way, but is critical to factor out this
noise from future planned changes.
2018-03-25 14:05:38 -06:00
Neil Roberts
1fe4a44759 Add locations to opaque types for OpenGL 2018-03-21 12:03:39 +01:00
John Kessenich
e7e081bda9 PP: don't give errors on some tokens under #if 0 (or similar).
Fixes #1295.

Tokens that are accepted by any version of HLSL or GLSL should be
allowed when #ifdef'd off, such that errors are not reported.
2018-03-19 00:43:18 -06:00
John Kessenich
5d610ee1dc Implement SPV_GOOGLE_hlsl_functionality1.
Enabled via -fhlsl_functionality1
2018-03-16 20:21:44 -06:00
John Kessenich
cd23a47566
Merge pull request #1291 from ben-clayton/add-nv-nopersp
Add support for GL_NV_shader_noperspective_interpolation
2018-03-16 15:50:38 -06:00
Ben Clayton
f648083365 Add tests for GL_NV_shader_noperspective_interpolation 2018-03-16 16:49:29 +00:00
John Kessenich
647fccaf2f AST: Fix shift conversions, which don't require matching types.
The base and shift amount need to be integers, but not of the same type.
This fixes #1296 and replaces #1297.
2018-03-15 21:11:36 -06:00
John Kessenich
137a24dffa AST: Remove convertToBasicType() which was obfuscating the conversion design.
Reinforces that conversion rules are operation-specific.
Side effect is that HLSL logical-operator conversions are more direct
(e.g. float -> bool, rather than float -> int -> bool).
2018-03-15 19:32:27 -06:00
Ben Clayton
017a567be1 Add support for GL_NV_shader_noperspective_interpolation 2018-03-13 15:55:18 +00:00
John Kessenich
e62d1baf3a Merge branch 'fixup_sm_60_wording' of https://github.com/sheredom/glslang into sheredom-fixup_sm_60_wording 2018-03-07 14:20:11 -07:00
John Kessenich
ac3707921e Revert the commits that change OpArrayLength type and bumped the version number.
Now, version 5.* is all connected to making the uint type, which doesn't quite work.
Generator versions 4 and 6 do not do this.
2018-03-07 11:48:25 -07:00
Neil Henning
fd920b3b6a WaveReadLaneFirst is the correct wording (was using WaveReadFirstLane previously...). 2018-03-07 17:04:20 +00:00
John Kessenich
66011cb2c2 SPV: Implement Vulkan 1.1 features and extensions. 2018-03-06 16:12:04 -07:00
John Kessenich
b2ae1d0521 Revert "Merge pull request #1274 from greg-lunarg/legal2"
This reverts commit 2c65069ecd, reversing
changes made to fa9b465b92.
2018-03-06 14:50:41 -07:00
John Kessenich
663b90d908 Build: Fix build issues with previous commit. 2018-03-06 14:20:16 -07:00
GregF
fd50f6a4c3 Legalization: Omit legalization warning when spirv-opt is linked. 2018-03-06 13:00:08 -07:00
John Kessenich
aa2295f1aa Merge branch 'bugfix' of https://github.com/amdrexu/glslang into amdrexu-bugfix 2018-03-03 11:52:58 -07:00
John Kessenich
0216f24f0e SPV: Bump up the generator number. 2018-03-03 11:47:07 -07:00
Rex Xu
e518772dc9 SPV: The result type of OpArrayLength should be UINT 2018-03-03 22:06:27 +08:00
Rex Xu
1e5d7b0b27 Implement the extension GL_AMD_gpu_shader_half_float_fetch
- Support new opaque types: f16sampler*, f16image*, f16subpassInput*.
- Add new built-in GLSL texture/image functions.
2018-03-02 16:48:03 +08:00
John Kessenich
d55fe86512 HLSL: Fix #1257: layout float1, int1, etc., as scalars. 2018-02-27 00:48:17 -07:00
John Kessenich
46413d5780 SPV: Fix #1258: cache constant structs by id, not opcode.
Constants were generally cached by type opcode, but all structures share the
same type opcode (OpTypeStruct), so they need to be cached by type id.
2018-02-26 19:35:39 -07:00
John Kessenich
9c9c4e90df GLSL/SPV: Fix #1196: Require resources to have layout(binding=X). 2018-02-22 11:47:41 -07:00
John Kessenich
2d9973de0e Tests: specExamples.vert is used twice, it needs two different output names. 2018-02-21 18:42:10 -07:00
John Kessenich
4bee531fc1 HLSL: Fix #1249: Always execute both sides of ternary "?:".
This is semantically required by HLSL, and frequently results in using
OpSelect instead of control flow.
2018-02-20 21:32:33 -07:00
LoopDawg
4425f245a5 HLSL: Add conversions for image ops during SPV construction
HLSL allows image and texture types to be templatized on sub-vec4 types,
or even structures.  This was mostly handled already during creation of
sampling operations.  However, for operator[] which can generate image
loads, this wasn't happening.

It also isn't very easy to do at that point in time, because operator[]
does not know where the results it produces will end up.  They may be
an lvalue or an rvalue, and there's a post-process to convert loads to
stores.  They may end up in atomic ops.

To bypass that difficulty, GlslangToSpv now looks for this case and
adds the appropriate conversion.  LIMITATION: this only works for
cases for which a simple conversion opcode suffices.  That is to say,
it will not work if the type is templatized on a struct.
2018-02-18 13:13:36 -07:00
John Kessenich
b587fb6208 GLSL: Fix #1247. Remove extraneous *= matrix test. 2018-02-15 12:22:25 -07:00
John Kessenich
23ea3db3e5 Warning for #pragma once. GLSL and HLSL. Addresses #824. 2018-02-11 23:23:22 -07:00
David Neto
497d5ffefd Update SPIRV-Tools known-good
One legalization case updated for a renumbered ID
2018-02-09 13:20:45 -05:00
John Kessenich
71b5da60d0 SPV: Bump up generator number, because previous commit changes code gen slightly. 2018-02-06 08:06:36 -07:00
John Kessenich
5c3eed542d SPV: Create more access chains addressing a few swizzling issues.
- Fixes #1233
- Treats local bools like anything else
- more consistently deals with a dynamic component selection
2018-02-06 07:24:12 -07:00