Take into account the number of locations taken up by a uniform
When assigning uniform locations it now takes into account the number of locations occupied by the type. For uniforms, all types except arrays and structs take up one location. For arrays the base location count is multiplied by the array dimensions and for structs it is the sum of the locations of each member.
This commit is contained in:
parent
1fe4a44759
commit
2d53904999
3 changed files with 36 additions and 1 deletions
|
|
@ -590,6 +590,7 @@ public:
|
|||
int addUsedOffsets(int binding, int offset, int numOffsets);
|
||||
bool addUsedConstantId(int id);
|
||||
static int computeTypeLocationSize(const TType&, EShLanguage);
|
||||
static int computeTypeUniformLocationSize(const TType&);
|
||||
|
||||
bool setXfbBufferStride(int buffer, unsigned stride)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue