Allow layout aliasing for desktop vertex inputs.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24400 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
@@ -9,5 +9,5 @@
|
||||
// source have to figure out how to create revision.h just to get a build
|
||||
// going. However, if it is not updated, it can be a version behind.
|
||||
|
||||
#define GLSLANG_REVISION "24396"
|
||||
#define GLSLANG_DATE "2013/12/06 14:45:15"
|
||||
#define GLSLANG_REVISION "24397"
|
||||
#define GLSLANG_DATE "2013/12/06 16:57:42"
|
||||
|
||||
@@ -2694,8 +2694,6 @@ void TParseContext::layoutTypeCheck(TSourceLoc loc, const TSymbol& symbol)
|
||||
// an array of size N, all elements of the array from binding through binding + N <20> 1 must be within this
|
||||
// range."
|
||||
//
|
||||
// TODO: 4.2 binding limits: binding error checking against limits, arrays
|
||||
//
|
||||
if (type.getBasicType() != EbtSampler && type.getBasicType() != EbtBlock)
|
||||
error(loc, "requires block, or sampler/image, or atomic-counter type", "binding", "");
|
||||
// TODO: 4.2 functionality: atomic counter: include in test above
|
||||
|
||||
@@ -476,12 +476,14 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
|
||||
|
||||
TRange range = { qualifier.layoutSlotLocation, qualifier.layoutSlotLocation + size - 1 };
|
||||
|
||||
// check for collisions
|
||||
for (size_t r = 0; r < usedLocations[set].size(); ++r) {
|
||||
if (range.last >= usedLocations[set][r].start &&
|
||||
range.start <= usedLocations[set][r].last) {
|
||||
// there is a collision; pick one
|
||||
return std::max(range.start, usedLocations[set][r].start);
|
||||
// check for collisions, except for vertex inputs on desktop
|
||||
if (! (profile != EEsProfile && language == EShLangVertex && qualifier.isPipeInput())) {
|
||||
for (size_t r = 0; r < usedLocations[set].size(); ++r) {
|
||||
if (range.last >= usedLocations[set][r].start &&
|
||||
range.start <= usedLocations[set][r].last) {
|
||||
// there is a collision; pick one
|
||||
return std::max(range.start, usedLocations[set][r].start);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user