Merge branch 'master' into EndStreamPrimitive

This commit is contained in:
Greg Fischer
2022-01-10 11:49:19 -07:00
committed by GitHub
12 changed files with 334 additions and 21 deletions

View File

@@ -236,6 +236,7 @@ INSTANTIATE_TEST_SUITE_P(
"noMatchingFunction.frag",
"constantUnaryConversion.comp",
"xfbUnsizedArray.error.vert",
"xfbUnsizedArray.error.tese",
"glsl.140.layoutOffset.error.vert",
"glsl.430.layoutOffset.error.vert",
"glsl.450.subgroup.frag",
@@ -291,7 +292,8 @@ INSTANTIATE_TEST_SUITE_P(
"GL_ARB_draw_instanced.vert",
"GL_ARB_fragment_coord_conventions.vert",
"BestMatchFunction.vert",
"EndStreamPrimitive.geom"
"EndStreamPrimitive.geom",
"floatBitsToInt.vert",
})),
FileNameAsCustomTestSuffix
);

View File

@@ -113,11 +113,13 @@ bool verifyIOMapping(std::string& linkingError, glslang::TProgram& program) {
bool found = false;
for (auto outIt : pipeOut) {
if (outIt.second->getType()->isStruct()) {
unsigned int baseLoc = outIt.second->getType()->getQualifier().hasLocation() ? outIt.second->getType()->getQualifier().layoutLocation : -1;
for (int j = 0; j < outIt.second->getType()->getStruct()->size(); j++) {
unsigned int baseLoc = outIt.second->getType()->getQualifier().hasLocation() ?
outIt.second->getType()->getQualifier().layoutLocation :
std::numeric_limits<unsigned int>::max();
for (size_t j = 0; j < outIt.second->getType()->getStruct()->size(); j++) {
baseLoc = (*outIt.second->getType()->getStruct())[j].type->getQualifier().hasLocation() ?
(*outIt.second->getType()->getStruct())[j].type->getQualifier().layoutLocation : baseLoc;
if (baseLoc != -1) {
if (baseLoc != std::numeric_limits<unsigned int>::max()) {
if (baseLoc == in.getType()->getQualifier().layoutLocation) {
found = true;
break;
@@ -134,10 +136,10 @@ bool verifyIOMapping(std::string& linkingError, glslang::TProgram& program) {
}
else {
unsigned int baseLoc = in.getType()->getQualifier().hasLocation() ? in.getType()->getQualifier().layoutLocation : -1;
for (int j = 0; j < in.getType()->getStruct()->size(); j++) {
for (size_t j = 0; j < in.getType()->getStruct()->size(); j++) {
baseLoc = (*in.getType()->getStruct())[j].type->getQualifier().hasLocation() ?
(*in.getType()->getStruct())[j].type->getQualifier().layoutLocation : baseLoc;
if (baseLoc != -1) {
if (baseLoc != std::numeric_limits<unsigned int>::max()) {
bool isMemberFound = false;
for (auto outIt : pipeOut) {
if (baseLoc == outIt.second->getType()->getQualifier().layoutLocation) {
@@ -350,4 +352,4 @@ INSTANTIATE_TEST_SUITE_P(
} // anonymous namespace
} // namespace glslangtest
#endif
#endif