platform/upstream/glslang.git
7 years agoSPV: Tighten up number of struct-types declared based on decoration.
John Kessenich [Thu, 1 Sep 2016 23:05:23 +0000 (17:05 -0600)]
SPV: Tighten up number of struct-types declared based on decoration.

Takes some pressure off of issue #304.
Structures don't inherit locations and then explicitly decorate
members with them, so removed this reason to have another instance
of a structure type.

7 years agoFront-ends: Remove now defunct afterEOF and related, use scanner's instead.
John Kessenich [Wed, 31 Aug 2016 19:43:51 +0000 (13:43 -0600)]
Front-ends: Remove now defunct afterEOF and related, use scanner's instead.

Code using atEndOfFile was dead, instead do something useful with
the scanners atEndOfInput().  This allows a better error message
for early termination of cascading errors.

7 years agoHLSL: Start location numbering with the entry-point return value.
John Kessenich [Tue, 30 Aug 2016 00:10:47 +0000 (18:10 -0600)]
HLSL: Start location numbering with the entry-point return value.

Also, increment location numbers by the size of the objects.

7 years agoHLSL: Remove recent change to put locations on SV_TARGET*.
John Kessenich [Mon, 29 Aug 2016 22:49:39 +0000 (16:49 -0600)]
HLSL: Remove recent change to put locations on SV_TARGET*.

This put locations on members of structures, which is not allowed
in either AST or SPIR-V.

This was caught by asserts in the debug build.

7 years agoHLSL: Create test results for the previous commits.
John Kessenich [Mon, 29 Aug 2016 22:34:12 +0000 (16:34 -0600)]
HLSL: Create test results for the previous commits.

7 years agoMerge branch 'dankbaker-HLSL_Semantic_Mapping'
John Kessenich [Mon, 29 Aug 2016 22:08:22 +0000 (16:08 -0600)]
Merge branch 'dankbaker-HLSL_Semantic_Mapping'

7 years agoMerge branch 'HLSL_Semantic_Mapping' of https://github.com/dankbaker/glslang into...
John Kessenich [Mon, 29 Aug 2016 22:07:29 +0000 (16:07 -0600)]
Merge branch 'HLSL_Semantic_Mapping' of https://github.com/dankbaker/glslang into dankbaker-HLSL_Semantic_Mapping

7 years agoMerge pull request #490 from KhronosGroup/hlsl-output-return
John Kessenich [Mon, 29 Aug 2016 21:43:21 +0000 (15:43 -0600)]
Merge pull request #490 from KhronosGroup/hlsl-output-return

HLSL: Emulate write-to-output on return-from-entry-point, for return …

7 years agoHLSL: Setting SV_DEPTHGREATEREQUAL and SV_DEPTHLESSEQUAL to EbvFragDepth for now
Dan Baker [Mon, 29 Aug 2016 19:56:55 +0000 (15:56 -0400)]
HLSL: Setting SV_DEPTHGREATEREQUAL and SV_DEPTHLESSEQUAL to EbvFragDepth for now

7 years agoMerge branch 'hlsl-output-return' of github.com:KhronosGroup/glslang into hlsl-output...
John Kessenich [Mon, 29 Aug 2016 02:13:36 +0000 (20:13 -0600)]
Merge branch 'hlsl-output-return' of github.com:KhronosGroup/glslang into hlsl-output-return

7 years agoHLSL: Emulate write-to-output on return-from-entry-point, for return value.
John Kessenich [Sun, 28 Aug 2016 21:00:23 +0000 (15:00 -0600)]
HLSL: Emulate write-to-output on return-from-entry-point, for return value.

This fixes issue #487 and #480.
It also correctly handles output parameters from the entry point.

7 years agoHLSL: Emulate write-to-output on return-from-entry-point, for return value.
John Kessenich [Sun, 28 Aug 2016 21:00:23 +0000 (15:00 -0600)]
HLSL: Emulate write-to-output on return-from-entry-point, for return value.

This fixes issue #487 and #480.
It also correctly handles output parameters from the entry point.

7 years agoNon-functional: Add some missing const, related to signature selection. upstream/0.1
John Kessenich [Fri, 26 Aug 2016 20:01:43 +0000 (14:01 -0600)]
Non-functional: Add some missing const, related to signature selection.

7 years agoMerge pull request #488 from antiagainst/c4996-warning
John Kessenich [Fri, 26 Aug 2016 19:16:30 +0000 (13:16 -0600)]
Merge pull request #488 from antiagainst/c4996-warning

Disable C4996 (secure CRT) recommendation on Windows for strtok().

7 years agoDisable C4996 (secure CRT) recommendation on Windows for strtok().
Lei Zhang [Fri, 26 Aug 2016 18:43:14 +0000 (14:43 -0400)]
Disable C4996 (secure CRT) recommendation on Windows for strtok().

strtok_s() is suggested by MSVC, but it has different signature
than the C11 standard one. So we just turn off the recommendation
here.

7 years agoMerge pull request #473 from steve-lunarg/remapper-tests
John Kessenich [Fri, 26 Aug 2016 17:32:54 +0000 (11:32 -0600)]
Merge pull request #473 from steve-lunarg/remapper-tests

SPV Remapper: add remapper test framework

7 years agoHLSL: Include shape-changing conversions in overloaded signature selection.
John Kessenich [Thu, 25 Aug 2016 21:57:56 +0000 (15:57 -0600)]
HLSL: Include shape-changing conversions in overloaded signature selection.

This also enables vecN -> vec1 shape conversions for all places doing shape
conversions.

For signature selection, makes shape changes worse than any other comparison
when deciding what conversions are better than others.

7 years agoHLSL: Format updates and some minor adjustments to SV_ handling
Dan Baker [Thu, 25 Aug 2016 21:13:25 +0000 (17:13 -0400)]
HLSL: Format updates and some minor adjustments to SV_ handling

7 years agoHLSL: Allow arbitrary baseType -> baseType conversion of calling arguments.
John Kessenich [Thu, 25 Aug 2016 16:49:21 +0000 (10:49 -0600)]
HLSL: Allow arbitrary baseType -> baseType conversion of calling arguments.

This also puts a stake in the ground as to which is better when selection
from multiple signatures.

7 years agoWIP: SPV Remapper: add remapper test framework
steve-lunarg [Wed, 17 Aug 2016 22:18:06 +0000 (16:18 -0600)]
WIP: SPV Remapper: add remapper test framework

7 years agoFirst stab at system value interpretation
Dan Baker [Thu, 25 Aug 2016 15:59:17 +0000 (11:59 -0400)]
First stab at system value interpretation

7 years agoMerge pull request #483 from steve-lunarg/precise-fix-2
John Kessenich [Thu, 25 Aug 2016 15:32:19 +0000 (09:32 -0600)]
Merge pull request #483 from steve-lunarg/precise-fix-2

HLSL: add precise keyword

7 years agoHLSL: add precise keyword
steve-lunarg [Thu, 25 Aug 2016 05:49:36 +0000 (23:49 -0600)]
HLSL: add precise keyword

7 years agoHLSL: Switch to generic selector, but using GLSL #version 400 rules.
John Kessenich [Thu, 25 Aug 2016 00:34:43 +0000 (18:34 -0600)]
HLSL: Switch to generic selector, but using GLSL #version 400 rules.

Next step is to modify for HLSL rules.

7 years agoMerge branch 'overloaded-400' of github.com:KhronosGroup/glslang
John Kessenich [Wed, 24 Aug 2016 00:20:19 +0000 (18:20 -0600)]
Merge branch 'overloaded-400' of github.com:KhronosGroup/glslang

7 years agoFront-end: Warn for likely missed change in default precisions.
John Kessenich [Wed, 3 Aug 2016 23:35:19 +0000 (17:35 -0600)]
Front-end: Warn for likely missed change in default precisions.

This is part of the change to have desktop shaders respect precision
qualifiers on Vulkan, but since the defaults are all highp, and that's
different from ES fragment shaders, detect likely cases and warn about
them (but being careful to not be too noisy if it's unlikely to be a
problem).

7 years agoVulkan: Have desktop shaders respect precision qualifiers.
John Kessenich [Wed, 3 Aug 2016 22:41:53 +0000 (16:41 -0600)]
Vulkan: Have desktop shaders respect precision qualifiers.

Sets highp defaults for the appropriate types, for all stages,
and turns on precision qualifiers for non-ES shaders.  Required
fixing some qualifier orders for desktop built-in declarations
for pre-420 shaders.

7 years agoFront-End: Non-ES trigger for processing precision qualifiers.
John Kessenich [Wed, 3 Aug 2016 21:19:37 +0000 (15:19 -0600)]
Front-End: Non-ES trigger for processing precision qualifiers.

Initially non-functional: Have an independent test for whether to obey
precision qualifiers other than whether the profile is es.

7 years agoNon-functional: Fix commit 98f164ec488f85af5a44b701477a34e810f2deb1.
John Kessenich [Tue, 23 Aug 2016 23:51:13 +0000 (17:51 -0600)]
Non-functional: Fix commit 98f164ec488f85af5a44b701477a34e810f2deb1.

Fix previous commit to not use tabs and otherwise match local coding
conventions better.

7 years agoMerge pull request #461 from dankbaker/Error_Message_Fixes_for_HLSL
John Kessenich [Tue, 23 Aug 2016 23:48:14 +0000 (17:48 -0600)]
Merge pull request #461 from dankbaker/Error_Message_Fixes_for_HLSL

HLSL: Better error message for when HLSL translation fails

7 years agoMerge pull request #476 from steve-lunarg/string-literals
John Kessenich [Tue, 23 Aug 2016 23:41:54 +0000 (17:41 -0600)]
Merge pull request #476 from steve-lunarg/string-literals

HLSL: Support string literals, e.g, for annotations

7 years agoMerge pull request #477 from amdrexu/bugfix
John Kessenich [Tue, 23 Aug 2016 23:40:53 +0000 (17:40 -0600)]
Merge pull request #477 from amdrexu/bugfix

SPV: Some group invocation operations should be applied to scalars.

7 years agoSPV: Some group invocation operations should be applied to scalars.
Rex Xu [Tue, 23 Aug 2016 07:41:05 +0000 (15:41 +0800)]
SPV: Some group invocation operations should be applied to scalars.

7 years agoHLSL: Add EHTokStringConstant, so that string attributes may be parsed
steve-lunarg [Mon, 22 Aug 2016 22:13:47 +0000 (16:13 -0600)]
HLSL: Add EHTokStringConstant, so that string attributes may be parsed

7 years agoFront-end: Add a function selector under implicit type conversion.
John Kessenich [Fri, 19 Aug 2016 13:31:31 +0000 (07:31 -0600)]
Front-end: Add a function selector under implicit type conversion.

Use the new function selector for #version 400 and above,
parameterized for the GLSL #version 400 selection rules.

This can be used for both GLSL and HLSL, and other languages
as well.

7 years agoHLSL and standalone, modifying Standalone to send filename as string source, and...
dankbaker [Sun, 21 Aug 2016 16:29:08 +0000 (12:29 -0400)]
HLSL and standalone, modifying Standalone to send filename as string source, and HLSL backend will use this to print a better error mesage when things fail

7 years agoFront-end/Non-functional: Add some const/auto, useful for upcoming changes.
John Kessenich [Fri, 19 Aug 2016 13:27:28 +0000 (07:27 -0600)]
Front-end/Non-functional: Add some const/auto, useful for upcoming changes.

7 years agoHLSL: Partially address issue #463: accept GLSL layout(...).
John Kessenich [Wed, 17 Aug 2016 16:22:08 +0000 (10:22 -0600)]
HLSL: Partially address issue #463: accept GLSL layout(...).

This includes all "per variable" layout qualifiers, but the
key ones mattering and tested for now are:
  set=
  binding=
  constant_id=
  push_constant

7 years agoMerge pull request #471 from steve-lunarg/remapper-literal64-b
John Kessenich [Wed, 17 Aug 2016 15:23:46 +0000 (09:23 -0600)]
Merge pull request #471 from steve-lunarg/remapper-literal64-b

SPIRV remapper: allow 64 bit literals in OperandVariableLiteralI…

7 years agoWIP: SPIRV remapper: allow 64 bit literals in OperandVariableLiteralId class iteration
steve-lunarg [Wed, 17 Aug 2016 14:33:49 +0000 (08:33 -0600)]
WIP: SPIRV remapper: allow 64 bit literals in OperandVariableLiteralId class iteration

7 years agoMerge pull request #467 from dankbaker/HLSL_Changing_defualt_language
John Kessenich [Mon, 15 Aug 2016 21:14:55 +0000 (15:14 -0600)]
Merge pull request #467 from dankbaker/HLSL_Changing_defualt_language

HLSL: changing SPIRV defualt language for HLSL to unknown

7 years agoUpdating tests, sadly every single HLSL test needs updating becuase of the language...
Dan Baker [Mon, 15 Aug 2016 20:25:55 +0000 (16:25 -0400)]
Updating tests, sadly every single HLSL test needs updating becuase of the language identifier

7 years agoHLSL: Changing SPIRV source language to unkown
Dan Baker [Mon, 15 Aug 2016 20:05:45 +0000 (16:05 -0400)]
HLSL: Changing SPIRV source language to unkown

7 years agoMerge pull request #466 from baldurk/minor-msvc-warning-fix
John Kessenich [Mon, 15 Aug 2016 16:47:28 +0000 (10:47 -0600)]
Merge pull request #466 from baldurk/minor-msvc-warning-fix

fix x64 warning about conversion size_t -> int

7 years agofix x64 warning about conversion size_t -> int
baldurk [Mon, 15 Aug 2016 16:01:15 +0000 (18:01 +0200)]
fix x64 warning about conversion size_t -> int

7 years agoMerge pull request #458 from dneto0/revert-remap-64bit-patch
John Kessenich [Fri, 12 Aug 2016 21:02:40 +0000 (15:02 -0600)]
Merge pull request #458 from dneto0/revert-remap-64bit-patch

Revert "Merge pull request #456 from steve-lunarg/remapper-literal64"

7 years agoRevert "Merge pull request #456 from steve-lunarg/remapper-literal64"
David Neto [Fri, 12 Aug 2016 20:49:21 +0000 (16:49 -0400)]
Revert "Merge pull request #456 from steve-lunarg/remapper-literal64"

This reverts commit ad08b30f696267ec6243dd0ad68a3db889cd2d21, reversing
changes made to 28660bb580d4c61e16ef75008550a87b3be90b91.

This backs out the pull request
https://github.com/KhronosGroup/glslang/pull/456 because it introduced
several internal errors even on code that only uses 32-bit numeric
types.

7 years agoMerge pull request #456 from steve-lunarg/remapper-literal64
John Kessenich [Fri, 12 Aug 2016 17:33:19 +0000 (11:33 -0600)]
Merge pull request #456 from steve-lunarg/remapper-literal64

SPIRV: Remapper: allow 64 bit literals in OperandVariableLiteralId iteration

7 years agoSPIRV: allow 64 bit literals in OperandVariableLiteralId class iteration.
steve-lunarg [Fri, 12 Aug 2016 03:07:45 +0000 (21:07 -0600)]
SPIRV: allow 64 bit literals in OperandVariableLiteralId class iteration.

7 years agoMerge pull request #450 from dankbaker/standalone_change
John Kessenich [Thu, 11 Aug 2016 22:37:52 +0000 (16:37 -0600)]
Merge pull request #450 from dankbaker/standalone_change

Allowing explicit specification of shader compiltion type via -T opti…

7 years agoStandalong: Changing -T to -S since it's a stage now instead of a target
Dan Baker [Thu, 11 Aug 2016 21:53:57 +0000 (17:53 -0400)]
Standalong: Changing -T to -S since it's a stage now instead of a target

7 years agoStandalone: Changing some comments and user strings
Dan Baker [Thu, 11 Aug 2016 18:55:49 +0000 (14:55 -0400)]
Standalone: Changing some comments and user strings

7 years agoChanging target to stage
Dan Baker [Thu, 11 Aug 2016 18:06:06 +0000 (14:06 -0400)]
Changing target to stage

7 years agoMerge pull request #427 from wesleygriffin/master
John Kessenich [Thu, 11 Aug 2016 16:11:13 +0000 (10:11 -0600)]
Merge pull request #427 from wesleygriffin/master

Build: Bump required CMake version down to 2.8.11

7 years agoMerge branch 'cpp-headers'
John Kessenich [Thu, 11 Aug 2016 16:00:57 +0000 (10:00 -0600)]
Merge branch 'cpp-headers'

7 years agoMerge pull request #451 from steve-lunarg/stagemask-all
John Kessenich [Thu, 11 Aug 2016 15:58:01 +0000 (09:58 -0600)]
Merge pull request #451 from steve-lunarg/stagemask-all

HLSL: Put all intrinsics in common stage symbol table

7 years agoHLSL: Put intrinsics in symbol table for all stages
steve-lunarg [Thu, 11 Aug 2016 13:29:30 +0000 (07:29 -0600)]
HLSL: Put intrinsics in symbol table for all stages

7 years agoInfrastructure: Make shared symbol-table cache complete, delete work around.
John Kessenich [Wed, 10 Aug 2016 01:15:17 +0000 (19:15 -0600)]
Infrastructure: Make shared symbol-table cache complete, delete work around.

Fixes issue #370 and replaces PR #371.

7 years agoMerge pull request #448 from steve-lunarg/promotions
John Kessenich [Tue, 9 Aug 2016 21:29:25 +0000 (15:29 -0600)]
Merge pull request #448 from steve-lunarg/promotions

HLSL: add implicit promotions for assignments and function returns.

7 years agoHLSL: add implicit promotions for assignments and function returns.
steve-lunarg [Tue, 9 Aug 2016 17:28:03 +0000 (11:28 -0600)]
HLSL: add implicit promotions for assignments and function returns.

7 years agoAllowing explicit specification of shader compiltion type via -T option, rather then...
dankbaker [Tue, 9 Aug 2016 01:43:07 +0000 (21:43 -0400)]
Allowing explicit specification of shader compiltion type via -T option, rather then looking at file extension. For HLSL files, this is nice because .hlsl extension is natively udnerstood by visual studio, likely to be used with the -e option.

7 years agoFront-end: Fix issue #443: dvec3 uses only 2 components of second location.
John Kessenich [Mon, 8 Aug 2016 21:31:36 +0000 (15:31 -0600)]
Front-end: Fix issue #443: dvec3 uses only 2 components of second location.

7 years agoTests: Test base case for fixing issue #443.
John Kessenich [Mon, 8 Aug 2016 20:11:28 +0000 (14:11 -0600)]
Tests: Test base case for fixing issue #443.

7 years agoHLSL: Smear scalars to match vectors for relational operations.
John Kessenich [Mon, 8 Aug 2016 01:14:22 +0000 (19:14 -0600)]
HLSL: Smear scalars to match vectors for relational operations.

Yield a vector relational compare and a vector result.

7 years agoWhitespace: Nonfunctional: fix inconsistent white space, esp. no tabs.
John Kessenich [Fri, 5 Aug 2016 23:34:34 +0000 (17:34 -0600)]
Whitespace: Nonfunctional: fix inconsistent white space, esp. no tabs.

7 years agoMerge pull request #436 from dankbaker/master
John Kessenich [Fri, 5 Aug 2016 23:29:43 +0000 (17:29 -0600)]
Merge pull request #436 from dankbaker/master

HLSL: disabling dx9 attempt to parse dx9 style samplers

7 years agoTests: Add some location-decoration tests, to aid PR #422.
John Kessenich [Fri, 5 Aug 2016 21:19:46 +0000 (15:19 -0600)]
Tests: Add some location-decoration tests, to aid PR #422.

7 years agoBuild: C++ headers: Replace PR #366 with a more directed version.
John Kessenich [Fri, 5 Aug 2016 20:04:23 +0000 (14:04 -0600)]
Build: C++ headers: Replace PR #366 with a more directed version.

7 years agoMerge branch 'master' of https://github.com/dankbaker/glslang
Dan Baker [Fri, 5 Aug 2016 18:56:40 +0000 (14:56 -0400)]
Merge branch 'master' of https://github.com/dankbaker/glslang

7 years agoMerge pull request #2 from KhronosGroup/master
dankbaker [Fri, 5 Aug 2016 18:55:44 +0000 (14:55 -0400)]
Merge pull request #2 from KhronosGroup/master

Integrating Master into dankbaker fork

7 years agoCommenting out attempt to parse DX9 samplers, since this is imcompatible with DX10...
Dan Baker [Fri, 5 Aug 2016 18:52:38 +0000 (14:52 -0400)]
Commenting out attempt to parse DX9 samplers, since this is imcompatible with DX10+ shaders

7 years agoPP: Add missing atoms that effect -E mode.
John Kessenich [Fri, 5 Aug 2016 04:46:19 +0000 (22:46 -0600)]
PP: Add missing atoms that effect -E mode.

When preprocessing only, some tokens were emitted as <bad token>.
This fixes them to preserve their original content.

This supplants PR #182, with a correction and test results.

7 years agoMerge pull request #429 from steve-lunarg/samplers.sm5
John Kessenich [Wed, 3 Aug 2016 20:35:07 +0000 (14:35 -0600)]
Merge pull request #429 from steve-lunarg/samplers.sm5

HLSL: Add GatherRed/Green/Blue/Alpha methods, inc 4-offset forms

7 years agoHLSL: Add GatherRed/Green/Blue/Alpha methods, inc 4-offset forms
steve-lunarg [Sun, 31 Jul 2016 16:37:02 +0000 (10:37 -0600)]
HLSL: Add GatherRed/Green/Blue/Alpha methods, inc 4-offset forms

7 years agoMerge pull request #1 from KhronosGroup/master
dankbaker [Wed, 3 Aug 2016 19:32:58 +0000 (15:32 -0400)]
Merge pull request #1 from KhronosGroup/master

Pull request from glslang master

7 years agoMerge pull request #431 from steve-lunarg/semicolon-fix
John Kessenich [Wed, 3 Aug 2016 18:07:45 +0000 (12:07 -0600)]
Merge pull request #431 from steve-lunarg/semicolon-fix

HLSL: allow semicolons between global scope declarations

7 years agoHLSL: allow semicolons between global scope declarations.
steve-lunarg [Wed, 3 Aug 2016 13:04:18 +0000 (07:04 -0600)]
HLSL: allow semicolons between global scope declarations.

7 years agoFront-end: Implement 2nd task of issue #400; precision of result and operation.
John Kessenich [Tue, 2 Aug 2016 01:44:00 +0000 (19:44 -0600)]
Front-end: Implement 2nd task of issue #400; precision of result and operation.

From the ES spec + Bugzilla 15931 and GL_KHR_vulkan_glsl:
- Update precision qualifiers for all built-in function prototypes.
- Implement the new algorithm used to distinguish built-in function
  operation precisions from result precisions.
Also add tracking of separate result and operation precisions, and
use that in generating SPIR-V.
(SPIR-V cares about precision of operation, while the front-end
cares about precision of result, for propagation.)

7 years agoMerge pull request #428 from dankbaker/master
John Kessenich [Tue, 2 Aug 2016 18:58:22 +0000 (12:58 -0600)]
Merge pull request #428 from dankbaker/master

HLSL: Fixing some casts that warn when compiled to 64 bit (size_t is 64 bit…

7 years agoFixing some casts that warn when compiled to 64 bit (size_t is 64 bit rather then...
Dan Baker [Tue, 2 Aug 2016 18:42:43 +0000 (14:42 -0400)]
Fixing some casts that warn when compiled to 64 bit (size_t is 64 bit rather then 32 bit)

7 years agobump required CMake version down to 2.8.11 since no features are required in cmake...
Wesley Griffin [Mon, 1 Aug 2016 19:36:15 +0000 (15:36 -0400)]
bump required CMake version down to 2.8.11 since no features are required in cmake>2.8.11 and this allows building on stock CentOS 7

7 years agoSPV: Prevent issue #415 with better semantic checking.
John Kessenich [Sun, 31 Jul 2016 18:39:46 +0000 (12:39 -0600)]
SPV: Prevent issue #415 with better semantic checking.

7 years agoPP: Fix issue #407; handle empty identifier.
John Kessenich [Sat, 30 Jul 2016 19:39:52 +0000 (13:39 -0600)]
PP: Fix issue #407; handle empty identifier.

The sequence

  #define m()
  int m"

creates a token of no length (a string of 0 size).  Protect
against a string of 0 size as well as the existing protect
against a null string.

7 years agoPP: Non-functional; fix typos and blank spaces.
John Kessenich [Sat, 30 Jul 2016 19:25:33 +0000 (13:25 -0600)]
PP: Non-functional; fix typos and blank spaces.

7 years agoPP: Fix issue #408: # as last character in macro.
John Kessenich [Sat, 30 Jul 2016 18:38:17 +0000 (12:38 -0600)]
PP: Fix issue #408: # as last character in macro.

This would look ahead for a second #, for token pasting, and if not
found, backup one token.  This is fine, unless at the end of line,
which would backup the #, rather than the look ahead.

7 years agoMerge pull request #424 from steve-lunarg/initializer-fix
John Kessenich [Sat, 30 Jul 2016 17:17:03 +0000 (11:17 -0600)]
Merge pull request #424 from steve-lunarg/initializer-fix

HLSL: allow trailing commas in initializer lists & scalar initialization

7 years agoHLSL: allow trailing commas in initializer lists & scalar initialization
steve-lunarg [Sat, 30 Jul 2016 16:36:09 +0000 (10:36 -0600)]
HLSL: allow trailing commas in initializer lists & scalar initialization

7 years agoHLSL: Add back in the [subcomponent] part of a 'register' decl.
John Kessenich [Sat, 30 Jul 2016 16:29:54 +0000 (10:29 -0600)]
HLSL: Add back in the [subcomponent] part of a 'register' decl.

7 years agoMerge pull request #423 from steve-lunarg/constructor-expr-fix
John Kessenich [Sat, 30 Jul 2016 16:28:38 +0000 (10:28 -0600)]
Merge pull request #423 from steve-lunarg/constructor-expr-fix

HLSL: Fix a grammar error related to constructors in paren expr

7 years agoHLSL: Fix a grammar error related to constructors in parenthetical expressions
steve-lunarg [Sat, 30 Jul 2016 13:38:55 +0000 (07:38 -0600)]
HLSL: Fix a grammar error related to constructors in parenthetical expressions

7 years agoFront-ends GLSL/HLSL: Fix initializer lists for structs of one member.
John Kessenich [Sat, 30 Jul 2016 00:22:22 +0000 (18:22 -0600)]
Front-ends GLSL/HLSL: Fix initializer lists for structs of one member.

Single member structs initialized with an initializer list had
an incorrect argument for constructor emulation.

7 years agoHLSL: Implement the register production.
John Kessenich [Fri, 29 Jul 2016 20:28:39 +0000 (14:28 -0600)]
HLSL: Implement the register production.

7 years agoHLSL: Implement packoffset production.
John Kessenich [Fri, 29 Jul 2016 19:03:05 +0000 (13:03 -0600)]
HLSL: Implement packoffset production.

7 years agoMerge pull request #421 from amdrexu/bugfix
John Kessenich [Fri, 29 Jul 2016 16:42:40 +0000 (10:42 -0600)]
Merge pull request #421 from amdrexu/bugfix

SPV: Fix an issue of ++/-- for dvec/dmat.

7 years agoSPV: Fix an issue of ++/-- for dvec/dmat.
Rex Xu [Fri, 29 Jul 2016 08:13:04 +0000 (16:13 +0800)]
SPV: Fix an issue of ++/-- for dvec/dmat.

7 years agoHLSL: Fix binary-expression associativity and termination issue.
John Kessenich [Fri, 29 Jul 2016 03:43:17 +0000 (21:43 -0600)]
HLSL: Fix binary-expression associativity and termination issue.

7 years agoHLSL: Add shape conversions for scalar -> vector assigments.
John Kessenich [Thu, 28 Jul 2016 23:53:56 +0000 (17:53 -0600)]
HLSL: Add shape conversions for scalar -> vector assigments.

Also, this allows turning on the error check for a failed assigment
when parsing.

This makes 39 HLSL tests have a working assignment that was previously
silently dropped, due to lack of this functionality.

7 years agoNon-functional: Rationalize location and use of mapTypeToConstructor().
John Kessenich [Thu, 28 Jul 2016 21:29:35 +0000 (15:29 -0600)]
Non-functional: Rationalize location and use of mapTypeToConstructor().

7 years agoMerge pull request #417 from steve-lunarg/buffers
John Kessenich [Thu, 28 Jul 2016 22:56:39 +0000 (16:56 -0600)]
Merge pull request #417 from steve-lunarg/buffers

HLSL: add Buffer support for Load method

7 years agoMerge pull request #419 from steve-lunarg/lerp-fix
John Kessenich [Thu, 28 Jul 2016 22:56:25 +0000 (16:56 -0600)]
Merge pull request #419 from steve-lunarg/lerp-fix

HLSL: add missing vec,vec,scalar form of lerp(), + test