HLSL: Partially flatten hierarchies, instead of all or nothing.
Fixes #1092. Allows arrays of opaques to keep arrayness, unless needed by uniform array flattening. Can handle assignments of mixed amounts of flattening.
This commit is contained in:
parent
60e9161100
commit
41aa19953f
8 changed files with 741 additions and 163 deletions
16
Test/hlsl.partialFlattenMixed.vert
Normal file
16
Test/hlsl.partialFlattenMixed.vert
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
Texture2D tex[2];
|
||||
|
||||
struct Packed {
|
||||
int a;
|
||||
Texture2D membTex[2];
|
||||
int b;
|
||||
};
|
||||
|
||||
float4 main(float4 pos : POSITION) : SV_POSITION
|
||||
{
|
||||
Packed packed;
|
||||
|
||||
packed.membTex = tex;
|
||||
|
||||
return pos;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue