Merge branch 'master' into GL_ARB_fragment_coord_conventions
This commit is contained in:
@@ -284,10 +284,12 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
"textureoffset_sampler2darrayshadow.vert",
|
||||
"atomicAdd.comp",
|
||||
"GL_ARB_gpu_shader5.u2i.vert",
|
||||
"textureQueryLOD.frag",
|
||||
"atomicCounterARBOps.vert",
|
||||
"GL_EXT_shader_integer_mix.vert",
|
||||
"GL_ARB_draw_instanced.vert",
|
||||
"GL_ARB_fragment_coord_conventions.vert"
|
||||
"GL_ARB_fragment_coord_conventions.vert",
|
||||
"BestMatchFunction.vert",
|
||||
})),
|
||||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
|
||||
@@ -109,7 +109,50 @@ bool verifyIOMapping(std::string& linkingError, glslang::TProgram& program) {
|
||||
success &= outQualifier.layoutLocation == inQualifier.layoutLocation;
|
||||
}
|
||||
else {
|
||||
success &= false;
|
||||
if (!in.getType()->isStruct()) {
|
||||
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++) {
|
||||
baseLoc = (*outIt.second->getType()->getStruct())[j].type->getQualifier().hasLocation() ?
|
||||
(*outIt.second->getType()->getStruct())[j].type->getQualifier().layoutLocation : baseLoc;
|
||||
if (baseLoc != -1) {
|
||||
if (baseLoc == in.getType()->getQualifier().layoutLocation) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
baseLoc += glslang::TIntermediate::computeTypeLocationSize(*(*outIt.second->getType()->getStruct())[j].type, EShLangVertex);
|
||||
}
|
||||
}
|
||||
if (found) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
success &= found;
|
||||
}
|
||||
else {
|
||||
unsigned int baseLoc = in.getType()->getQualifier().hasLocation() ? in.getType()->getQualifier().layoutLocation : -1;
|
||||
for (int 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) {
|
||||
bool isMemberFound = false;
|
||||
for (auto outIt : pipeOut) {
|
||||
if (baseLoc == outIt.second->getType()->getQualifier().layoutLocation) {
|
||||
isMemberFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isMemberFound) {
|
||||
success &= false;
|
||||
break;
|
||||
}
|
||||
baseLoc += glslang::TIntermediate::computeTypeLocationSize(*(*in.getType()->getStruct())[j].type, EShLangVertex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -295,6 +338,10 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
::testing::ValuesIn(std::vector<IoMapData>({
|
||||
{{"iomap.crossStage.vert", "iomap.crossStage.frag" }, Semantics::OpenGL},
|
||||
{{"iomap.crossStage.2.vert", "iomap.crossStage.2.geom", "iomap.crossStage.2.frag" }, Semantics::OpenGL},
|
||||
{{"iomap.blockOutVariableIn.vert", "iomap.blockOutVariableIn.frag"}, Semantics::OpenGL},
|
||||
{{"iomap.variableOutBlockIn.vert", "iomap.variableOutBlockIn.frag"}, Semantics::OpenGL},
|
||||
{{"iomap.blockOutVariableIn.2.vert", "iomap.blockOutVariableIn.geom"}, Semantics::OpenGL},
|
||||
{{"iomap.variableOutBlockIn.2.vert", "iomap.variableOutBlockIn.geom"}, Semantics::OpenGL},
|
||||
// vulkan semantics
|
||||
{{"iomap.crossStage.vk.vert", "iomap.crossStage.vk.geom", "iomap.crossStage.vk.frag" }, Semantics::Vulkan},
|
||||
}))
|
||||
|
||||
@@ -385,6 +385,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
{"hlsl.structbuffer.fn2.comp", "main"},
|
||||
{"hlsl.structbuffer.rw.frag", "main"},
|
||||
{"hlsl.structbuffer.rwbyte.frag", "main"},
|
||||
{"hlsl.structbuffer.rwbyte2.comp", "main"},
|
||||
{"hlsl.structin.vert", "main"},
|
||||
{"hlsl.structIoFourWay.frag", "main"},
|
||||
{"hlsl.structStructName.frag", "main"},
|
||||
|
||||
@@ -365,7 +365,6 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
"spv.int64.frag",
|
||||
"spv.intcoopmat.comp",
|
||||
"spv.intOps.vert",
|
||||
"spv.intrinsicsSpecConst.vert",
|
||||
"spv.intrinsicsSpirvByReference.vert",
|
||||
"spv.intrinsicsSpirvDecorate.frag",
|
||||
"spv.intrinsicsSpirvExecutionMode.frag",
|
||||
@@ -373,6 +372,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
"spv.intrinsicsSpirvLiteral.vert",
|
||||
"spv.intrinsicsSpirvStorageClass.rchit",
|
||||
"spv.intrinsicsSpirvType.rgen",
|
||||
"spv.intrinsicsSpirvTypeLocalVar.vert",
|
||||
"spv.invariantAll.vert",
|
||||
"spv.layer.tese",
|
||||
"spv.layoutNested.vert",
|
||||
|
||||
Reference in New Issue
Block a user