John Kessenich [Tue, 27 Mar 2018 06:46:18 +0000 (00:46 -0600)]
Merge pull request #1313 from greg-lunarg/kg15
Update SPIRV-Tools known good.
John Kessenich [Mon, 26 Mar 2018 18:35:25 +0000 (12:35 -0600)]
Merge pull request #1312 from KhronosGroup/fix-mixed-array-styles
Fix mixed array styles
greg-lunarg [Mon, 26 Mar 2018 18:20:43 +0000 (12:20 -0600)]
Merge branch 'master' into kg15
GregF [Mon, 26 Mar 2018 18:11:55 +0000 (12:11 -0600)]
Update SPIRV-Tools known good.
Also update spirv-opt recipes.
John Kessenich [Mon, 26 Mar 2018 06:38:53 +0000 (00:38 -0600)]
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
John Kessenich [Sun, 25 Mar 2018 17:46:06 +0000 (11:46 -0600)]
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.
John Kessenich [Fri, 23 Mar 2018 05:54:04 +0000 (23:54 -0600)]
Non functional: add EshTargetClientVersion alias for EShTargetClientVersion.
Fixes #1304.
John Kessenich [Fri, 23 Mar 2018 05:44:11 +0000 (23:44 -0600)]
Non-functional: always return value from makeFpConstant().
Should fix #1308.
John Kessenich [Wed, 21 Mar 2018 17:19:12 +0000 (11:19 -0600)]
Merge pull request #1306 from Igalia/uniform-aml-v2
Improve --auto-map-locations for uniforms (v2)
John Kessenich [Wed, 21 Mar 2018 16:35:59 +0000 (10:35 -0600)]
Merge pull request #1305 from amdrexu/bugfix
Add additional error check for fragment shader outputs
Neil Roberts [Mon, 19 Mar 2018 22:28:19 +0000 (23:28 +0100)]
Take into account the number of locations taken up by a uniform
When assigning uniform locations it now takes into account the number
of locations occupied by the type. For uniforms, all types except
arrays and structs take up one location. For arrays the base location
count is multiplied by the array dimensions and for structs it is the
sum of the locations of each member.
Neil Roberts [Mon, 19 Mar 2018 19:05:40 +0000 (20:05 +0100)]
Add locations to opaque types for OpenGL
Rex Xu [Wed, 21 Mar 2018 07:27:38 +0000 (15:27 +0800)]
Add additional error check for fragment shader outputs
Int64 and uint64 are disallowed as fragment shader outputs, similar to
double.
John Kessenich [Mon, 19 Mar 2018 07:11:04 +0000 (01:11 -0600)]
Bump patch version.
John Kessenich [Mon, 19 Mar 2018 07:09:51 +0000 (01:09 -0600)]
Merge pull request #1302 from KhronosGroup/cpp-relax-skiptokens-errors
PP: don't give errors on some tokens under #if 0 (or similar).
John Kessenich [Mon, 19 Mar 2018 06:43:18 +0000 (00:43 -0600)]
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.
John Kessenich [Sat, 17 Mar 2018 02:41:52 +0000 (20:41 -0600)]
Merge pull request #1282 from KhronosGroup/hlslFunctionality1
WIP: Implement SPV_GOOGLE_hlsl_functionality1.
John Kessenich [Thu, 8 Mar 2018 01:05:55 +0000 (18:05 -0700)]
Implement SPV_GOOGLE_hlsl_functionality1.
Enabled via -fhlsl_functionality1
John Kessenich [Fri, 16 Mar 2018 21:50:38 +0000 (15:50 -0600)]
Merge pull request #1291 from ben-clayton/add-nv-nopersp
Add support for GL_NV_shader_noperspective_interpolation
John Kessenich [Fri, 16 Mar 2018 17:52:10 +0000 (11:52 -0600)]
Bump patch version.
John Kessenich [Fri, 16 Mar 2018 17:30:09 +0000 (11:30 -0600)]
Merge pull request #1299 from KhronosGroup/fix-conversions
Fix conversions
Ben Clayton [Fri, 16 Mar 2018 13:15:48 +0000 (13:15 +0000)]
Add tests for GL_NV_shader_noperspective_interpolation
John Kessenich [Fri, 16 Mar 2018 05:49:59 +0000 (23:49 -0600)]
Merge pull request #1289 from Igalia/igalia/dmat-scalar-division
Use the correct type for the constant for matrix/scalar division
John Kessenich [Fri, 16 Mar 2018 03:07:35 +0000 (21:07 -0600)]
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.
John Kessenich [Fri, 16 Mar 2018 01:52:33 +0000 (19:52 -0600)]
Non-functional: Rationalize operators handled by the split addConversion() functions.
Historically, addConversion() was split to handle binary node <-> node conversions
from non-binary node -> type conversions. However, the split wasn't entirely clean
WRT HLSL design and left duplication of case statements, which are misleading, and
this commit cleans up.
John Kessenich [Fri, 16 Mar 2018 01:14:47 +0000 (19:14 -0600)]
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).
John Kessenich [Wed, 14 Mar 2018 07:05:56 +0000 (01:05 -0600)]
Merge pull request #1294 from dgkoch/dgkoch_build_fixes4
Fix build several build errors
Daniel Koch [Tue, 13 Mar 2018 21:06:51 +0000 (17:06 -0400)]
Fix build several build errors
glslang/SPIRV/SpvBuilder.cpp:2533:27: error: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [-Werror,-Wsign-compare]
for (int c = 0; c < accessChain.swizzle.size(); ++c)
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
glslang/hlsl/hlslParseHelper.cpp:69:5: error: field 'cullDistanceInput' will be initialized after field 'clipDistanceOutput' [-Werror,-Wreorder]
cullDistanceInput(nullptr),
^
1 error generated.
glslang/glslang/MachineIndependent/attribute.cpp:85:16: error: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [-Werror,-Wsign-compare]
if (argNum >= args->getSequence().size())
~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
John Kessenich [Tue, 13 Mar 2018 20:32:56 +0000 (14:32 -0600)]
Merge pull request #1293 from baldurk/remove-en-dash
Replace en-dash with simple ASCII hyphen
Baldur Karlsson [Tue, 13 Mar 2018 19:53:30 +0000 (19:53 +0000)]
Replace en-dash with simple ASCII hyphen
* This means the source file is ASCII instead of (assumed) UTF-8 and
doesn't cause warnings when compiling on non-western codepages.
Ben Clayton [Mon, 12 Mar 2018 15:12:38 +0000 (15:12 +0000)]
Add support for GL_NV_shader_noperspective_interpolation
Neil Roberts [Tue, 13 Mar 2018 09:57:59 +0000 (10:57 +0100)]
Use the correct type for the constant for matrix/scalar division
When a matrix is divided by a scalar it tries to take the reciprocal
of the scalar to convert the operation into a multiply. However it was
always doing this by making a 32-bit constant. If the scalar is a
double then this would end up making an FDiv instruction with
different types in the operands.
This patch adds a helper method called makeFpConstant which makes a
floating-point constant of the given type. The code to take the
reciprocal now uses it to make the same type as the result.
Fixes https://github.com/KhronosGroup/glslang/issues/1278
John Kessenich [Mon, 12 Mar 2018 18:42:27 +0000 (12:42 -0600)]
Merge pull request #1286 from greg-lunarg/kg14
Update known_good to SPIR-V 1.3 support
John Kessenich [Mon, 12 Mar 2018 18:41:56 +0000 (12:41 -0600)]
Merge pull request #1288 from amdrexu/bugfix
HLSL: Correct some mistakes for min16 types
John Kessenich [Mon, 12 Mar 2018 18:39:00 +0000 (12:39 -0600)]
Merge pull request #1287 from eintw1ck/master
include/Common.h: reorder includes to avoid redefinition on some platforms
Rex Xu [Mon, 12 Mar 2018 15:15:11 +0000 (23:15 +0800)]
HLSL: Correct some mistakes for min16 types
- Add missing constructor ops to support float16/int16/uint16 types
- Allow half float literals
- Correct two errors of double literal parse in HLSL: extension check and
postfix
Josh de Kock [Sun, 11 Mar 2018 19:48:48 +0000 (19:48 +0000)]
include/Common.h: reorder includes to avoid redefinition on some platforms
On some systems sstream defines snprintf, this leads to the a redefinition of sprintf_s if snprintf is defined before checking if it exists in sstream.
GregF [Sat, 10 Mar 2018 00:51:11 +0000 (17:51 -0700)]
Increment minor version to 4
GregF [Sat, 10 Mar 2018 00:45:57 +0000 (17:45 -0700)]
Update known_good to SPIR-V 1.3 support
John Kessenich [Thu, 8 Mar 2018 17:55:02 +0000 (10:55 -0700)]
Merge pull request #1283 from siavashserver/fix-memory-leak
Fix memory leak upon ProcessDeferred failure.
John Kessenich [Thu, 8 Mar 2018 17:24:32 +0000 (10:24 -0700)]
Merge pull request #1284 from amdrexu/bugfix
Allow --hlsl-enable-16bit-types to be used without AMD_EXTENSIONS
Rex Xu [Thu, 8 Mar 2018 14:17:04 +0000 (22:17 +0800)]
Allow --hlsl-enable-16bit-types to be used without AMD_EXTENSIONS
siavashserver [Thu, 8 Mar 2018 05:43:36 +0000 (09:13 +0330)]
Fix memory leak upon ProcessDeferred failure.
John Kessenich [Wed, 7 Mar 2018 21:31:57 +0000 (14:31 -0700)]
Merge pull request #1269 from bkaradzic/master
Fixed GCC+Clang errors and warnings on Linux and OSX.
John Kessenich [Wed, 7 Mar 2018 21:30:40 +0000 (14:30 -0700)]
Merge branch 'amdrexu-feature'
John Kessenich [Wed, 7 Mar 2018 21:29:09 +0000 (14:29 -0700)]
Merge branch 'feature' of https://github.com/amdrexu/glslang into amdrexu-feature
John Kessenich [Wed, 7 Mar 2018 21:26:08 +0000 (14:26 -0700)]
Merge branch 'amdrexu-bugfix'
John Kessenich [Wed, 7 Mar 2018 21:25:14 +0000 (14:25 -0700)]
Merge branch 'bugfix' of https://github.com/amdrexu/glslang into amdrexu-bugfix
John Kessenich [Wed, 7 Mar 2018 21:20:42 +0000 (14:20 -0700)]
Merge branch 'sheredom-fixup_sm_60_wording'
John Kessenich [Wed, 7 Mar 2018 21:20:11 +0000 (14:20 -0700)]
Merge branch 'fixup_sm_60_wording' of https://github.com/sheredom/glslang into sheredom-fixup_sm_60_wording
John Kessenich [Wed, 7 Mar 2018 18:24:50 +0000 (11:24 -0700)]
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.
Neil Henning [Wed, 7 Mar 2018 17:04:20 +0000 (17:04 +0000)]
WaveReadLaneFirst is the correct wording (was using WaveReadFirstLane previously...).
John Kessenich [Wed, 7 Mar 2018 16:26:43 +0000 (09:26 -0700)]
Merge pull request #1277 from KhronosGroup/Vulkan_1_1
SPV: Implement Vulkan 1.1 features and extensions.
Rex Xu [Wed, 7 Mar 2018 09:22:41 +0000 (17:22 +0800)]
Add more error checks for swizzleInvocations{Masked}AMD()
Rex Xu [Wed, 7 Mar 2018 05:10:01 +0000 (13:10 +0800)]
HLSL: Map min types to GLSL 16-bit types
Branimir Karadžić [Wed, 7 Mar 2018 04:11:46 +0000 (20:11 -0800)]
Fixed ifdef.
John Kessenich [Tue, 6 Mar 2018 23:12:04 +0000 (16:12 -0700)]
SPV: Implement Vulkan 1.1 features and extensions.
John Kessenich [Tue, 6 Mar 2018 21:48:46 +0000 (14:48 -0700)]
Revert "Merge pull request #1274 from greg-lunarg/legal2"
This reverts commit
2c65069ecdbc41dc16580ff58d9d99a2e80ac9ce, reversing
changes made to
fa9b465b92b7e043623ef24d9002aacb32fab0d8.
John Kessenich [Tue, 6 Mar 2018 21:20:16 +0000 (14:20 -0700)]
Build: Fix build issues with previous commit.
John Kessenich [Tue, 6 Mar 2018 20:17:04 +0000 (13:17 -0700)]
Merge pull request #1274 from greg-lunarg/legal2
Legalization: Omit legalization warning when spirv-opt is linked.
John Kessenich [Tue, 6 Mar 2018 20:08:19 +0000 (13:08 -0700)]
Versioning: Bump to minor version 1, for new SPIRV-Tools update.
GregF [Mon, 5 Mar 2018 21:34:15 +0000 (14:34 -0700)]
Legalization: Omit legalization warning when spirv-opt is linked.
John Kessenich [Tue, 6 Mar 2018 18:12:04 +0000 (11:12 -0700)]
Merge pull request #1263 from greg-lunarg/kg12
Update spirv-tools known_good
John Kessenich [Tue, 6 Mar 2018 08:02:13 +0000 (01:02 -0700)]
Merge pull request #1272 from amdrexu/bugfix
Add more error checks for interpolateAtVertexAMD()
Rex Xu [Tue, 6 Mar 2018 07:01:40 +0000 (15:01 +0800)]
Add more error checks for interpolateAtVertexAMD()
John Kessenich [Tue, 6 Mar 2018 05:23:17 +0000 (22:23 -0700)]
Versioning: Address #1255: Move to semantic versioning.
Still missing is automation and final decisions on mechanisms in general.
Branimir Karadžić [Sat, 3 Mar 2018 21:04:12 +0000 (13:04 -0800)]
Fixed GCC+Clang errors and warnings on Linux and OSX.
John Kessenich [Sat, 3 Mar 2018 18:53:41 +0000 (11:53 -0700)]
Merge branch 'amdrexu-bugfix'
John Kessenich [Sat, 3 Mar 2018 18:52:58 +0000 (11:52 -0700)]
Merge branch 'bugfix' of https://github.com/amdrexu/glslang into amdrexu-bugfix
John Kessenich [Sat, 3 Mar 2018 18:47:07 +0000 (11:47 -0700)]
SPV: Bump up the generator number.
Rex Xu [Fri, 2 Mar 2018 09:09:23 +0000 (17:09 +0800)]
SPV: The result type of OpArrayLength should be UINT
John Kessenich [Sat, 3 Mar 2018 01:17:42 +0000 (18:17 -0700)]
Non-functional: Make the vulkan version number meaning be only 0 or not 0.
John Kessenich [Fri, 2 Mar 2018 19:36:02 +0000 (12:36 -0700)]
Non-functional: Move to latest headers.
John Kessenich [Fri, 2 Mar 2018 18:23:15 +0000 (11:23 -0700)]
Merge pull request #1266 from amdrexu/feature
Implement the extension GL_AMD_gpu_shader_half_float_fetch
John Kessenich [Fri, 2 Mar 2018 16:41:22 +0000 (09:41 -0700)]
Merge pull request #1268 from amdrexu/bugfix2
Fix issues of SPIRV headers
Rex Xu [Fri, 2 Mar 2018 09:42:37 +0000 (17:42 +0800)]
Fix issues of SPIRV headers
Rex Xu [Tue, 29 Nov 2016 09:36:31 +0000 (17:36 +0800)]
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.
John Kessenich [Fri, 2 Mar 2018 08:09:28 +0000 (01:09 -0700)]
Fix typo.
John Kessenich [Wed, 28 Feb 2018 23:12:37 +0000 (16:12 -0700)]
Merge pull request #1264 from dneto0/typo-client-version
Fix typo in help for -V<bad-number>
John Kessenich [Wed, 28 Feb 2018 23:11:43 +0000 (16:11 -0700)]
Merge pull request #1265 from davidhubbard/master
EShLangFragment falls through to EShLangCompute, only #ifndef AMD_EXTENSIONS.
davidhubbard [Wed, 28 Feb 2018 17:29:04 +0000 (11:29 -0600)]
TBuiltIns::identifyBuiltIns: EShLangFragment fallthrough
EShLangFragment falls through to EShLangCompute, only #ifndef AMD_EXTENSIONS.
This is probably a bug.
David Neto [Wed, 28 Feb 2018 02:55:23 +0000 (21:55 -0500)]
Fix typo in help for -V<bad-number>
John Kessenich [Tue, 27 Feb 2018 20:23:08 +0000 (13:23 -0700)]
IO mapper: Fix #1261: Supply location mapper with size computer.
This factored computeTypeLocationSize() out of needing the TIntermediate contents,
and uses it to show how to know how many locations an object needs.
However, it still does not do cross stage, or mixed location/no-location
analysis.
GregF [Tue, 27 Feb 2018 18:26:21 +0000 (11:26 -0700)]
Update spirv-tools known_good
Contains the following improvements:
Fixes 1341: Atomics (and other instructions with side-effects) removed.
Add folding for redundant add/sub/mul/div/mix operations
Add constant folding rules for floating-point comparison
Add folding of redundant OpSelect insns
Add folding of OpCompositeExtract and OpConstantComposite
John Kessenich [Tue, 27 Feb 2018 07:48:17 +0000 (00:48 -0700)]
HLSL: Fix #1257: layout float1, int1, etc., as scalars.
John Kessenich [Tue, 27 Feb 2018 02:20:05 +0000 (19:20 -0700)]
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.
John Kessenich [Fri, 23 Feb 2018 02:36:18 +0000 (19:36 -0700)]
SPV: Complete OpModuleProcessed implementation, enabled by have 1.2 headers.
John Kessenich [Thu, 22 Feb 2018 19:58:29 +0000 (12:58 -0700)]
Merge pull request #1256 from KhronosGroup/require-binding
GLSL/SPV: Fix #1196: Require resources to have layout(binding=X).
John Kessenich [Thu, 22 Feb 2018 01:19:49 +0000 (18:19 -0700)]
GLSL/SPV: Fix #1196: Require resources to have layout(binding=X).
John Kessenich [Thu, 22 Feb 2018 01:42:10 +0000 (18:42 -0700)]
Tests: specExamples.vert is used twice, it needs two different output names.
John Kessenich [Wed, 21 Feb 2018 16:09:01 +0000 (09:09 -0700)]
Merge pull request #1253 from KhronosGroup/hlsl-ternary-select
HLSL: Fix #1249: Always execute both sides of ternary "?:".
John Kessenich [Wed, 21 Feb 2018 04:29:05 +0000 (21:29 -0700)]
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.
John Kessenich [Tue, 20 Feb 2018 01:28:24 +0000 (18:28 -0700)]
Merge pull request #1250 from LoopDawg/image-fetch-conversion
HLSL: Add conversions for image ops during SPV construction
LoopDawg [Sun, 18 Feb 2018 18:40:01 +0000 (11:40 -0700)]
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.
John Kessenich [Thu, 15 Feb 2018 19:22:25 +0000 (12:22 -0700)]
GLSL: Fix #1247. Remove extraneous *= matrix test.
John Kessenich [Thu, 15 Feb 2018 18:18:22 +0000 (11:18 -0700)]
Merge pull request #1246 from amdrexu/bugfix
Fix an issue of interpolateAtVertexAMD().
Rex Xu [Wed, 14 Feb 2018 03:42:34 +0000 (11:42 +0800)]
Fix an issue of interpolateAtVertexAMD().
An error message should be reported if the interpolant is not an input.
John Kessenich [Mon, 12 Feb 2018 05:04:45 +0000 (22:04 -0700)]
Warning for #pragma once. GLSL and HLSL. Addresses #824.
John Kessenich [Sat, 10 Feb 2018 01:17:49 +0000 (18:17 -0700)]
Merge pull request #1244 from dneto0/update-spirv-tools
Update SPIRV-Tools known-good
John Kessenich [Sat, 10 Feb 2018 01:17:24 +0000 (18:17 -0700)]
Merge pull request #1243 from greg-lunarg/kg11
Upgrade update_glslang_sources.py to work with other sites