John Kessenich
1a4b775cd5
HLSL: Correct line numbers for function definitions.
2016-09-02 19:05:24 -06:00
John Kessenich
4bf7155051
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.
2016-09-02 16:35:01 -06:00
John Kessenich
31207bc20a
Merge pull request #495 from steve-lunarg/remapper-tests-2
...
Remapper: move remapper tests into the glslangtests executable.
2016-09-02 10:57:24 -06:00
steve-lunarg
65564a4ad6
Remapper: move remapper tests into the glslangtests executable.
2016-09-02 09:21:12 -06:00
John Kessenich
f2b7f3353b
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.
2016-09-01 17:05:23 -06:00
John Kessenich
5e56423046
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.
2016-08-31 13:46:50 -06:00
John Kessenich
830b0cc98b
HLSL: Start location numbering with the entry-point return value.
...
Also, increment location numbers by the size of the objects.
2016-08-29 18:10:47 -06:00
John Kessenich
a05d8b5604
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.
2016-08-29 16:49:39 -06:00
John Kessenich
510d83b384
HLSL: Create test results for the previous commits.
2016-08-29 16:34:12 -06:00
John Kessenich
335fc28e76
Merge branch 'dankbaker-HLSL_Semantic_Mapping'
2016-08-29 16:08:22 -06:00
John Kessenich
81d4714908
Merge branch 'HLSL_Semantic_Mapping' of https://github.com/dankbaker/glslang into dankbaker-HLSL_Semantic_Mapping
2016-08-29 16:07:29 -06:00
John Kessenich
a88ef3978d
Merge pull request #490 from KhronosGroup/hlsl-output-return
...
HLSL: Emulate write-to-output on return-from-entry-point, for return …
2016-08-29 15:43:21 -06:00
Dan Baker
6f220c0fd1
HLSL: Setting SV_DEPTHGREATEREQUAL and SV_DEPTHLESSEQUAL to EbvFragDepth for now
2016-08-29 15:56:55 -04:00
John Kessenich
6fd31fd7e3
Merge branch 'hlsl-output-return' of github.com:KhronosGroup/glslang into hlsl-output-return
2016-08-28 20:13:36 -06:00
John Kessenich
6a70eb7161
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.
2016-08-28 20:13:07 -06:00
John Kessenich
be2f6b05c3
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.
2016-08-28 17:15:29 -06:00
John Kessenich
81cd764b5f
Non-functional: Add some missing const, related to signature selection.
2016-08-26 14:01:43 -06:00
John Kessenich
1389e3e63d
Merge pull request #488 from antiagainst/c4996-warning
...
Disable C4996 (secure CRT) recommendation on Windows for strtok().
2016-08-26 13:16:30 -06:00
Lei Zhang
424cf80f8b
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.
2016-08-26 14:43:14 -04:00
John Kessenich
f00c245a5f
Merge pull request #473 from steve-lunarg/remapper-tests
...
SPV Remapper: add remapper test framework
2016-08-26 11:32:54 -06:00
John Kessenich
e3f2c8f98a
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.
2016-08-25 23:57:39 -06:00
Dan Baker
26aa8a4b16
HLSL: Format updates and some minor adjustments to SV_ handling
2016-08-25 17:13:25 -04:00
John Kessenich
90dd70f752
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.
2016-08-25 10:51:29 -06:00
steve-lunarg
a8456415b8
WIP: SPV Remapper: add remapper test framework
2016-08-25 10:46:51 -06:00
Dan Baker
deec03cfca
First stab at system value interpretation
2016-08-25 12:00:25 -04:00
John Kessenich
4c3a7fd100
Merge pull request #483 from steve-lunarg/precise-fix-2
...
HLSL: add precise keyword
2016-08-25 09:32:19 -06:00
steve-lunarg
36e87d0871
HLSL: add precise keyword
2016-08-25 08:48:54 -06:00
John Kessenich
fcc0aa3b64
HLSL: Switch to generic selector, but using GLSL #version 400 rules.
...
Next step is to modify for HLSL rules.
2016-08-24 18:34:43 -06:00
John Kessenich
ab89bbe702
Merge branch 'overloaded-400' of github.com:KhronosGroup/glslang
2016-08-23 18:30:20 -06:00
John Kessenich
32c169dbdf
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).
2016-08-23 18:13:08 -06:00
John Kessenich
54571c2519
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.
2016-08-23 18:12:25 -06:00
John Kessenich
4d535640e4
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.
2016-08-23 18:12:25 -06:00
John Kessenich
219b025d7e
Non-functional: Fix commit 98f164ec488f85af5a44b701477a34e810f2deb1.
...
Fix previous commit to not use tabs and otherwise match local coding
conventions better.
2016-08-23 17:51:13 -06:00
John Kessenich
98f164ec48
Merge pull request #461 from dankbaker/Error_Message_Fixes_for_HLSL
...
HLSL: Better error message for when HLSL translation fails
2016-08-23 17:48:14 -06:00
John Kessenich
6577a0e26c
Merge pull request #476 from steve-lunarg/string-literals
...
HLSL: Support string literals, e.g, for annotations
2016-08-23 17:41:54 -06:00
John Kessenich
3de0a6d427
Merge pull request #477 from amdrexu/bugfix
...
SPV: Some group invocation operations should be applied to scalars.
2016-08-23 17:40:53 -06:00
Rex Xu
2bbbe0621d
SPV: Some group invocation operations should be applied to scalars.
2016-08-23 15:41:05 +08:00
steve-lunarg
efe9724795
HLSL: Add EHTokStringConstant, so that string attributes may be parsed
2016-08-22 17:13:17 -06:00
John Kessenich
370234888d
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.
2016-08-21 14:26:27 -06:00
dankbaker
afe6e9c4fc
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
2016-08-21 12:29:08 -04:00
John Kessenich
0a04b4df02
Front-end/Non-functional: Add some const/auto, useful for upcoming changes.
2016-08-19 07:27:28 -06:00
John Kessenich
b9e39120b4
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
2016-08-17 17:38:45 -06:00
John Kessenich
78a8b0737c
Merge pull request #471 from steve-lunarg/remapper-literal64-b
...
SPIRV remapper: allow 64 bit literals in OperandVariableLiteralI…
2016-08-17 09:23:46 -06:00
steve-lunarg
811d9f4cad
WIP: SPIRV remapper: allow 64 bit literals in OperandVariableLiteralId class iteration
2016-08-17 08:33:49 -06:00
John Kessenich
057c01efb4
Merge pull request #467 from dankbaker/HLSL_Changing_defualt_language
...
HLSL: changing SPIRV defualt language for HLSL to unknown
2016-08-15 15:14:55 -06:00
Dan Baker
2c646b7afa
Updating tests, sadly every single HLSL test needs updating becuase of the language identifier
2016-08-15 16:25:55 -04:00
Dan Baker
55d5f2d4df
HLSL: Changing SPIRV source language to unkown
2016-08-15 16:05:45 -04:00
John Kessenich
15c0fbee32
Merge pull request #466 from baldurk/minor-msvc-warning-fix
...
fix x64 warning about conversion size_t -> int
2016-08-15 10:47:28 -06:00
baldurk
1eb1c11dea
fix x64 warning about conversion size_t -> int
2016-08-15 18:01:15 +02:00
John Kessenich
7fb66097e1
Merge pull request #458 from dneto0/revert-remap-64bit-patch
...
Revert "Merge pull request #456 from steve-lunarg/remapper-literal64"
2016-08-12 15:02:40 -06:00