Commit Graph

1435 Commits

Author SHA1 Message Date
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 98f164ec48.
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
David Neto
b86e8b629a Revert "Merge pull request #456 from steve-lunarg/remapper-literal64"
This reverts commit ad08b30f69, reversing
changes made to 28660bb580.

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.
2016-08-12 16:49:58 -04:00
John Kessenich
ad08b30f69 Merge pull request #456 from steve-lunarg/remapper-literal64
SPIRV: Remapper: allow 64 bit literals in OperandVariableLiteralId iteration
2016-08-12 11:33:19 -06:00
steve-lunarg
b249f2fc24 SPIRV: allow 64 bit literals in OperandVariableLiteralId class iteration. 2016-08-12 09:53:31 -06:00
John Kessenich
28660bb580 Merge pull request #450 from dankbaker/standalone_change
Allowing explicit specification of shader compiltion type via -T opti…
2016-08-11 16:37:52 -06:00
Dan Baker
5afdd78131 Standalong: Changing -T to -S since it's a stage now instead of a target 2016-08-11 17:53:57 -04:00
Dan Baker
895275e357 Standalone: Changing some comments and user strings 2016-08-11 14:55:49 -04:00
Dan Baker
c6ede8938a Changing target to stage 2016-08-11 14:06:06 -04:00
John Kessenich
359dcee715 Merge pull request #427 from wesleygriffin/master
Build: Bump required CMake version down to 2.8.11
2016-08-11 10:11:13 -06:00
John Kessenich
2c6038ecf1 Merge branch 'cpp-headers' 2016-08-11 10:01:13 -06:00
John Kessenich
10e0efeb42 Merge pull request #451 from steve-lunarg/stagemask-all
HLSL: Put all intrinsics in common stage symbol table
2016-08-11 09:58:01 -06:00
steve-lunarg
61da5e41f7 HLSL: Put intrinsics in symbol table for all stages 2016-08-11 07:29:30 -06:00
John Kessenich
0a6fb85494 Infrastructure: Make shared symbol-table cache complete, delete work around.
Fixes issue #370 and replaces PR #371.
2016-08-09 19:15:17 -06:00
John Kessenich
0b5214486b Merge pull request #448 from steve-lunarg/promotions
HLSL: add implicit promotions for assignments and function returns.
2016-08-09 15:29:25 -06:00
steve-lunarg
c4a1307403 HLSL: add implicit promotions for assignments and function returns. 2016-08-09 13:48:47 -06:00
dankbaker
45d49bcd51 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. 2016-08-08 22:24:29 -04:00
John Kessenich
426542ba57 Front-end: Fix issue #443: dvec3 uses only 2 components of second location. 2016-08-08 15:34:00 -06:00
John Kessenich
34177cd778 Tests: Test base case for fixing issue #443. 2016-08-08 15:29:25 -06:00
John Kessenich
4583b61e20 HLSL: Smear scalars to match vectors for relational operations.
Yield a vector relational compare and a vector result.
2016-08-07 19:14:22 -06:00
John Kessenich
267590d452 Whitespace: Nonfunctional: fix inconsistent white space, esp. no tabs. 2016-08-05 17:34:34 -06:00
John Kessenich
5c72a73971 Merge pull request #436 from dankbaker/master
HLSL: disabling dx9 attempt to parse dx9 style samplers
2016-08-05 17:29:43 -06:00
John Kessenich
bbd1b0ef76 Tests: Add some location-decoration tests, to aid PR #422. 2016-08-05 15:19:46 -06:00
John Kessenich
66ec80e01b Build: C++ headers: Replace PR #366 with a more directed version. 2016-08-05 14:04:23 -06:00
Dan Baker
349ac3df86 Merge branch 'master' of https://github.com/dankbaker/glslang 2016-08-05 14:56:40 -04:00
dankbaker
c0962f1e90 Merge pull request #2 from KhronosGroup/master
Integrating Master into dankbaker fork
2016-08-05 14:55:44 -04:00
Dan Baker
c7e501613a Commenting out attempt to parse DX9 samplers, since this is imcompatible with DX10+ shaders 2016-08-05 14:52:38 -04:00
John Kessenich
9f9bad09b4 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.
2016-08-04 22:46:19 -06:00