Commit Graph

16 Commits

Author SHA1 Message Date
baldurk
141bc5a54f Fix type recursion with EOpIndexIndirect dereferences
* This primarily affects arrays-of-arrays but it can also affect arrays-of-
  structs if there are no further dereferences.
2019-02-21 12:52:05 +00:00
baldurk
879562b766 Fix treatment of array input/output variables in reflection
* Non-block arrays should not be ignored when exploding types.
* When not exploding, set the array size correctly on each item.
2019-02-11 16:39:12 +00:00
baldurk
a972e73ad7 Add option to reflect all block members, inactive or active.
* The stages mask is more fine-grained, and each variable or block's mask
  indicates which stages it's active in.
2019-02-04 12:02:59 +00:00
baldurk
0af5e3e346 Reflect pipeline outputs as well as inputs, optionally from other stages
* We add an option to reflect inputs from other stages than vertex, if only a
  later subset of the stages is linked into the program.
2019-02-04 12:02:59 +00:00
baldurk
15c37f79a9 Include array index in reflected uniform names more consistently
* This comes from the resolution of issues 4, 5 & 6 in
  ARB_program_interface_query, stating that uniform buffers should have their
  members expanded out as normal and arrays should have elements added.
* If a buffer block has a large array e.g. [10000] we don't want to iterate over
  every array element. Instead we should only expand out the first [0] element,
  then expand as normal from there.
* The array name should still be appended with [0] to indicate that it's an
  array.
2019-02-04 11:21:09 +00:00
baldurk
90995f5dae Update reflection offset consistently for structure members
* Previously the offset was only updated with EOpIndexDirectStruct, but we also
  need to update it for the other index types into arrays, and when expanding an
  aggregate reached after dereferencing.
2019-01-29 17:00:53 +00:00
John Kessenich
a353bf1f20 Nonfunctional: Add reflect test case, and fix long lines in reflection code. 2017-07-28 17:32:27 -06:00
Thomas Perl
bef7428dfd Update test cases for vertex attribute reflection 2016-05-19 09:30:29 +02:00
John Kessenich
ddea678e3e Implement GL_ARB_shader_image_load_store. Partly done (format layout qualifiers) from a submission.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27670 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-08-10 18:19:36 +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
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