John Kessenich
2eb135506a
GLSL: Fix #396 : Error when 'defined' comes from macro expansion.
2017-06-07 17:19:08 -06:00
John Kessenich
65755667d5
Merge pull request #922 from KhronosGroup/dash-I
...
Infrastructure: add include search paths (-I, etc.).
Fixes #921 .
2017-06-07 16:04:29 -06:00
John Kessenich
971a0a8d2d
Infrastructure: add include search paths (-I, etc.).
2017-06-07 15:09:54 -06:00
John Kessenich
96f65521b4
HLSL: Implement half matrices, and map all half* -> float*.
2017-06-06 23:35:25 -06:00
John Kessenich
f6deacd579
HLSL: Track control-flow nesting and warn on aliasing under it.
2017-06-06 19:53:24 -06:00
John Kessenich
9b2531ba23
Infrastructure: Move nesting counters, etc., to base class.
...
This lets all languages share the same definitions.
2017-06-06 19:53:24 -06:00
John Kessenich
b4d46627cb
Build: Fix build warnings.
2017-06-06 19:53:24 -06:00
John Kessenich
a83959fab1
Merge pull request #920 from jeremy-lunarg/jeremy-build
...
Build: Fix linux
2017-06-06 16:27:34 -06:00
Jeremy Hayes
549764b5ec
Build: Fix linux
...
I believe this is a repeat of 12d6936
.
2017-06-06 15:52:50 -06:00
John Kessenich
0e07119ae2
HLSL: Fix #919 : for-init-statement is arbitrary declaration or expression.
...
Unlike "if (XXX)" and "while (XXX)", with "for (YYY...", the YYY can be
more kinds of statements than the XXX.
2017-06-06 11:37:33 -06:00
John Kessenich
e00e8f45a6
GLSL: replace general missing functionality with specific messages.
2017-06-05 16:42:33 -06:00
John Kessenich
21369c825a
Merge pull request #912 from amdrexu/feature
...
Implement the extension GL_AMD_texture_gather_bias_lod
2017-06-05 09:08:12 -06:00
Rex Xu
225e0fcadd
Implement the extension GL_AMD_texture_gather_bias_lod
2017-06-05 16:41:06 +08:00
John Kessenich
94c18a84cd
GLSL: Fix bug setting component=0 for an auto-location assignment.
...
Setting component=0 is later taken to mean the shader did so, which
is not always legal. It should instead set the component as not set
by the shader.
2017-06-04 13:17:20 -06:00
John Kessenich
8de7e7bf14
GLSL: Error when using location on an arrayed block.
...
This implements a recent change to the GLSL specification to enforce
this ill-defined situation.
2017-06-04 13:05:50 -06:00
John Kessenich
99f289d438
Merge pull request #899 from antiagainst/rm-empty-cpps
...
Remove empty cpp files
2017-06-03 15:29:06 -06:00
John Kessenich
0b94a31ee9
Merge pull request #915 from LoopDawg/subvec4-intrinsic
...
HLSL: add test coverage for sub-vec4 texture intrinsics
2017-06-03 15:28:11 -06:00
John Kessenich
70942e5f84
Merge pull request #905 from KhronosGroup/flatten-opaque-structs
...
SPV: When passing structs of opaque types, flatten and pass the membe…
2017-06-02 18:48:26 -06:00
John Kessenich
f31507421b
HLSL: Convert run-time sampler assignments to compile-time aliases.
...
For "s.m = t", a sampler member assigned a sampler, make t an alias
for s.m, and when s.m is flattened, it will flatten to the alias t.
Normally, assignments to samplers are disallowed.
2017-06-02 18:27:21 -06:00
John Kessenich
750c2d07f7
SPV: When passing structs of opaque types, flatten and pass the members instead.
...
This avoids either A) needing uniformConstant struct, or
B) initializing a struct with opaque members, as writing them is not
allowed.
2017-06-01 18:49:04 -06:00
John Kessenich
d66c5b1299
HLSL: iomapper: Fix #914 . Tolerate user aliasing of bindings.
...
Because it is valid in HLSL to alias bindings:
A) remove validation that aliasing is not done
B) make the algorithms tolerate aliasing
2017-06-01 18:16:33 -06:00
LoopDawg
a696fd1a44
HLSL: add test coverage for sub-vec4 texture intrinsics
...
This changes no functional code. There was a bit of a testing hole
in that textures templatized on sub-vec4 types were not being exercised
with any intrinsics. This adds some basic sanity coverage of that case.
2017-06-01 13:28:12 -06:00
John Kessenich
ae99875e42
Merge pull request #907 from KhronosGroup/include
...
HLSL: Add an Includer to handle #include for local HLSL paths.
2017-06-01 12:37:52 -06:00
John Kessenich
5052152eef
Merge pull request #913 from amdrexu/bugfix
...
Parser: Add missing codes for float16
2017-06-01 12:36:21 -06:00
John Kessenich
3494b4da9b
HLSL: Add an Includer to handle #include.
2017-06-01 11:16:32 -06:00
Rex Xu
0848cc0725
Parser: Add missing codes for float16
2017-06-01 19:59:20 +08:00
John Kessenich
44d2728e3d
Merge pull request #911 from KhronosGroup/debug-info
...
SPV: Add OpSource shader source code and file name.
2017-05-31 22:47:28 -06:00
John Kessenich
e485c7af58
SPV: Debug output: Include OpLine information for execution path.
...
Note that declaratives are not handled, only procedurals.
2017-05-31 18:50:53 -06:00
John Kessenich
121853f4df
SPV: Add OpSource shader source code and file name.
2017-05-31 17:14:15 -06:00
John Kessenich
136b1e2d5d
Merge pull request #856 from TiemoJung/texture_upgrade
...
Pure Texture to Sampled Texture Transform
2017-05-29 11:40:43 -06:00
t.jung
baf570efa5
Pure Texture to Sampled Texture Transform
...
Adds a transformation step to the post processing step.
Two modes are available:
1) keep
- Keeps samplers, textures and sampled textures as is
2) transform pure texture into sampled texture and remove pure samplers
- removes all pure samplers
- transforms all pure textures into its sampled counter part
Change-Id: If54972e8052961db66c23f4b7e719d363cf6edbd
2017-05-29 18:29:45 +02:00
John Kessenich
d6af18f621
Merge pull request #901 from LoopDawg/imat-construct
...
HLSL: Add imat, umat, and bmat constructors
2017-05-24 23:12:58 -06:00
John Kessenich
7c9129bcb7
SPV: Fix #904 : Correctly check for built-in block redeclations for location check.
2017-05-24 23:10:28 -06:00
John Kessenich
84cc15f0d0
HLSL: Fix #903 : Don't short-circuit && or ||.
2017-05-24 16:47:32 -06:00
John Kessenich
6e2295d340
HLSL: Fix #902 : Incorrect protection against zero arguments.
2017-05-24 16:02:56 -06:00
LoopDawg
174ccb8f1d
HLSL: Add imat, umat, and bmat constructors
...
Fixes #894
2017-05-20 21:54:16 -06:00
John Kessenich
2c6f48b1f6
Fix #373 : Implicitly make gl_FragColor a location=0 output.
2017-05-20 13:23:25 -06:00
John Kessenich
1d585ac8bd
SPV: Correctly enforce 'location' presence on in/out blocks.
...
Blocks have this on members, not the object.
2017-05-20 12:15:41 -06:00
John Kessenich
557caf2401
Merge pull request #900 from LoopDawg/tx-overloads
...
HLSL: allow name mangling based on texture template type
2017-05-20 11:33:54 -06:00
John Kessenich
7b8c386c5d
More non-determinism fixed.
2017-05-19 23:44:51 -06:00
John Kessenich
b6cabc4f24
Fix C++ portability, non-deterministic order of argument evaluation.
2017-05-19 23:29:50 -06:00
John Kessenich
80f92a190a
Fix #857 : Convert uniform int to local bool for struct alias assignment.
...
This was done for one direction, but not both directions, so this commit
picks up the other direction.
2017-05-19 23:00:13 -06:00
John Kessenich
0d2b4713c5
HLSL: Don't do logical short-circuits when the operands are bool-vectors.
...
This seems a bit ill-defined, and was generating code that made OpPhi of two
operands that were Boolean vectors result in a scalar bool.
2017-05-19 20:19:00 -06:00
LoopDawg
132a28aac4
HLSL: allow name mangling based on texture template type
...
Name mangling did not account for the vector size in the template type of a texture.
This adds that. The mangle is as it ever was for the vec4 case, which leaves
all GLSL behavior and most HLSL behavior uneffected. For vec1-3 the size is added
to the mangle.
Current limitation: textures cannot presently be templatized on structured types,
so this works only for vectors of basic types.
Fixes #895 .
2017-05-19 20:12:50 -06:00
Lei Zhang
ddda9cb8ee
Remove empty cpp files
...
This solves ranlib warnings on MacOS.
2017-05-19 17:29:16 -04:00
John Kessenich
ab0847ef01
Merge pull request #896 from KhronosGroup/spv-location
...
SPV: Give error on not assigning locations to I/O when generating SPIR-V.
2017-05-18 21:12:04 -06:00
John Kessenich
ff164d87f1
Merge pull request #897 from LoopDawg/remap-specconstop-fix.2
...
Remapper: handle embedded opcode in OpSpecConstantOp
2017-05-18 18:19:12 -06:00
LoopDawg
65c2eed65d
Remapper: handle embedded opcode in OpSpecConstantOp
...
OpSpecConstantOp contains an embedded opcode which is given as a literal
argument to the OpSpecConstantOp. The subsequent arguments are as the
embedded op would expect, which may be a mixture of IDs and literals. This
adds support for that to the remapper binary parser. Upon seeing such an
embedded op, the parser flips over to parsing the argument list as
appropriate for that opcode.
Fixes #882 .
2017-05-18 16:13:04 -06:00
John Kessenich
71facdf435
SPV: Give error on not assigning locations to I/O.
...
Also, provides an option to auto-assign locations.
Existing tests use this option, to avoid the error message,
however, it is not fully implemented yet.
2017-05-18 15:07:05 -06:00
John Kessenich
24e895b4a3
Merge pull request #860 from steve-lunarg/sb-counter-args.2
...
HLSL: add ability to pass struct buffers with counters to fns
2017-05-17 10:55:22 -06:00