steve-lunarg
a2b01a0da8
HLSL: Recursive composite flattening
...
This PR implements recursive type flattening. For example, an array of structs of other structs
can be flattened to individual member variables at the shader interface.
This is sufficient for many purposes, e.g, uniforms containing opaque types, but is not sufficient
for geometry shader arrayed inputs. That will be handled separately with structure splitting,
which is not implemented by this PR. In the meantime, that case is detected and triggers an error.
The recursive flattening extends the following three aspects of single-level flattening:
- Flattening of structures to individual members with names such as "foo[0].samp[1]";
- Turning constant references to the nested composite type into a reference to a particular
flattened member.
- Shadow copies between arrays of flattened members and the nested composite type.
Previous single-level flattening only flattened at the shader interface, and that is unchanged by this PR.
Internally, shadow copies are, such as if the type is passed to a function.
Also, the reasons for flattening are unchanged. Uniforms containing opaque types, and interface struct
types are flattened. (The latter will change with structure splitting).
One existing test changes: hlsl.structin.vert, which did in fact contain a nested composite type to be
flattened.
Two new tests are added: hlsl.structarray.flatten.frag, and hlsl.structarray.flatten.geom (currently
issues an error until type splitting is online).
The process of arriving at the individual member from chained postfix expressions is more complex than
it was with one level. See large-ish comment above HlslParseContext::flatten() for details.
2016-12-07 14:40:01 -07:00
..
2016-12-07 14:40:01 -07:00
2016-03-03 12:12:07 -05:00
2016-06-17 12:43:31 -06:00
2013-12-04 17:23:03 +00:00
2013-12-11 22:38:19 +00:00
2015-10-06 13:11:38 -06:00
2014-07-29 18:11:09 +00:00
2016-07-19 15:13:47 -06:00
2014-08-10 18:19:36 +00:00
2014-04-14 16:14:30 +00:00
2015-04-30 03:22:41 +00:00
2014-10-06 16:38:53 +00:00
2015-12-09 15:03:41 +08:00
2014-10-17 20:01:27 +00:00
2015-11-28 16:52:25 -07:00
2013-12-18 18:47:12 +00:00
2014-12-20 07:03:18 +00:00
2015-12-22 16:39:07 -07:00
2015-11-28 12:52:29 -07:00
2015-09-30 18:57:47 -06:00
2015-06-29 17:19:17 -06:00
2014-08-14 07:07:21 +00:00
2014-01-28 21:13:59 +00:00
2013-10-15 21:46:20 +00:00
2013-10-15 21:46:20 +00:00
2013-10-15 21:46:20 +00:00
2013-11-09 00:18:22 +00:00
2013-12-11 22:38:19 +00:00
2016-06-14 22:12:20 -06:00
2016-06-14 22:12:20 -06:00
2015-06-23 04:14:00 +00:00
2015-11-28 16:52:25 -07:00
2015-08-16 12:09:15 -06:00
2016-06-14 22:12:20 -06:00
2015-09-11 15:25:38 -06:00
2015-05-08 00:54:34 +00:00
2016-06-05 17:25:34 -06:00
2013-02-27 19:02:52 +00:00
2016-01-22 15:40:24 -07:00
2016-01-16 20:37:43 -07:00
2016-05-04 12:54:56 -06:00
2015-06-19 23:03:32 +00:00
2016-08-21 14:26:27 -06:00
2014-05-06 06:02:01 +00:00
2013-12-13 18:38:43 +00:00
2016-06-05 18:52:05 -06:00
2014-04-14 15:46:40 +00:00
2016-05-30 19:38:39 -06:00
2016-07-19 15:50:58 -06:00
2014-05-06 06:02:01 +00:00
2015-12-11 17:54:35 -07:00
2016-07-29 18:29:06 -06:00
2016-07-27 14:55:06 -06:00
2015-09-11 15:25:38 -06:00
2015-09-15 19:38:56 -06:00
2015-08-10 17:08:55 -06:00
2013-12-11 22:38:19 +00:00
2015-12-09 15:03:41 +08:00
2016-08-08 15:29:25 -06:00
2014-08-13 06:37:59 +00:00
2016-05-19 12:26:27 +08:00
2014-08-13 06:37:59 +00:00
2015-11-28 16:52:25 -07:00
2014-08-13 06:37:59 +00:00
2014-10-28 05:24:14 +00:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2013-11-12 22:02:36 +00:00
2015-07-22 11:44:59 -06:00
2014-08-19 06:08:38 +00:00
2015-07-27 09:37:55 -06:00
2016-07-19 14:32:52 -06:00
2015-06-26 10:48:26 -06:00
2013-06-25 21:09:47 +00:00
2015-06-17 16:15:09 +00:00
2013-10-17 20:55:30 +00:00
2016-07-12 01:27:48 -06:00
2015-06-17 16:15:09 +00:00
2016-07-30 13:39:52 -06:00
2015-07-20 12:29:41 -06:00
2016-07-19 14:32:52 -06:00
2013-12-30 20:34:28 +00:00
2015-07-25 17:34:32 -06:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2013-09-20 06:20:21 +00:00
2014-02-18 21:55:42 +00:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2013-10-28 18:12:06 +00:00
2013-10-28 18:12:06 +00:00
2013-10-28 18:12:06 +00:00
2013-03-04 23:50:08 +00:00
2016-05-24 13:15:01 +02:00
2016-05-24 13:15:01 +02:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2013-06-19 05:41:25 +00:00
2015-06-17 16:15:09 +00:00
2016-06-28 23:56:31 -06:00
2015-06-26 10:48:26 -06:00
2016-07-07 19:27:15 -06:00
2016-07-07 19:27:15 -06:00
2016-07-07 19:27:15 -06:00
2016-07-07 19:27:15 -06:00
2016-07-07 19:27:15 -06:00
2016-09-29 23:59:26 -06:00
2016-09-29 10:25:15 -06:00
2016-06-19 11:50:34 -06:00
2016-10-13 12:32:04 -06:00
2016-10-13 12:32:04 -06:00
2016-05-16 17:39:50 -06:00
2016-11-11 08:23:03 -07:00
2016-09-02 19:13:36 -06:00
2016-10-16 12:22:20 -06:00
2016-11-21 18:25:08 -07:00
2016-09-25 20:26:03 -06:00
2016-07-27 10:46:33 -06:00
2016-07-27 10:46:33 -06:00
2016-06-03 16:57:53 -06:00
2016-10-26 08:50:10 -06:00
2016-07-27 10:39:57 -06:00
2016-07-30 08:09:09 -06:00
2016-09-02 20:05:52 -06:00
2016-09-02 20:05:52 -06:00
2016-09-02 19:13:36 -06:00
2016-10-26 08:50:10 -06:00
2016-09-19 00:06:19 -06:00
2016-10-01 17:11:21 -06:00
2016-12-01 08:51:43 -07:00
2016-10-04 17:07:45 -06:00
2016-09-29 10:25:15 -06:00
2016-09-29 10:25:15 -06:00
2016-10-26 08:50:10 -06:00
2016-05-13 09:33:42 -06:00
2016-07-22 12:46:11 -06:00
2016-07-22 12:46:11 -06:00
2016-07-22 12:46:11 -06:00
2016-07-22 12:46:11 -06:00
2016-07-22 12:46:11 -06:00
2016-08-03 13:34:39 -06:00
2016-08-03 13:34:39 -06:00
2016-08-03 13:34:39 -06:00
2016-08-03 13:34:39 -06:00
2016-08-03 13:34:39 -06:00
2016-08-03 13:34:39 -06:00
2016-08-03 13:34:39 -06:00
2016-08-03 13:34:39 -06:00
2016-07-27 07:37:21 -06:00
2016-07-18 16:40:21 -06:00
2016-10-06 10:51:52 -06:00
2016-07-27 10:46:33 -06:00
2016-11-16 13:22:11 -07:00
2016-10-26 08:50:10 -06:00
2016-07-30 10:47:33 -06:00
2016-09-29 10:25:15 -06:00
2016-10-16 12:12:11 -06:00
2016-06-20 09:53:59 -06:00
2016-10-16 12:22:20 -06:00
2016-06-28 15:38:38 -06:00
2016-06-20 09:53:59 -06:00
2016-06-30 14:13:03 -06:00
2016-11-23 10:36:34 -07:00
2016-06-20 09:53:59 -06:00
2016-08-11 07:29:30 -06:00
2016-06-30 14:13:03 -06:00
2016-09-29 10:25:15 -06:00
2016-11-23 10:36:34 -07:00
2016-11-23 10:36:34 -07:00
2016-11-23 10:36:34 -07:00
2016-06-30 14:13:03 -06:00
2016-09-05 14:37:03 -06:00
2016-07-27 07:37:21 -06:00
2016-07-21 09:42:35 -06:00
2016-07-21 09:42:35 -06:00
2016-07-27 07:37:21 -06:00
2016-07-27 15:57:31 -06:00
2016-10-14 18:44:32 -06:00
2016-07-21 09:42:35 -06:00
2016-07-21 09:42:35 -06:00
2016-10-06 10:51:52 -06:00
2016-10-06 10:51:52 -06:00
2016-10-06 10:51:52 -06:00
2016-10-18 16:56:37 -06:00
2016-10-26 12:54:56 -06:00
2016-10-18 16:56:37 -06:00
2016-11-16 11:19:22 -07:00
2016-09-09 12:02:42 -06:00
2016-11-16 11:19:22 -07:00
2016-09-02 19:13:36 -06:00
2016-11-16 11:19:22 -07:00
2016-05-16 17:39:50 -06:00
2016-10-31 12:46:05 -06:00
2016-09-02 20:24:07 -06:00
2016-10-06 13:06:13 -06:00
2016-07-28 14:49:48 -06:00
2016-10-31 09:28:17 -06:00
2016-08-25 23:57:39 -06:00
2016-11-27 22:51:36 -07:00
2016-07-23 10:45:00 -06:00
2016-05-16 17:39:50 -06:00
2016-07-28 21:48:25 -06:00
2016-09-29 10:25:15 -06:00
2016-10-18 16:56:37 -06:00
2016-11-13 14:44:46 -07:00
2016-08-09 13:48:47 -06:00
2016-10-02 16:57:58 -06:00
2016-09-19 23:12:48 -06:00
2016-10-19 10:25:23 -06:00
2016-10-12 12:39:44 -06:00
2016-11-01 14:44:54 -06:00
2016-10-14 18:44:32 -06:00
2016-10-14 18:44:32 -06:00
2016-07-15 11:38:49 -06:00
2016-07-15 11:38:49 -06:00
2016-07-15 11:38:49 -06:00
2016-07-15 11:38:49 -06:00
2016-10-14 18:44:32 -06:00
2016-07-15 11:38:49 -06:00
2016-07-15 11:38:49 -06:00
2016-07-15 11:38:49 -06:00
2016-07-15 11:38:49 -06:00
2016-07-20 09:57:03 -06:00
2016-07-20 09:57:03 -06:00
2016-07-20 09:57:03 -06:00
2016-07-20 09:57:03 -06:00
2016-07-20 09:57:03 -06:00
2016-07-20 09:57:03 -06:00
2016-07-20 09:57:03 -06:00
2016-07-20 09:57:03 -06:00
2016-07-15 11:38:49 -06:00
2016-07-15 11:38:49 -06:00
2016-07-15 11:38:49 -06:00
2016-07-15 11:38:49 -06:00
2016-07-15 11:38:49 -06:00
2016-07-22 12:46:11 -06:00
2016-07-21 15:02:30 -06:00
2016-07-21 15:02:30 -06:00
2016-07-21 15:02:30 -06:00
2016-07-21 15:02:30 -06:00
2016-09-02 19:13:36 -06:00
2016-08-03 07:08:06 -06:00
2016-10-26 08:50:10 -06:00
2016-10-06 16:56:54 -06:00
2016-05-16 17:39:50 -06:00
2016-09-20 13:22:58 -06:00
2016-08-22 17:13:17 -06:00
2016-10-12 12:39:44 -06:00
2016-12-07 14:40:01 -07:00
2016-12-07 14:40:01 -07:00
2016-12-07 14:40:01 -07:00
2016-07-01 00:04:11 -06:00
2016-09-29 10:25:15 -06:00
2016-07-01 13:59:36 -06:00
2016-07-01 13:59:36 -06:00
2016-10-12 12:39:44 -06:00
2016-07-05 00:02:40 -06:00
2016-09-02 19:13:36 -06:00
2016-10-26 08:50:10 -06:00
2015-06-17 16:15:09 +00:00
2015-04-30 03:22:41 +00:00
2015-04-30 03:22:41 +00:00
2013-09-28 04:02:08 +00:00
2014-03-31 22:20:47 +00:00
2014-03-31 22:20:47 +00:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2013-09-04 21:19:27 +00:00
2013-09-04 21:19:27 +00:00
2013-09-04 21:19:27 +00:00
2014-09-08 21:01:09 +00:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2013-08-27 05:57:15 +00:00
2015-12-11 17:54:35 -07:00
2016-06-27 12:44:15 +02:00
2016-05-09 17:07:04 -06:00
2015-10-12 17:02:21 +08:00
2013-11-20 22:16:41 +00:00
2013-11-20 22:16:41 +00:00
2013-09-04 21:19:27 +00:00
2013-02-04 23:54:58 +00:00
2016-05-03 21:18:59 -06:00
2015-05-16 01:15:41 +00:00
2016-01-22 15:40:24 -07:00
2013-02-17 06:01:50 +00:00
2016-05-09 10:46:40 -04:00
2016-05-09 10:46:40 -04:00
2013-11-12 03:31:24 +00:00
2013-07-02 20:18:59 +00:00
2015-06-17 16:15:09 +00:00
2015-07-27 13:07:52 -04:00
2015-07-27 13:07:52 -04:00
2015-08-29 23:15:13 +00:00
2015-06-17 02:38:44 +00:00
2016-04-27 10:05:57 -04:00
2015-07-14 16:02:25 -04:00
2015-07-21 17:47:47 -04:00
2015-06-17 02:38:44 +00:00
2015-07-31 19:41:19 -04:00
2015-07-31 19:41:19 -04:00
2015-07-14 14:37:59 -04:00
2015-06-17 02:38:44 +00:00
2016-03-09 15:11:56 -05:00
2015-06-17 02:38:44 +00:00
2016-08-04 22:46:19 -06:00
2015-07-14 16:02:25 -04:00
2013-10-30 01:22:04 +00:00
2013-10-01 21:58:43 +00:00
2013-10-01 21:58:43 +00:00
2016-05-19 09:30:29 +02:00
2016-08-25 10:46:51 -06:00
2016-08-25 10:46:51 -06:00
2016-08-25 10:46:51 -06:00
2016-08-25 10:46:51 -06:00
2016-08-25 10:46:51 -06:00
2016-08-25 10:46:51 -06:00
2016-08-25 10:46:51 -06:00
2016-10-06 13:06:13 -06:00
2016-10-06 13:06:13 -06:00
2016-08-25 10:46:51 -06:00
2016-08-25 10:46:51 -06:00
2016-08-25 10:46:51 -06:00
2016-08-25 10:46:51 -06:00
2016-08-25 10:46:51 -06:00
2016-08-25 10:46:51 -06:00
2016-08-25 10:46:51 -06:00
2016-08-25 10:46:51 -06:00
2016-08-25 10:46:51 -06:00
2016-08-25 10:46:51 -06:00
2016-08-25 10:46:51 -06:00
2016-08-25 10:46:51 -06:00
2016-12-05 11:31:18 -05:00
2013-11-12 03:31:24 +00:00
2015-12-29 19:20:55 -07:00
2013-02-08 18:56:56 +00:00
2015-12-29 19:20:55 -07:00
2015-06-17 16:15:09 +00:00
2013-10-11 19:46:10 +00:00
2015-08-10 17:08:55 -06:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2015-11-15 22:31:41 -07:00
2015-05-15 21:32:46 +00:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-01-22 17:47:22 -07:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-06-14 20:38:58 -06:00
2015-09-13 10:18:19 -06:00
2015-05-15 21:32:46 +00:00
2016-09-27 10:35:09 +02:00
2015-11-28 16:52:25 -07:00
2015-05-15 21:32:46 +00:00
2016-02-15 21:46:55 -07:00
2016-07-08 14:05:15 -06:00
2016-02-19 12:21:50 -07:00
2016-08-05 15:19:46 -06:00
2016-09-14 14:43:55 +08:00
2016-02-15 21:46:55 -07:00
2016-01-22 17:47:22 -07:00
2016-01-22 17:47:22 -07:00
2016-02-15 21:46:55 -07:00
2016-07-07 17:40:35 -06:00
2016-02-15 21:46:55 -07:00
2015-12-08 20:48:49 -07:00
2016-03-03 14:38:51 +08:00
2016-02-15 21:46:55 -07:00
2016-09-30 14:26:34 -06:00
2015-11-15 22:31:41 -07:00
2016-02-15 21:46:55 -07:00
2016-01-22 17:47:22 -07:00
2016-02-15 21:46:55 -07:00
2016-01-22 17:47:22 -07:00
2015-11-15 22:31:41 -07:00
2015-11-15 22:31:41 -07:00
2016-01-22 17:47:22 -07:00
2016-01-22 17:47:22 -07:00
2016-01-22 17:47:22 -07:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-10-10 16:55:04 +08:00
2016-02-15 21:46:55 -07:00
2016-01-20 11:54:11 -05:00
2016-01-22 17:47:22 -07:00
2016-01-10 23:15:08 -05:00
2016-01-20 11:51:43 -05:00
2016-01-22 17:47:22 -07:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-07-07 19:27:15 -06:00
2016-09-26 17:02:44 -06:00
2016-09-26 17:02:44 -06:00
2016-02-15 21:46:55 -07:00
2016-09-09 17:06:15 +08:00
2016-02-15 21:46:55 -07:00
2015-11-16 09:31:26 -07:00
2015-12-24 10:30:13 -07:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2015-12-12 12:28:14 -07:00
2016-05-14 09:20:52 +08:00
2016-02-21 21:02:08 +08:00
2016-08-23 18:13:08 -06:00
2016-09-11 12:33:43 -06:00
2016-09-02 16:35:01 -06:00
2015-11-22 21:43:05 +08:00
2016-03-11 12:06:41 -05:00
2016-02-15 21:46:55 -07:00
2016-11-05 10:22:33 -06:00
2016-10-07 11:50:25 -06:00
2016-02-15 21:46:55 -07:00
2016-05-09 10:46:40 -04:00
2016-05-09 10:46:40 -04:00
2016-02-15 21:46:55 -07:00
2015-05-15 21:32:46 +00:00
2016-02-15 21:46:55 -07:00
2015-05-15 21:32:46 +00:00
2015-09-15 19:38:56 -06:00
2016-11-23 10:36:34 -07:00
2016-09-20 20:31:27 -06:00
2016-11-23 10:36:34 -07:00
2016-09-20 20:31:27 -06:00
2016-11-01 14:44:54 -06:00
2016-02-15 21:46:55 -07:00
2015-11-15 22:31:41 -07:00
2016-05-05 19:02:35 +08:00
2016-10-11 14:40:35 +08:00
2016-05-05 20:38:33 +08:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-02-19 22:24:03 +08:00
2016-02-15 21:46:55 -07:00
2016-07-07 19:27:15 -06:00
2016-02-15 21:46:55 -07:00
2016-04-04 11:10:41 -04:00
2016-05-23 23:10:18 -06:00
2016-09-05 22:20:28 +08:00
2016-08-23 18:13:08 -06:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-07-26 12:53:54 -06:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-01-22 17:47:22 -07:00
2016-02-15 21:46:55 -07:00
2016-09-09 17:06:15 +08:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-01-22 17:47:22 -07:00
2016-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-01-22 17:47:22 -07:00
2016-01-22 17:47:22 -07:00
2016-02-15 21:46:55 -07:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2015-05-03 22:38:16 +00:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2015-07-25 14:02:53 -06:00
2015-06-17 16:15:09 +00:00
2013-06-19 05:41:25 +00:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2015-06-17 16:15:09 +00:00
2013-06-19 05:41:25 +00:00
2012-12-13 00:05:26 +00:00
2012-12-13 00:05:26 +00:00
2012-12-13 00:05:26 +00:00
2015-06-17 16:15:09 +00:00
2016-05-23 23:10:18 -06:00
2016-02-15 21:46:55 -07:00
2016-07-31 12:39:46 -06:00
2016-05-03 21:18:59 -06:00
2015-06-17 16:15:09 +00:00