qining
0840838d17
Support specialization composite constants
Fix issue #163, support creation and reference of composite type
specialization constants.
e.g.:
```
layout(constant_id = 200) const float myfloat = 1.25;
layout(constant_id = 201) const int myint = 14;
struct structtype {
float f;
int i;
};
const structtype outer_struct_var = {myfloat, myint};
void main(){}
```
generated code (use glslangValidator):
```
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 12
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main"
Source GLSL 450
Name 4 "main"
Name 10 "structtype"
MemberName 10(structtype) 0 "f"
MemberName 10(structtype) 1 "i"
Decorate 7 SpecId 200
Decorate 9 SpecId 201
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: 6(float) SpecConstant 1067450368
8: TypeInt 32 1
9: 8(int) SpecConstant 14
10(structtype): TypeStruct 6(float) 8(int)
11:10(structtype) SpecConstantComposite 7 9
4(main): 2 Function None 3
5: Label
Return
FunctionEnd
```
Rname two function names to match their functionalities.
1) Rename `GlslangToSpvTraverser::createSpvSpecConstant()` to
`createSpvConstant()`;
2) Rename `GlslangToSpvTraverser::createSpvConstant()` to
`createSpvConstantFromConstUnionArray()`
Add function `GlslangToSpvTraverser::createSpvConstantFromSubTree()` to
handle constant creation from sub trees (e.g.: specialization constants).
Related PR: #208
2016-03-24 18:04:00 -04:00
..
2016-03-24 18:04:00 -04:00
2016-03-03 12:12:07 -05:00
2015-04-30 03:22:41 +00: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-02-02 15:59:12 -07: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
2015-09-11 15:25:38 -06:00
2015-11-28 16:52:25 -07: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
2015-10-05 10:00:27 -06:00
2015-09-11 15:25:38 -06:00
2015-05-08 00:54:34 +00:00
2015-10-02 15:01:53 -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
2015-11-28 16:52:25 -07:00
2015-06-19 23:03:32 +00:00
2014-05-06 06:02:01 +00:00
2013-12-13 18:38:43 +00:00
2014-04-14 15:46:40 +00:00
2014-08-18 21:27:53 +00:00
2014-05-06 06:02:01 +00:00
2015-12-11 17:54:35 -07:00
2013-10-17 19:43:43 +00:00
2015-09-15 19:38:56 -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
2015-10-14 14:10:30 -06:00
2014-08-13 06:37:59 +00:00
2014-08-13 16:54:02 +00: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
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-02-01 11:57:33 -07:00
2015-06-17 16:15:09 +00:00
2015-07-20 12:29:41 -06:00
2013-12-30 20:34:28 +00: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
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
2015-07-21 16:00:34 -06:00
2015-06-26 10:48:26 -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
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-02-15 21:46:55 -07: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
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
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
2015-06-17 02:38:44 +00: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
2014-08-10 18:19:36 +00:00
2015-12-11 17:54:35 -07: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
2015-09-13 10:18:19 -06:00
2015-05-15 21:32:46 +00:00
2016-03-18 16:26:23 +08: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-02-19 12:21:50 -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
2016-02-15 21:46:55 -07: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
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-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-02-15 21:46:55 -07: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-01-22 17:47:22 -07:00
2016-02-21 21:02:08 +08:00
2016-01-19 10:14:50 -05: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-02-15 21:46:55 -07: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-02-15 21:46:55 -07:00
2015-11-15 22:31:41 -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-19 22:24:03 +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-03-24 18:04:00 -04: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-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-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-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
2016-03-09 15:11:56 -05:00
2016-03-24 18:04:00 -04:00
2015-06-17 16:15:09 +00:00
2016-02-15 21:46:55 -07: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-02-15 21:46:55 -07:00
2016-02-15 21:46:55 -07:00
2016-03-08 21:43:14 -07:00
2015-06-17 16:15:09 +00:00