Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
4a2aa822
Commit
4a2aa822
authored
Jan 29, 2019
by
baldurk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reflect array stride, top-level array stride, and block member count
parent
0af5e3e3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
185 additions
and
92 deletions
+185
-92
hlsl.automap.frag.out
Test/baseResults/hlsl.automap.frag.out
+10
-10
hlsl.reflection.binding.frag.out
Test/baseResults/hlsl.reflection.binding.frag.out
+4
-4
hlsl.reflection.vert.out
Test/baseResults/hlsl.reflection.vert.out
+48
-48
hlsl.shift.per-set.frag.out
Test/baseResults/hlsl.shift.per-set.frag.out
+10
-10
reflection.options.vert.out
Test/baseResults/reflection.options.vert.out
+11
-7
reflection.vert.out
Test/baseResults/reflection.vert.out
+0
-0
reflection.options.vert
Test/reflection.options.vert
+9
-0
reflection.cpp
glslang/MachineIndependent/reflection.cpp
+84
-10
ShaderLang.h
glslang/Public/ShaderLang.h
+9
-3
No files found.
Test/baseResults/hlsl.automap.frag.out
View file @
4a2aa822
...
...
@@ -3,8 +3,8 @@ Uniform reflection:
t1: offset -1, type 8b5d, size 1, index -1, binding 11, stages 16
t2: offset -1, type 8b5e, size 1, index -1, binding 12, stages 16
t3: offset -1, type 8b5f, size 1, index -1, binding 13, stages 16
t4.@data: offset 0, type 8b52, size 1, index 0, binding -1, stages 16
t5.@data: offset 0, type 1405, size 0, index 1, binding -1, stages 16
t4.@data: offset 0, type 8b52, size 1, index 0, binding -1, stages 16
, arrayStride 16, topLevelArrayStride 16
t5.@data: offset 0, type 1405, size 0, index 1, binding -1, stages 16
, arrayStride 4, topLevelArrayStride 4
t6: offset -1, type 8dc2, size 1, index -1, binding 16, stages 16
s1: offset -1, type 0, size 1, index -1, binding 31, stages 16
s2: offset -1, type 0, size 1, index -1, binding 32, stages 16
...
...
@@ -12,18 +12,18 @@ u1: offset -1, type 904c, size 1, index -1, binding 41, stages 16
u2: offset -1, type 904d, size 1, index -1, binding 42, stages 16
u3: offset -1, type 904e, size 1, index -1, binding 43, stages 16
u4: offset -1, type 9051, size 1, index -1, binding 44, stages 16
u5.@data: offset 0, type 1405, size 0, index 2, binding -1, stages 16
u6.@data: offset 0, type 1406, size 1, index 3, binding -1, stages 16
u5.@data: offset 0, type 1405, size 0, index 2, binding -1, stages 16
, arrayStride 4, topLevelArrayStride 4
u6.@data: offset 0, type 1406, size 1, index 3, binding -1, stages 16
, arrayStride 4, topLevelArrayStride 4
cb1: offset 0, type 1404, size 1, index 4, binding -1, stages 16
tb1: offset 0, type 1404, size 1, index 5, binding -1, stages 16
Uniform block reflection:
t4: offset -1, type ffffffff, size 0, index -1, binding 14, stages 0
t5: offset -1, type ffffffff, size 0, index -1, binding 15, stages 0
u5: offset -1, type ffffffff, size 0, index -1, binding 45, stages 0
u6: offset -1, type ffffffff, size 0, index -1, binding 46, stages 0
cb: offset -1, type ffffffff, size 4, index -1, binding 51, stages 0
tb: offset -1, type ffffffff, size 4, index -1, binding 17, stages 0
t4: offset -1, type ffffffff, size 0, index -1, binding 14, stages 0
, numMembers 1
t5: offset -1, type ffffffff, size 0, index -1, binding 15, stages 0
, numMembers 1
u5: offset -1, type ffffffff, size 0, index -1, binding 45, stages 0
, numMembers 1
u6: offset -1, type ffffffff, size 0, index -1, binding 46, stages 0
, numMembers 1
cb: offset -1, type ffffffff, size 4, index -1, binding 51, stages 0
, numMembers 1
tb: offset -1, type ffffffff, size 4, index -1, binding 17, stages 0
, numMembers 1
Pipeline input reflection:
...
...
Test/baseResults/hlsl.reflection.binding.frag.out
View file @
4a2aa822
...
...
@@ -2,8 +2,8 @@ hlsl.reflection.binding.frag
Uniform reflection:
t1: offset -1, type 8b5d, size 1, index -1, binding 15, stages 16
s1: offset -1, type 0, size 1, index -1, binding 5, stages 16
t1a: offset -1, type 8b5d, size 1, index -1, binding 16, stages 16
s1a: offset -1, type 0, size 1, index -1, binding 6, stages 16
t1a: offset -1, type 8b5d, size 1, index -1, binding 16, stages 16
, arrayStride 4, topLevelArrayStride 4
s1a: offset -1, type 0, size 1, index -1, binding 6, stages 16
, arrayStride 4, topLevelArrayStride 4
c1_a: offset 0, type 8b52, size 1, index 0, binding -1, stages 16
c1_b: offset 16, type 1404, size 1, index 0, binding -1, stages 16
c1_c: offset 20, type 1406, size 1, index 0, binding -1, stages 16
...
...
@@ -12,8 +12,8 @@ c2_b: offset 16, type 1404, size 1, index 1, binding -1, stages 16
c2_c: offset 20, type 1406, size 1, index 1, binding -1, stages 16
Uniform block reflection:
cbuff1: offset -1, type ffffffff, size 24, index -1, binding 2, stages 0
cbuff2: offset -1, type ffffffff, size 24, index -1, binding 3, stages 0
cbuff1: offset -1, type ffffffff, size 24, index -1, binding 2, stages 0
, numMembers 3
cbuff2: offset -1, type ffffffff, size 24, index -1, binding 3, stages 0
, numMembers 3
Pipeline input reflection:
...
...
Test/baseResults/hlsl.reflection.vert.out
View file @
4a2aa822
This diff is collapsed.
Click to expand it.
Test/baseResults/hlsl.shift.per-set.frag.out
View file @
4a2aa822
...
...
@@ -203,8 +203,8 @@ Uniform reflection:
t1: offset -1, type 8b5d, size 1, index -1, binding 21, stages 16
t2: offset -1, type 8b5e, size 1, index -1, binding 22, stages 16
t3: offset -1, type 8b5f, size 1, index -1, binding 26, stages 16
t4.@data: offset 0, type 8b52, size 1, index 0, binding -1, stages 16
t5.@data: offset 0, type 1405, size 0, index 1, binding -1, stages 16
t4.@data: offset 0, type 8b52, size 1, index 0, binding -1, stages 16
, arrayStride 16, topLevelArrayStride 16
t5.@data: offset 0, type 1405, size 0, index 1, binding -1, stages 16
, arrayStride 4, topLevelArrayStride 4
t6: offset -1, type 8dc2, size 1, index -1, binding 23, stages 16
s1: offset -1, type 0, size 1, index -1, binding 11, stages 16
s2: offset -1, type 0, size 1, index -1, binding 17, stages 16
...
...
@@ -212,19 +212,19 @@ u1: offset -1, type 904c, size 1, index -1, binding 31, stages 16
u2: offset -1, type 904d, size 1, index -1, binding 42, stages 16
u3: offset -1, type 904e, size 1, index -1, binding 43, stages 16
u4: offset -1, type 9051, size 1, index -1, binding 34, stages 16
u5.@data: offset 0, type 1405, size 0, index 2, binding -1, stages 16
u6.@data: offset 0, type 1406, size 1, index 3, binding -1, stages 16
u5.@data: offset 0, type 1405, size 0, index 2, binding -1, stages 16
, arrayStride 4, topLevelArrayStride 4
u6.@data: offset 0, type 1406, size 1, index 3, binding -1, stages 16
, arrayStride 4, topLevelArrayStride 4
cb1: offset 0, type 1404, size 1, index 4, binding -1, stages 16
tb1: offset 0, type 1404, size 1, index 5, binding -1, stages 16
ts6: offset -1, type 8b5f, size 1, index -1, binding 71, stages 16
Uniform block reflection:
t4: offset -1, type ffffffff, size 0, index -1, binding 21, stages 0
t5: offset -1, type ffffffff, size 0, index -1, binding 22, stages 0
u5: offset -1, type ffffffff, size 0, index -1, binding 44, stages 0
u6: offset -1, type ffffffff, size 0, index -1, binding 34, stages 0
cb: offset -1, type ffffffff, size 4, index -1, binding 51, stages 0
tb: offset -1, type ffffffff, size 4, index -1, binding 27, stages 0
t4: offset -1, type ffffffff, size 0, index -1, binding 21, stages 0
, numMembers 1
t5: offset -1, type ffffffff, size 0, index -1, binding 22, stages 0
, numMembers 1
u5: offset -1, type ffffffff, size 0, index -1, binding 44, stages 0
, numMembers 1
u6: offset -1, type ffffffff, size 0, index -1, binding 34, stages 0
, numMembers 1
cb: offset -1, type ffffffff, size 4, index -1, binding 51, stages 0
, numMembers 1
tb: offset -1, type ffffffff, size 4, index -1, binding 27, stages 0
, numMembers 1
Pipeline input reflection:
...
...
Test/baseResults/reflection.options.vert.out
View file @
4a2aa822
reflection.options.vert
Uniform reflection:
t[0].v[0].position[0]: offset 0, type 1406, size 3, index 0, binding -1, stages 1
t[0].v[1].position[0]: offset 24, type 1406, size 3, index 0, binding -1, stages 1
t[0].v[2].position[0]: offset 48, type 1406, size 3, index 0, binding -1, stages 1
t[0].v[0].normal[0]: offset 12, type 1406, size 3, index 0, binding -1, stages 1
t[0].v[1].normal[0]: offset 36, type 1406, size 3, index 0, binding -1, stages 1
t[0].v[2].normal[0]: offset 60, type 1406, size 3, index 0, binding -1, stages 1
t[0].v[0].position[0]: offset 0, type 1406, size 3, index 0, binding -1, stages 1, arrayStride 4, topLevelArrayStride 72
t[0].v[1].position[0]: offset 24, type 1406, size 3, index 0, binding -1, stages 1, arrayStride 4, topLevelArrayStride 72
t[0].v[2].position[0]: offset 48, type 1406, size 3, index 0, binding -1, stages 1, arrayStride 4, topLevelArrayStride 72
t[0].v[0].normal[0]: offset 12, type 1406, size 3, index 0, binding -1, stages 1, arrayStride 4, topLevelArrayStride 72
t[0].v[1].normal[0]: offset 36, type 1406, size 3, index 0, binding -1, stages 1, arrayStride 4, topLevelArrayStride 72
t[0].v[2].normal[0]: offset 60, type 1406, size 3, index 0, binding -1, stages 1, arrayStride 4, topLevelArrayStride 72
MultipleArrays.tri[0].v[0].position[0]: offset 0, type 1406, size 1, index 1, binding -1, stages 1, arrayStride 4, topLevelArrayStride 72
MultipleArrays.vert[0].position[0]: offset 360, type 1406, size 1, index 1, binding -1, stages 1, arrayStride 4, topLevelArrayStride 24
MultipleArrays.f[0]: offset 480, type 1406, size 5, index 1, binding -1, stages 1, arrayStride 4, topLevelArrayStride 4
Uniform block reflection:
VertexCollection: offset -1, type ffffffff, size 360, index -1, binding -1, stages 0
VertexCollection: offset -1, type ffffffff, size 360, index -1, binding -1, stages 0, numMembers 6
MultipleArrays: offset -1, type ffffffff, size 500, index -1, binding -1, stages 0, numMembers 9
Pipeline input reflection:
gl_InstanceID: offset 0, type 1404, size 0, index 0, binding -1, stages 0
...
...
Test/baseResults/reflection.vert.out
View file @
4a2aa822
This diff is collapsed.
Click to expand it.
Test/reflection.options.vert
View file @
4a2aa822
...
...
@@ -13,6 +13,12 @@ buffer VertexCollection {
TriangleInfo
t
[
5
];
};
buffer
MultipleArrays
{
TriangleInfo
tri
[
5
];
VertexInfo
vert
[
5
];
float
f
[
5
];
}
multiarray
;
out
float
outval
;
void
main
()
...
...
@@ -21,6 +27,9 @@ void main()
f
+=
t
[
0
].
v
[
0
].
position
[
0
];
f
+=
t
[
gl_InstanceID
].
v
[
gl_InstanceID
].
position
[
gl_InstanceID
];
f
+=
t
[
gl_InstanceID
].
v
[
gl_InstanceID
].
normal
[
gl_InstanceID
];
f
+=
multiarray
.
tri
[
gl_InstanceID
].
v
[
0
].
position
[
0
];
f
+=
multiarray
.
vert
[
gl_InstanceID
].
position
[
0
];
f
+=
multiarray
.
f
[
gl_InstanceID
];
TriangleInfo
tlocal
[
5
]
=
t
;
outval
=
f
;
}
glslang/MachineIndependent/reflection.cpp
View file @
4a2aa822
...
...
@@ -93,7 +93,7 @@ public:
// Use a degenerate (empty) set of dereferences to immediately put as at the end of
// the dereference change expected by blowUpActiveAggregate.
TList
<
TIntermBinary
*>
derefs
;
blowUpActiveAggregate
(
base
.
getType
(),
base
.
getName
(),
derefs
,
derefs
.
end
(),
-
1
,
-
1
,
0
);
blowUpActiveAggregate
(
base
.
getType
(),
base
.
getName
(),
derefs
,
derefs
.
end
(),
-
1
,
-
1
,
0
,
0
);
}
}
...
...
@@ -229,6 +229,36 @@ public:
return
lastOffset
+
lastMemberSize
;
}
// count the total number of leaf members from iterating out of a block type
int
countAggregateMembers
(
const
TType
&
parentType
)
{
if
(
!
parentType
.
isStruct
())
return
1
;
const
bool
strictArraySuffix
=
(
reflection
.
options
&
EShReflectionStrictArraySuffix
);
bool
blockParent
=
(
parentType
.
getBasicType
()
==
EbtBlock
&&
parentType
.
getQualifier
().
storage
==
EvqBuffer
);
const
TTypeList
&
memberList
=
*
parentType
.
getStruct
();
int
ret
=
0
;
for
(
size_t
i
=
0
;
i
<
memberList
.
size
();
i
++
)
{
const
TType
&
memberType
=
*
memberList
[
i
].
type
;
int
numMembers
=
countAggregateMembers
(
memberType
);
// for sized arrays of structs, apply logic to expand out the same as we would below in
// blowUpActiveAggregate
if
(
memberType
.
isArray
()
&&
!
memberType
.
getArraySizes
()
->
hasUnsized
()
&&
memberType
.
isStruct
())
{
if
(
!
strictArraySuffix
||
!
blockParent
)
numMembers
*=
memberType
.
getArraySizes
()
->
getCumulativeSize
();
}
ret
+=
numMembers
;
}
return
ret
;
}
// Traverse the provided deref chain, including the base, and
// - build a full reflection-granularity name, array size, etc. entry out of it, if it goes down to that granularity
// - recursively expand any variable array index in the middle of that traversal
...
...
@@ -237,7 +267,8 @@ public:
// arraySize tracks, just for the final dereference in the chain, if there was a specific known size.
// A value of 0 for arraySize will mean to use the full array's size.
void
blowUpActiveAggregate
(
const
TType
&
baseType
,
const
TString
&
baseName
,
const
TList
<
TIntermBinary
*>&
derefs
,
TList
<
TIntermBinary
*>::
const_iterator
deref
,
int
offset
,
int
blockIndex
,
int
arraySize
)
TList
<
TIntermBinary
*>::
const_iterator
deref
,
int
offset
,
int
blockIndex
,
int
arraySize
,
int
topLevelArrayStride
)
{
// when strictArraySuffix is enabled, we closely follow the rules from ARB_program_interface_query.
// Broadly:
...
...
@@ -260,6 +291,9 @@ public:
case
EOpIndexIndirect
:
{
int
stride
=
getArrayStride
(
baseType
,
visitNode
->
getLeft
()
->
getType
());
if
(
topLevelArrayStride
==
0
)
topLevelArrayStride
=
stride
;
// Visit all the indices of this array, and for each one add on the remaining dereferencing
for
(
int
i
=
0
;
i
<
std
::
max
(
visitNode
->
getLeft
()
->
getType
().
getOuterArraySize
(),
1
);
++
i
)
{
TString
newBaseName
=
name
;
...
...
@@ -270,16 +304,19 @@ public:
TList
<
TIntermBinary
*>::
const_iterator
nextDeref
=
deref
;
++
nextDeref
;
TType
derefType
(
*
terminalType
,
0
);
blowUpActiveAggregate
(
derefType
,
newBaseName
,
derefs
,
nextDeref
,
offset
,
blockIndex
,
arraySize
);
blowUpActiveAggregate
(
derefType
,
newBaseName
,
derefs
,
nextDeref
,
offset
,
blockIndex
,
arraySize
,
topLevelArrayStride
);
if
(
offset
>=
0
)
offset
+=
stride
;
offset
+=
stride
;
}
// it was all completed in the recursive calls above
return
;
}
case
EOpIndexDirect
:
case
EOpIndexDirect
:
{
int
stride
=
getArrayStride
(
baseType
,
visitNode
->
getLeft
()
->
getType
());
index
=
visitNode
->
getRight
()
->
getAsConstantUnion
()
->
getConstArray
()[
0
].
getIConst
();
if
(
strictArraySuffix
&&
blockParent
)
{
name
.
append
(
TString
(
"[0]"
));
...
...
@@ -287,10 +324,15 @@ public:
name
.
append
(
TString
(
"["
)
+
String
(
index
)
+
"]"
);
if
(
offset
>=
0
)
offset
+=
getArrayStride
(
baseType
,
visitNode
->
getLeft
()
->
getType
())
*
index
;
offset
+=
stride
*
index
;
}
if
(
topLevelArrayStride
==
0
)
topLevelArrayStride
=
stride
;
blockParent
=
false
;
break
;
}
case
EOpIndexDirectStruct
:
index
=
visitNode
->
getRight
()
->
getAsConstantUnion
()
->
getConstArray
()[
0
].
getIConst
();
if
(
offset
>=
0
)
...
...
@@ -317,6 +359,9 @@ public:
if
(
offset
>=
0
)
stride
=
getArrayStride
(
baseType
,
*
terminalType
);
if
(
topLevelArrayStride
==
0
)
topLevelArrayStride
=
stride
;
int
arrayIterateSize
=
std
::
max
(
terminalType
->
getOuterArraySize
(),
1
);
// for top-level arrays in blocks, only expand [0] to avoid explosion of items
...
...
@@ -329,7 +374,9 @@ public:
TType
derefType
(
*
terminalType
,
0
);
if
(
offset
>=
0
)
offset
=
baseOffset
+
stride
*
i
;
blowUpActiveAggregate
(
derefType
,
newBaseName
,
derefs
,
derefs
.
end
(),
offset
,
blockIndex
,
0
);
blowUpActiveAggregate
(
derefType
,
newBaseName
,
derefs
,
derefs
.
end
(),
offset
,
blockIndex
,
0
,
topLevelArrayStride
);
}
}
else
{
// Visit all members of this aggregate, and for each one,
...
...
@@ -349,7 +396,15 @@ public:
TType
derefType
(
*
terminalType
,
i
);
if
(
offset
>=
0
)
offset
=
baseOffset
+
memberOffsets
[
i
];
blowUpActiveAggregate
(
derefType
,
newBaseName
,
derefs
,
derefs
.
end
(),
offset
,
blockIndex
,
0
);
int
arrayStride
=
topLevelArrayStride
;
if
(
terminalType
->
getBasicType
()
==
EbtBlock
&&
terminalType
->
getQualifier
().
storage
==
EvqBuffer
&&
derefType
.
isArray
())
{
arrayStride
=
getArrayStride
(
baseType
,
derefType
);
}
blowUpActiveAggregate
(
derefType
,
newBaseName
,
derefs
,
derefs
.
end
(),
offset
,
blockIndex
,
0
,
arrayStride
);
}
}
...
...
@@ -371,9 +426,17 @@ public:
TReflection
::
TNameToIndex
::
const_iterator
it
=
reflection
.
nameToIndex
.
find
(
name
.
c_str
());
if
(
it
==
reflection
.
nameToIndex
.
end
())
{
reflection
.
nameToIndex
[
name
.
c_str
()]
=
(
int
)
reflection
.
indexToUniform
.
size
();
reflection
.
indexToUniform
.
push_back
(
TObjectReflection
(
name
.
c_str
(),
*
terminalType
,
offset
,
mapToGlType
(
*
terminalType
),
arraySize
,
blockIndex
));
if
(
terminalType
->
isArray
())
{
reflection
.
indexToUniform
.
back
().
arrayStride
=
getArrayStride
(
baseType
,
*
terminalType
);
if
(
topLevelArrayStride
==
0
)
topLevelArrayStride
=
reflection
.
indexToUniform
.
back
().
arrayStride
;
}
reflection
.
indexToUniform
.
back
().
topLevelArrayStride
=
topLevelArrayStride
;
}
else
if
(
arraySize
>
1
)
{
int
&
reflectedArraySize
=
reflection
.
indexToUniform
[
it
->
second
].
size
;
reflectedArraySize
=
std
::
max
(
arraySize
,
reflectedArraySize
);
...
...
@@ -465,7 +528,7 @@ public:
else
baseName
=
base
->
getName
();
}
blowUpActiveAggregate
(
base
->
getType
(),
baseName
,
derefs
,
derefs
.
begin
(),
offset
,
blockIndex
,
arraySize
);
blowUpActiveAggregate
(
base
->
getType
(),
baseName
,
derefs
,
derefs
.
begin
(),
offset
,
blockIndex
,
arraySize
,
0
);
}
int
addBlockName
(
const
TString
&
name
,
const
TType
&
type
,
int
size
)
...
...
@@ -476,6 +539,8 @@ public:
blockIndex
=
(
int
)
reflection
.
indexToUniformBlock
.
size
();
reflection
.
nameToIndex
[
name
.
c_str
()]
=
blockIndex
;
reflection
.
indexToUniformBlock
.
push_back
(
TObjectReflection
(
name
.
c_str
(),
type
,
-
1
,
-
1
,
size
,
-
1
));
reflection
.
indexToUniformBlock
.
back
().
numMembers
=
countAggregateMembers
(
type
);
}
else
blockIndex
=
it
->
second
;
...
...
@@ -883,7 +948,7 @@ void TReflectionTraverser::visitSymbol(TIntermSymbol* base)
TObjectReflection
::
TObjectReflection
(
const
std
::
string
&
pName
,
const
TType
&
pType
,
int
pOffset
,
int
pGLDefineType
,
int
pSize
,
int
pIndex
)
:
name
(
pName
),
offset
(
pOffset
),
glDefineType
(
pGLDefineType
),
size
(
pSize
),
index
(
pIndex
),
counterIndex
(
-
1
),
stages
(
EShLanguageMask
(
0
)),
type
(
pType
.
clone
())
numMembers
(
-
1
),
arrayStride
(
0
),
topLevelArrayStride
(
0
),
stages
(
EShLanguageMask
(
0
)),
type
(
pType
.
clone
())
{
}
...
...
@@ -902,6 +967,15 @@ void TObjectReflection::dump() const
if
(
counterIndex
!=
-
1
)
printf
(
", counter %d"
,
counterIndex
);
if
(
numMembers
!=
-
1
)
printf
(
", numMembers %d"
,
numMembers
);
if
(
arrayStride
!=
0
)
printf
(
", arrayStride %d"
,
arrayStride
);
if
(
topLevelArrayStride
!=
0
)
printf
(
", topLevelArrayStride %d"
,
topLevelArrayStride
);
printf
(
"
\n
"
);
}
...
...
glslang/Public/ShaderLang.h
View file @
4a2aa822
...
...
@@ -626,14 +626,20 @@ public:
std
::
string
name
;
int
offset
;
int
glDefineType
;
int
size
;
// data size in bytes for a block, array size for a (non-block) object that's an array
int
size
;
// data size in bytes for a block, array size for a (non-block) object that's an array
int
index
;
int
counterIndex
;
int
numMembers
;
int
arrayStride
;
// stride of an array variable
int
topLevelArrayStride
;
// stride of the top-level variable in a storage buffer member
EShLanguageMask
stages
;
protected
:
TObjectReflection
()
:
offset
(
-
1
),
glDefineType
(
-
1
),
size
(
-
1
),
index
(
-
1
),
counterIndex
(
-
1
),
stages
(
EShLanguageMask
(
0
)),
type
(
nullptr
)
{
}
TObjectReflection
()
:
offset
(
-
1
),
glDefineType
(
-
1
),
size
(
-
1
),
index
(
-
1
),
counterIndex
(
-
1
),
numMembers
(
-
1
),
arrayStride
(
0
),
topLevelArrayStride
(
0
),
stages
(
EShLanguageMask
(
0
)),
type
(
nullptr
)
{
}
const
TType
*
type
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment