Commit Graph

25 Commits

Author SHA1 Message Date
Jeremy Hayes
78221d619e Update CHANGES for release 11.12.0 2022-10-13 10:58:53 -06:00
Graeme Leese
182ab460d9 Update test expected files with new magic number
Updating the SPIR-V generator version number changes the output of all
the SPIR-V tests.
2020-06-22 11:49:38 +01:00
John Kessenich
3641ff7378 Bump code gen version, due to removal of OpEntryPoint operands. 2020-06-10 07:40:56 -06:00
John Kessenich
31c3370d83 Bump up the generator version, which is exposed in SPV test results. 2019-11-02 21:26:40 -06:00
John Kessenich
d6c975572e Change the major revision number for next commit. 2018-06-04 15:33:31 -06:00
John Kessenich
ac3707921e Revert the commits that change OpArrayLength type and bumped the version number.
Now, version 5.* is all connected to making the uint type, which doesn't quite work.
Generator versions 4 and 6 do not do this.
2018-03-07 11:48:25 -07:00
John Kessenich
0216f24f0e SPV: Bump up the generator number. 2018-03-03 11:47:07 -07:00
John Kessenich
71b5da60d0 SPV: Bump up generator number, because previous commit changes code gen slightly. 2018-02-06 08:06:36 -07:00
John Kessenich
2b5ea9f851 SPV Version: Emit the requested SPIR-V version, not the header version.
Fixes #1236.
2018-01-31 18:41:59 -07:00
John Kessenich
6c1c2766b6 SPV: Bump SPIR-V header to the unified1 version (version 1.2). 2018-01-29 16:16:11 -07:00
John Kessenich
c72e5937dd SPV: Bump the generator number to account for barrier changes. 2017-12-16 00:34:08 -07:00
John Kessenich
07ed11f9a0 SPV: GeneratorVersion: bump version number because of atomic decrement change. 2017-10-07 11:41:20 -06:00
John Kessenich
e516d4335f HLSL: Move debug naming to a simpler, more consistent, scheme.
This will help in expanding flattening and reducing splitting.
2017-08-09 14:29:29 -06:00
John Kessenich
2b4f77f2dc HLSL: Correct use of isPerVertexBuiltIn() to be isClipOrCullDistance().
This allows removal of isPerVertexBuiltIn(). It also leads to
removal of addInterstageIoToLinkage(), which is no longer needed.

Includes related name improvements.
2017-08-04 15:32:24 -06:00
John Kessenich
cca42a8ea6 HLSL: Stop including empty structures in the I/O interface. Fix #785. 2017-08-03 18:41:48 -06:00
John Kessenich
6fa17641b5 HLSL: Emit the OpSource HLSL instruction for HLSL, using new headers. 2017-04-07 15:40:01 -06:00
John Kessenich
71c100d7c0 GLSL output: Removed fixed-size buffer; fixes #769.
Makes some white-space differences in most output, plus a few cases
where more could have been put out but was cut short by the previous
fix-sized buffer.
2017-03-14 19:51:29 -06:00
steve-lunarg
4198b8bfc4 WIP: HLSL: preserve empty structures after splitting 2017-03-09 19:10:57 -07:00
John Kessenich
bf47286fe7 HLSL: Move to fine-grained control for defining input/output/uniform IO types. 2017-02-06 23:13:16 -07:00
steve-lunarg
2c5ab9c8fc HLSL: remove pervertex output blocks
This removes pervertex output blocks, in favor of using only
loose variables.  The pervertex blocks are not required and were
only partly implemented, and were adding some complication.

This change goes with wrap-entry-point.
2017-02-06 23:00:51 -07:00
John Kessenich
abd8dca86d HLSL: Make the entry-point shadow function have non-IO params and return.
This also removes an no longer needed makeTemporary() and rationalizes
makeTypeNonIo()'s interface.
2017-02-06 22:58:32 -07:00
John Kessenich
02467d8d94 HLSL: Wrap the entry-point; need to write 'in' args, and support 'inout' args.
This needs some render testing, but is destined to be part of master.

This also leads to a variety of other simplifications.
 - IO are global symbols, so only need one list of linkage nodes (deferred)
 - no longer need parse-context-wide 'inEntryPoint' state, entry-point is localized
 - several parts of splitting/flattening are now localized
2017-02-06 22:58:32 -07:00
steve-lunarg
46d5428422 WIP: add other builtins to interstage IO
(Still adding tests: do not commit)

This fixes PR #632 so that:

(a) The 4 PerVertex builtins are added to an interface block for all stages except fragment.

(b) Other builtin qualified variables are added as "loose" linkage members.

(c) Arrayness from the PerVertex builtins is moved to the PerVertex block.

(d) Sometimes, two PerVertex blocks are created, one for in, one for out (e.g, for some GS that
    both reads and writes a Position)
2017-01-09 13:58:05 -07:00
steve-lunarg
132d331870 HLSL: struct splitting: assignments of hierarchical split types
This commit adds support for copying nested hierarchical types of split
types.  E.g, a struct of a struct containing both user and builtin interstage
IO variables.

When copying split types, if any subtree does NOT contain builtin interstage
IO, we can copy the whole subtree with one assignment, which saves a bunch
of AST verbosity for memberwise copies of that subtree.
2016-12-26 20:17:13 -07:00
steve-lunarg
a2e7531057 HLSL: inter-stage structure splitting.
This adds structure splitting, which among other things will enable GS support where input structs
are passed, and thus become input arrays of structs in the GS inputs.  That is a common GS case.

The salient points of this PR are:

* Structure splitting has been changed from "always between stages" to "only into the VS and out of
  the PS".  It had previously happened between stages because it's not legal to pass a struct
  containing a builtin IO variable.

* Structs passed between stages are now split into a struct containing ONLY user types, and a
  collection of loose builtin IO variables, if any.  The user-part is passed as a normal struct
  between stages, which is valid SPIR-V now that the builtin IO is removed.

* Internal to the shader, a sanitized struct (with IO qualifiers removed) is used, so that e.g,
  functions can work unmodified.

* If a builtin IO such as Position occurs in an arrayed struct, for example as an input to a GS,
  the array reference is moved to the split-off loose variable, which is given the array dimension
  itself.

When passing things around inside the shader, such as over a function call, the the original type
is used in a sanitized form that removes the builtIn qualifications and makes them temporaries.
This means internal function calls do not have to change.  However, the type when returned from
the shader will be member-wise copied from the internal sanitized one to the external type.
The sanitized type is used in variable declarations.

When copying split types and unsplit, if a sub-struct contains only user variables, it is copied
as a single entity to avoid more AST verbosity.

Above strategy arrived at with talks with @johnkslang.

This is a big complex change.  I'm inclined to leave it as a WIP until it can get some exposure to
real world cases.
2016-12-26 10:11:15 -07:00