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
This commit is contained in:
parent
1d1132d9eb
commit
04884e42ed
@ -27,12 +27,13 @@ ERROR: 0:83: 'lines' : does not only apply to output
|
||||
ERROR: 0:85: 'triangles' : cannot change previously set input primitive
|
||||
ERROR: 0:86: 'triangles_adjacency' : cannot change previously set input primitive
|
||||
ERROR: 0:88: 'invocations' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:88: 'max_vertices' : too large, must be less than gl_MaxGeometryOutputVertices
|
||||
ERROR: 0:91: 'stream' : member cannot contradict block
|
||||
ERROR: 28 compilation errors. No code generated.
|
||||
ERROR: 29 compilation errors. No code generated.
|
||||
|
||||
|
||||
invocations = 4
|
||||
max_vertices = 127
|
||||
max_vertices = 300
|
||||
input primitive = lines_adjancency
|
||||
output primitive = triangle_strip
|
||||
ERROR: node is still EOpNull!
|
||||
|
@ -76,6 +76,7 @@ deepD[1].d2.d1[2].b: offset -1, type 8b56, size 1, index -1
|
||||
deepD[1].d2.d1[3].va: offset -1, type 8b50, size 3, index -1
|
||||
deepD[1].d2.d1[3].b: offset -1, type 8b56, size 1, index -1
|
||||
deepD[1].v3: offset -1, type 8b54, size 1, index -1
|
||||
arrBl[2].foo: offset 0, type 1406, size 1, index 7
|
||||
anonMember1: offset 0, type 8b51, size 1, index 0
|
||||
uf1: offset -1, type 1406, size 1, index -1
|
||||
uf2: offset -1, type 1406, size 1, index -1
|
||||
@ -86,4 +87,8 @@ nameless: offset -1, type ffffffff, size 496, index -1
|
||||
named: offset -1, type ffffffff, size 304, index -1
|
||||
c_nameless: offset -1, type ffffffff, size 112, index -1
|
||||
nested: offset -1, type ffffffff, size 28, index -1
|
||||
abl[0]: offset -1, type ffffffff, size 4, index -1
|
||||
abl[1]: offset -1, type ffffffff, size 4, index -1
|
||||
abl[2]: offset -1, type ffffffff, size 4, index -1
|
||||
abl[3]: offset -1, type ffffffff, size 4, index -1
|
||||
|
||||
|
@ -119,6 +119,10 @@ void liveFunction1(uimage2D p_ui2D, sampler2D p_2D, sampler2DMSArray p_2DMSArray
|
||||
vec4 v = ablock.member3;
|
||||
}
|
||||
|
||||
uniform abl {
|
||||
float foo;
|
||||
} arrBl[4];
|
||||
|
||||
void main()
|
||||
{
|
||||
liveFunction1(image_ui2D, sampler_2D, sampler_2DMSArray);
|
||||
@ -156,4 +160,6 @@ void main()
|
||||
deep3 da[2] = deepD;
|
||||
} else
|
||||
f = ufDead3;
|
||||
|
||||
f += arrBl[2].foo;
|
||||
}
|
||||
|
@ -376,9 +376,19 @@ public:
|
||||
const TString& blockName = anonymous ? base->getType().getTypeName() : base->getType().getTypeName();
|
||||
TReflection::TNameToIndex::const_iterator it = reflection.nameToIndex.find(blockName);
|
||||
if (it == reflection.nameToIndex.end()) {
|
||||
blockIndex = reflection.indexToUniformBlock.size();
|
||||
reflection.nameToIndex[blockName] = blockIndex;
|
||||
reflection.indexToUniformBlock.push_back(TObjectReflection(blockName, offset, -1, getBlockSize(base->getType()), -1));
|
||||
if (base->getType().isArray()) {
|
||||
assert(! anonymous);
|
||||
for (int e = 0; e < base->getType().getArraySize(); ++e) {
|
||||
TString elementName = blockName + "[" + String(e) + "]";
|
||||
blockIndex = reflection.indexToUniformBlock.size();
|
||||
reflection.nameToIndex[elementName] = blockIndex;
|
||||
reflection.indexToUniformBlock.push_back(TObjectReflection(elementName, offset, -1, getBlockSize(base->getType()), -1));
|
||||
}
|
||||
} else {
|
||||
blockIndex = reflection.indexToUniformBlock.size();
|
||||
reflection.nameToIndex[blockName] = blockIndex;
|
||||
reflection.indexToUniformBlock.push_back(TObjectReflection(blockName, offset, -1, getBlockSize(base->getType()), -1));
|
||||
}
|
||||
} else
|
||||
blockIndex = it->second;
|
||||
offset = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user