John Kessenich [Sat, 17 Sep 2016 03:16:04 +0000 (21:16 -0600)]
HLSL: Fix bug in previous checkin when non-flattened objects are not simple l-values.
John Kessenich [Sat, 17 Sep 2016 01:44:00 +0000 (19:44 -0600)]
HLSL: Handle flatten for reads from flatten structs and parameter passing.
John Kessenich [Fri, 16 Sep 2016 23:10:39 +0000 (17:10 -0600)]
HLSL: Improve setting and testing of interpolation qualifiers.
Notably, use of 'linear' on a non-input could mark it as an input.
John Kessenich [Fri, 16 Sep 2016 09:05:12 +0000 (03:05 -0600)]
HLSL: Flatten whole-struct assigns and returns when targeting flattened I/O structs.
John Kessenich [Fri, 16 Sep 2016 07:52:14 +0000 (01:52 -0600)]
HLSL: Flatten all input/output structs, regardless of stage.
This is needed because an output structure can contain embedded built-ins
(like SV_Position) which should not get locations assigned.
John Kessenich [Fri, 16 Sep 2016 07:44:43 +0000 (01:44 -0600)]
HLSL: Flatten a return struct from an entry point and assign locations after flattening.
Locations now get assigned in order, but skipping built-ins, which can be
done post flattening.
John Kessenich [Fri, 16 Sep 2016 04:49:31 +0000 (22:49 -0600)]
HLSL: return correct error when HLSL parsing fails.
At least partially addresses issue #510.
John Kessenich [Fri, 16 Sep 2016 04:41:37 +0000 (22:41 -0600)]
Merge pull request #508 from amdrexu/bugfix
SPV: Support simultaneous l-value swizzle and dynamic component selection.
Rex Xu [Wed, 14 Sep 2016 06:43:21 +0000 (14:43 +0800)]
SPV: Support simultaneous l-value swizzle and dynamic component selection.
John Kessenich [Mon, 12 Sep 2016 17:55:47 +0000 (11:55 -0600)]
HLSL: Register all entry-point in/out as part of the interface.
This makes the interface be invariant, whether or not individual
variables are used.
John Kessenich [Sun, 11 Sep 2016 18:33:43 +0000 (12:33 -0600)]
SPV: Fix issue #506: generalize struct deep copy to include arrays.
John Kessenich [Fri, 9 Sep 2016 22:32:09 +0000 (16:32 -0600)]
HLSL: Flatten vertex input and fragment output structures.
Vulkan can't handle structures into the vertex stage or out
of the fragment stage.
John Kessenich [Fri, 9 Sep 2016 20:00:27 +0000 (14:00 -0600)]
Merge pull request #505 from steve-lunarg/rowmajor-fix-2a
HLSL: alias HLSL matrix-row-column onto AST matrix-column-row
steve-lunarg [Wed, 24 Aug 2016 20:36:13 +0000 (14:36 -0600)]
WIP: HLSL: Treat HLSL rows as GLSL columns.
WIP: HLSL: EOpGenMul arg reversal
John Kessenich [Fri, 9 Sep 2016 17:43:11 +0000 (11:43 -0600)]
HLSL: Report an error if SPIR-V for Vulkan wasn't selected.
John Kessenich [Fri, 9 Sep 2016 16:46:43 +0000 (10:46 -0600)]
Merge branch 'amdrexu-bugfix2'
John Kessenich [Fri, 9 Sep 2016 16:46:10 +0000 (10:46 -0600)]
Merge branch 'bugfix2' of https://github.com/amdrexu/glslang into amdrexu-bugfix2
John Kessenich [Fri, 9 Sep 2016 16:41:16 +0000 (10:41 -0600)]
Merge pull request #503 from amdrexu/feature3
SPV: Use OpBitcast to implement 4 pack/unpack built-in functions.
Rex Xu [Fri, 9 Sep 2016 09:50:07 +0000 (17:50 +0800)]
SPV: Use OpBitcast to implement 4 pack/unpack built-in functions.
Rex Xu [Tue, 6 Sep 2016 05:46:12 +0000 (13:46 +0800)]
Preprocessor: UINT_MAX is translated to constant incorrectly.
John Kessenich [Mon, 5 Sep 2016 22:03:12 +0000 (16:03 -0600)]
HLSL: Support register(..., spaceN) for setting the descriptor set.
This was suggested in issue #454.
John Kessenich [Mon, 5 Sep 2016 20:37:03 +0000 (14:37 -0600)]
HLSL: Accept layout(...) also as a post-decl. Issue #454.
John Kessenich [Mon, 5 Sep 2016 18:40:06 +0000 (12:40 -0600)]
HLSL Non-Functional: Move to more robust capturing of postDecls into a qualifier.
This will prevent a possible future defect of thinking the type can be changed,
where there is a code path today that would drop that change.
John Kessenich [Mon, 5 Sep 2016 18:19:18 +0000 (12:19 -0600)]
HLSL: Track binding numbers to struct instances; fixes issue #496.
John Kessenich [Mon, 5 Sep 2016 17:35:34 +0000 (11:35 -0600)]
Merge pull request #498 from amdrexu/bugfix
Parser: Add 64-bit type conversion for specialization constant.
Rex Xu [Mon, 5 Sep 2016 08:10:14 +0000 (16:10 +0800)]
Parser: Add 64-bit type conversion for specialization constant.
John Kessenich [Sat, 3 Sep 2016 04:21:25 +0000 (22:21 -0600)]
HLSL: Handle swizzles on vectors of size 1. Addresses issue #453.
John Kessenich [Sat, 3 Sep 2016 03:12:23 +0000 (21:12 -0600)]
HLSL: Fix issue #442, smear and truncate shape conversions for == and !=.
John Kessenich [Sat, 3 Sep 2016 02:23:27 +0000 (20:23 -0600)]
HLSL: Handle "fake" entry points, by undoing their built-in variable declarations.
John Kessenich [Sat, 3 Sep 2016 02:05:19 +0000 (20:05 -0600)]
HLSL: Handle greater/less depth modes. Fixes issue #489.
John Kessenich [Sat, 3 Sep 2016 01:13:36 +0000 (19:13 -0600)]
HLSL: Error if funcion with return type doesn't return a value.
John Kessenich [Sat, 3 Sep 2016 01:05:24 +0000 (19:05 -0600)]
HLSL: Correct line numbers for function definitions.
John Kessenich [Fri, 2 Sep 2016 17:20:21 +0000 (11:20 -0600)]
SPV: Flatten structs for copy when they are GLSL type aliases.
Addresses issue #304 and issue #307 by replacing unmatched type OpStores with
per-member copies. Covers assignment statements and most argument passing, but
does not yet cover r-value-based argument passing.
John Kessenich [Fri, 2 Sep 2016 16:57:24 +0000 (10:57 -0600)]
Merge pull request #495 from steve-lunarg/remapper-tests-2
Remapper: move remapper tests into the glslangtests executable.
steve-lunarg [Fri, 2 Sep 2016 15:21:12 +0000 (09:21 -0600)]
Remapper: move remapper tests into the glslangtests executable.
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.
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.
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.
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.
John Kessenich [Mon, 29 Aug 2016 22:34:12 +0000 (16:34 -0600)]
HLSL: Create test results for the previous commits.
John Kessenich [Mon, 29 Aug 2016 22:08:22 +0000 (16:08 -0600)]
Merge branch 'dankbaker-HLSL_Semantic_Mapping'
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
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 …
Dan Baker [Mon, 29 Aug 2016 19:56:55 +0000 (15:56 -0400)]
HLSL: Setting SV_DEPTHGREATEREQUAL and SV_DEPTHLESSEQUAL to EbvFragDepth for now
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
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.
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.
John Kessenich [Fri, 26 Aug 2016 20:01:43 +0000 (14:01 -0600)]
Non-functional: Add some missing const, related to signature selection.
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().
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.
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
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.
Dan Baker [Thu, 25 Aug 2016 21:13:25 +0000 (17:13 -0400)]
HLSL: Format updates and some minor adjustments to SV_ handling
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.
steve-lunarg [Wed, 17 Aug 2016 22:18:06 +0000 (16:18 -0600)]
WIP: SPV Remapper: add remapper test framework
Dan Baker [Thu, 25 Aug 2016 15:59:17 +0000 (11:59 -0400)]
First stab at system value interpretation
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
steve-lunarg [Thu, 25 Aug 2016 05:49:36 +0000 (23:49 -0600)]
HLSL: add precise keyword
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.
John Kessenich [Wed, 24 Aug 2016 00:20:19 +0000 (18:20 -0600)]
Merge branch 'overloaded-400' of github.com:KhronosGroup/glslang
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).
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.
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.
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.
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
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
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.
Rex Xu [Tue, 23 Aug 2016 07:41:05 +0000 (15:41 +0800)]
SPV: Some group invocation operations should be applied to scalars.
steve-lunarg [Mon, 22 Aug 2016 22:13:47 +0000 (16:13 -0600)]
HLSL: Add EHTokStringConstant, so that string attributes may be parsed
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.
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
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.
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
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…
steve-lunarg [Wed, 17 Aug 2016 14:33:49 +0000 (08:33 -0600)]
WIP: SPIRV remapper: allow 64 bit literals in OperandVariableLiteralId class iteration
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
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
Dan Baker [Mon, 15 Aug 2016 20:05:45 +0000 (16:05 -0400)]
HLSL: Changing SPIRV source language to unkown
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
baldurk [Mon, 15 Aug 2016 16:01:15 +0000 (18:01 +0200)]
fix x64 warning about conversion size_t -> int
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"
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.
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
steve-lunarg [Fri, 12 Aug 2016 03:07:45 +0000 (21:07 -0600)]
SPIRV: allow 64 bit literals in OperandVariableLiteralId class iteration.
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…
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
Dan Baker [Thu, 11 Aug 2016 18:55:49 +0000 (14:55 -0400)]
Standalone: Changing some comments and user strings
Dan Baker [Thu, 11 Aug 2016 18:06:06 +0000 (14:06 -0400)]
Changing target to stage
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
John Kessenich [Thu, 11 Aug 2016 16:00:57 +0000 (10:00 -0600)]
Merge branch 'cpp-headers'
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
steve-lunarg [Thu, 11 Aug 2016 13:29:30 +0000 (07:29 -0600)]
HLSL: Put intrinsics in symbol table for all stages
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.
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.
steve-lunarg [Tue, 9 Aug 2016 17:28:03 +0000 (11:28 -0600)]
HLSL: add implicit promotions for assignments and function returns.
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.
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.
John Kessenich [Mon, 8 Aug 2016 20:11:28 +0000 (14:11 -0600)]
Tests: Test base case for fixing issue #443.
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.
John Kessenich [Fri, 5 Aug 2016 23:34:34 +0000 (17:34 -0600)]
Whitespace: Nonfunctional: fix inconsistent white space, esp. no tabs.