John Kessenich
eee9d536bc
Track separate entry-point names and mangled names...
...
... and use each in the correct way at consumption sites.
This completes issue #513 .
2016-09-19 18:09:30 -06:00
John Kessenich
6fccb3cd75
Non-functional: Sweep through the stack for consistent with "main" and entry point.
...
Partially addresses issue #513 .
2016-09-19 16:01:41 -06:00
Rex Xu
64b9743ce0
SPV: Support simultaneous l-value swizzle and dynamic component selection.
2016-09-14 14:43:55 +08:00
John Kessenich
b3e24e4359
SPV: Fix issue #506 : generalize struct deep copy to include arrays.
2016-09-11 12:33:43 -06:00
Rex Xu
c9f349234f
SPV: Use OpBitcast to implement 4 pack/unpack built-in functions.
2016-09-09 17:50:07 +08:00
Rex Xu
64bcfdb632
Parser: Add 64-bit type conversion for specialization constant.
2016-09-05 22:20:28 +08: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
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
steve-lunarg
a8456415b8
WIP: SPV Remapper: add remapper test framework
2016-08-25 10:46:51 -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
811d9f4cad
WIP: SPIRV remapper: allow 64 bit literals in OperandVariableLiteralId class iteration
2016-08-17 08:33:49 -06:00
Dan Baker
55d5f2d4df
HLSL: Changing SPIRV source language to unkown
2016-08-15 16:05:45 -04: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
steve-lunarg
b249f2fc24
SPIRV: allow 64 bit literals in OperandVariableLiteralId class iteration.
2016-08-12 09:53:31 -06:00
John Kessenich
2c6038ecf1
Merge branch 'cpp-headers'
2016-08-11 10:01:13 -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
66ec80e01b
Build: C++ headers: Replace PR #366 with a more directed version.
2016-08-05 14:04:23 -06:00
John Kessenich
f6640761c4
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.)
2016-08-02 21:48:02 -06:00
John Kessenich
1176530bf5
SPV: Prevent issue #415 with better semantic checking.
2016-07-31 12:39:46 -06:00
Rex Xu
ce31aea0d0
SPV: Fix an issue of ++/-- for dvec/dmat.
2016-07-29 16:13:04 +08:00
John Kessenich
8c8505c604
SPV: For AST interpolateAt* ops consuming a swizzle, invert the order.
...
Apply the interpolation first, then apply the swizzle to the result,
the inverse of the order requested by the AST. This fixes issue #411 .
2016-07-26 12:53:54 -06:00
Pyry Haulos
b93e3a3957
Remap Scope and MemorySemantics IDs in SPIRV remapper
...
Scope and MemorySemantics operands contain IDs as well and may need
remapping.
2016-07-22 09:57:28 -07:00
Rex Xu
9d93a2370d
Implement 4 AMD-specific extensions.
...
- Support GL_AMD_shader_ballot (SPV_AMD_shader_ballot).
- Support GL_AMD_shader_trinary_minmax (SPV_AMD_shader_trinary_minmax).
- Support GL_AMD_shader_explicit_vertex_parameter
(SPV_AMD_shader_explicit_vertex_parameter).
- Support GL_AMD_gcn_shader (SPV_AMD_gcn_shader).
2016-07-20 16:18:05 +08:00
John Kessenich
4016e38bea
Build: Switch to Rev. 6 of headers, removing "BadValue" enum stuff.
...
Note: Technically, this is glslang's modified private copy of official headers.
Official headers will appear in other places, like
https://github.com/KhronosGroup/SPIRV-Headers .
2016-07-15 11:55:34 -06:00
John Kessenich
7f349c73db
Build: Remove causes of pedantic warnings. Addresses issue #352 and PR #242 .
2016-07-08 22:09:10 -06:00
John Kessenich
c45dddae5f
Merge pull request #314 from mre4ce/master
...
Added -x option to save SPIR-V as 32-bit hexadecimal numbers to a text file.
2016-07-08 15:26:27 -06:00
John Kessenich
78a4557621
SPV: Fix issue #376 ; declare Geometry capability for fragment use of gl_Layer.
2016-07-08 14:05:15 -06:00
John Kessenich
91e4aa5900
SPV: Further refine OpenGL vs. Vulkan differences for SPIR-V.
...
Includes adding test cases to verify the differences.
2016-07-07 19:27:15 -06:00
John Kessenich
2d0cc786f3
SPV: Turn on atomic-storage functionality for SPIR-V.
...
This is used by OpenGL, but not Vulkan.
Includes:
- atomicCounter, atomicIncrement, atomicCounterDecrement
- atomic_uint layout-offset checking
- AtomicStorage capability
2016-07-07 17:40:35 -06:00
John Kessenich
2f47bc9781
SPV: Don't decorate locations within an array, it doesn't make sense.
...
This fixes issue #360 .
2016-06-30 22:00:09 -06:00
John Kessenich
6090df0fa3
SPV: Non-functional: break up big function into three smaller ones.
...
Also, improve variable names. This grew to be overly hard to understand.
2016-06-30 21:28:33 -06:00
Rex Xu
c884b4a47f
SPV: Certain decorations are missing for structure-typed in/out variables.
2016-06-30 13:11:36 +08:00
LoopDawg
6e72fddaa2
Add HLSL memory barrier intrinsics, fix dst, add lit & EvaluateAttributeSnapped
2016-06-20 09:53:59 -06:00
John Kessenich
5aa59e2044
HLSL: Map parameter qualifiers from generic to function-specific and entry-point specific.
2016-06-17 15:52:46 -06:00
John Kessenich
65336488a8
SPV: projective texturing: move the project coordinate.
...
SPV doesn't allow gaps in the components of the texturing coordinate.
It also removes the shadow reference.
So, close up the components so all used components are together.
2016-06-16 14:06:26 -06:00
John Kessenich
76d4dfcd51
SPV non-functional: minor readability improvements for texturing.
2016-06-16 12:43:23 -06:00
John Kessenich
c51287d744
SPV: Update to spec. decisions (and issue #205 ) for barrier().
...
A barrier (ESSL/GLSL) or OpControlBarrier when in a tessellation control
shader also means doing memory synchronization for output variables.
2016-06-14 19:50:26 -06:00
LoopDawg
592860cae5
Add decompositions for some HLSL intrinsics.
2016-06-10 17:11:18 -06:00
Jason Ekstrand
ed15ef1a5b
GlslangToSpv: Pass the pointer directly into the client function for opaque types
...
For opaque types such as samplers, images, and atomic counters, we want to
reference the actual object in the child function. For a long time, we
used a shadow variable and made a copy of the image/sampler. In 76d0ac1a
,
this was changed to not shadow samplers. However, this didn't cover all
opaque types and it also didn't get the pointer storage classes right.
This commit fixes both of these issues.
Fixes #324
2016-06-08 17:22:46 -07:00
Jason Ekstrand
c24cc29d37
GlslangToSpv: Properly handle opaque types in TranslateStorageClass
2016-06-08 17:05:19 -07:00
David Neto
a901ffed40
Defer capability decl for ClipDistance, CullDistance, PointSize until actual use
...
The compiler will mark struct members with those builtins, but won't
declare the capability until that member is accessed by some executable
instruction.
Test changes:
- spv.430.vert: was missing ClipDistance capability.
- spv.precise.tese: remove TessellationPointSize capability.
2016-06-08 09:30:04 -04:00
GregF
39d5e711a7
remapper: do not eliminate interface variables in dce by default
...
this is done by counting op_entrypoint as a use/def
2016-06-03 09:57:57 -06:00
John Kessenich
a5c33d6ffb
SPV: Fix issue #320 : Fetch needs to extract the image.
...
GLSL takes a traditional sampler, but SPIR-V wants just the
sampled image, not the combined sampler and image.
2016-06-02 23:47:29 -06:00
iostrows
af7f1c8f24
Fix double matrix creation
2016-06-01 16:40:00 +02:00
John Kessenich
d94c003fb7
Front-end: Complete GL_ARB_compute_shader implementation.
...
Core compute shaders were working, but the extension wasn't implemented.
2016-05-30 19:29:40 -06:00
Johannes van Waveren
ecb0f3b75b
Added -x option to save SPIR-V as 32-bit hexadecimal numbers to a text file.
2016-05-27 12:55:53 -05:00
Jason Ekstrand
76d0ac1a6f
SPV: Don't shadow sampler parameters when performing function calls
...
Fixes #179
2016-05-25 13:49:47 -07:00
Rex Xu
bbceed7be3
SPV: Fix an issue of interpolation decoration.
...
GLSL interpolation qualifiers and auxiliary storage qualifiers are not
mutually exclusive. So when they are translated to SPIR-V decorations, two
independent utility methods should be employed to do this job.
2016-05-21 09:45:47 +08:00
John Kessenich
22e0d41448
SPV: Don't put locations on OpTypeStruct. Related to Issue #291 .
2016-05-20 15:40:53 -06:00