Commit Graph

15 Commits

Author SHA1 Message Date
John Kessenich
fb06e9552e Don't print the "Linked stage" message unless the AST is being dumped. 2016-12-03 13:59:51 -07:00
steve-lunarg
8ffc36aecc add reflection queries to return a TType. Fix minor issue with interface names.
- Add new queries: TProgram::getUniformTType and getUniformBlockTType,
  which return a const TType*, or nullptr on a bad index.  These are valid for
  any source language.

- Interface name for HLSL cbuffers is taken from the (only) available declaration name,
  whereas before it was always an empty string, which caused some troubles with reflection
  mapping them all to the same index slot.  This also makes it appear in the SPIR-V binary
  instead of an empty string.

- Print the binding as part of the reflection textual dump.

- TType::clone becomes const.  Needed to call it from a const method, and anyway it doesn't
  change the object it's called on.

- Because the TObjectReflection constructor is called with a TType *reference* (not pointer)
  so that it's guaranteed to pass in a type, and the "badReflection" value should use a nullptr
  there, that now has a dedicated static method to obtain the bad value.  It uses a private
  constructor, so external users can't create one with a nullptr type.
2016-10-02 16:57:58 -06:00
Thomas Perl
bef7428dfd Update test cases for vertex attribute reflection 2016-05-19 09:30:29 +02:00
John Kessenich
e95fa5e095 Tests: Update to match previous pull request. 2016-01-13 19:04:19 -07:00
John Kessenich
cc16fa0720 Tests: Move to just linefeed to simply cross-platform test changes. 2015-12-10 18:01:54 -07:00
John Kessenich
6626cadbad glslang front-end: Don't emit blank lines for empty info logs. From Andrew Woloszyn <awoloszyn@google.com>.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31531 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-06-19 05:14:19 +00:00
John Kessenich
cf0206c341 Restore r26245 and all tests and test results since 4/1:
r26245: Remove "not yet complete" warning for versions 130 and 140, after tidying up a bit and adding tests.  Token pasting is the only known missing feature, and gives its own message now on use.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26226 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-04-14 15:46:40 +00:00
John Kessenich
5b9f98854c Reflection: Eliminate redundant arrayed block entries, and use block name instead of instance name for active uniform enumeration.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24182 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-23 00:44:18 +00:00
John Kessenich
04884e42ed Reflection: Expand out block arrays to N different blocks.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24159 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-21 00:54:57 +00:00
John Kessenich
43e43ce77a Reflection: Flesh out expansions of complex aggregates not fully dereferenced, visit all array elements for a variable index, and correct max array index when a later occurrence is larger than an earlier one.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24080 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-15 20:41:31 +00:00
John Kessenich
c17dbd516f Reflection: Optimize leaf-array sizes for largest index used in a live path.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24073 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-15 05:28:51 +00:00
John Kessenich
12f9221e44 Reflection:
- correct block data size
 - handle deep dereference chains (block.member.member.member)
 - more clear interface argument names

(Still TBD: optimizing array size based on biggest used index and handling variable array index in middle of deep dereference chain)

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24072 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-15 01:34:27 +00:00
John Kessenich
ec252dfd3b Reflection: Add translation from glslang types to the API #define types.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24042 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-13 19:07:43 +00:00
John Kessenich
568bc3ae55 Reflection: Implement the std140 block offset calculation rules.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24027 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-13 05:40:44 +00:00
John Kessenich
11f9fc7247 Add and partially implement an interface for doing uniform reflection. It includes an AST traversal to identify live accesses.
It does not yet correctly compute block offsets, give correct GL-API-style type values, or handle arrays.

This is tied to the new -q flag.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23938 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-07 01:06:34 +00:00