Lines Matching refs:resource
151 virtual void validate (const ProgramInterfaceDefinition::Program* program, const std::string& resource, glw::GLint propValue) const = 0;
204 void validate (const ProgramInterfaceDefinition::Program* program, const std::string& resource, glw::GLint propValue) const;
205 virtual void validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const = 0;
206 virtual void validateBuiltinVariable (const std::string& resource, glw::GLint propValue) const;
220 void SingleVariableValidator::validate (const ProgramInterfaceDefinition::Program* program, const std::string& resource, glw::GLint propValue) const
224 if (findProgramVariablePathByPathName(path, program, resource, m_filter))
230 m_testCtx.getLog() << tcu::TestLog::Message << "Error, resource name \"" << resource << "\" refers to a non-basic type." << tcu::TestLog::EndMessage;
231 setError("resource not basic type");
234 validateSingleVariable(path, resource, propValue);
239 else if (deStringBeginsWith(resource.c_str(), "gl_"))
242 validateBuiltinVariable(resource, propValue);
246 m_testCtx.getLog() << tcu::TestLog::Message << "Error, could not find resource \"" << resource << "\" in the program" << tcu::TestLog::EndMessage;
247 setError("could not find resource");
250 void SingleVariableValidator::validateBuiltinVariable (const std::string& resource, glw::GLint propValue) const
254 m_testCtx.getLog() << tcu::TestLog::Message << "Error, could not find builtin resource \"" << resource << "\" in the program" << tcu::TestLog::EndMessage;
255 setError("could not find builtin resource");
263 void validate (const ProgramInterfaceDefinition::Program* program, const std::string& resource, glw::GLint propValue) const;
264 virtual void validateSingleBlock (const glu::InterfaceBlock& block, const std::vector<int>& instanceIndex, const std::string& resource, glw::GLint propValue) const = 0;
278 void SingleBlockValidator::validate (const ProgramInterfaceDefinition::Program* program, const std::string& resource, glw::GLint propValue) const
280 glu::VarTokenizer tokenizer (resource.c_str());
318 validateSingleBlock(block, instanceIndex, resource, propValue);
323 m_testCtx.getLog() << tcu::TestLog::Message << "Error, could not find resource \"" << resource << "\" in the program" << tcu::TestLog::EndMessage;
324 setError("could not find resource");
333 void validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const;
334 void validateBuiltinVariable (const std::string& resource, glw::GLint propValue) const;
347 void TypeValidator::validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const
351 DE_UNREF(resource);
358 setError("resource type invalid");
362 void TypeValidator::validateBuiltinVariable (const std::string& resource, glw::GLint propValue) const
381 if (resource == builtins[ndx].name)
388 setError("resource type invalid");
401 void validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const;
402 void validateBuiltinVariable (const std::string& resource, glw::GLint propValue) const;
410 void ArraySizeValidator::validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const
419 DE_UNREF(resource);
426 setError("resource array size invalid");
430 void ArraySizeValidator::validateBuiltinVariable (const std::string& resource, glw::GLint propValue) const
433 if (resource == "gl_Position" ||
434 resource == "gl_VertexID" ||
435 resource == "gl_FragCoord" ||
436 resource == "gl_in[0].gl_Position" ||
437 resource == "gl_InvocationID" ||
438 resource == "gl_NumWorkGroups" ||
439 resource == "gl_FragDepth")
446 setError("resource array size invalid");
457 void validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const;
465 void ArrayStrideValidator::validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const
476 DE_UNREF(resource);
487 setError("resource array stride invalid");
500 setError("resource array stride invalid");
509 void validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const;
517 void BlockIndexValidator::validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const
521 DE_UNREF(resource);
530 setError("resource block index invalid");
540 setError("resource block index invalid");
568 setError("resource block index invalid");
581 void validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const;
594 void IsRowMajorValidator::validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const
603 DE_UNREF(resource);
610 setError("resource matrix order invalid");
618 void validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const;
626 void MatrixStrideValidator::validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const
634 DE_UNREF(resource);
648 setError("resource matrix stride invalid");
660 setError("resource matrix stride invalid");
669 void validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const;
677 void AtomicCounterBufferIndexVerifier::validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const
679 DE_UNREF(resource);
688 setError("resource atomic counter buffer index invalid");
698 setError("resource atomic counter buffer index invalid");
711 setError("resource atomic counter buffer index invalid");
721 void validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const;
722 void validateBuiltinVariable (const std::string& resource, glw::GLint propValue) const;
838 void LocationValidator::validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const
883 setError("resource location invalid");
904 setError("resource location invalid");
921 const std::string arrayResourceName = (resource.size() > 3) ? (resource.substr(0, resource.size() - 3)) : (""); // chop "[0]"
932 << "\tError, getProgramResourceLocation (resource=\"" << elementResourceName << "\") returned location " << location
935 setError("resource location invalid");
943 const glw::GLint location = gl.getProgramResourceLocation(m_programID, interface, resource.c_str());
948 setError("resource location invalid");
956 void LocationValidator::validateBuiltinVariable (const std::string& resource, glw::GLint propValue) const
958 DE_UNREF(resource);
967 setError("resource location invalid");
975 void validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const;
976 void validateBuiltinVariable (const std::string& resource, glw::GLint propValue) const;
977 void validateNameLength (const std::string& resource, glw::GLint propValue) const;
985 void VariableNameLengthValidator::validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const
988 validateNameLength(resource, propValue);
991 void VariableNameLengthValidator::validateBuiltinVariable (const std::string& resource, glw::GLint propValue) const
993 validateNameLength(resource, propValue);
996 void VariableNameLengthValidator::validateNameLength (const std::string& resource, glw::GLint propValue) const
998 const int expected = (int)resource.length() + 1; // includes null byte
999 m_testCtx.getLog() << tcu::TestLog::Message << "Verifying name length, expecting " << expected << " (" << (int)resource.length() << " for \"" << resource << "\" + 1 byte for terminating null character)" << tcu::TestLog::EndMessage;
1012 void validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const;
1020 void OffsetValidator::validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const
1025 DE_UNREF(resource);
1057 void validate (const ProgramInterfaceDefinition::Program* program, const std::string& resource, glw::GLint propValue) const;
1074 void VariableReferencedByShaderValidator::validate (const ProgramInterfaceDefinition::Program* program, const std::string& resource, glw::GLint propValue) const
1077 const bool referencedByShader = findProgramVariablePathByPathName(dummyPath, program, resource, m_filter);
1096 void validateSingleBlock (const glu::InterfaceBlock& block, const std::vector<int>& instanceIndex, const std::string& resource, glw::GLint propValue) const;
1104 void BlockNameLengthValidator::validateSingleBlock (const glu::InterfaceBlock& block, const std::vector<int>& instanceIndex, const std::string& resource, glw::GLint propValue) const
1109 const int expected = (int)resource.length() + 1; // includes null byte
1110 m_testCtx.getLog() << tcu::TestLog::Message << "Verifying name length, expecting " << expected << " (" << (int)resource.length() << " for \"" << resource << "\" + 1 byte for terminating null character)" << tcu::TestLog::EndMessage;
1123 void validateSingleBlock (const glu::InterfaceBlock& block, const std::vector<int>& instanceIndex, const std::string& resource, glw::GLint propValue) const;
1131 void BufferBindingValidator::validateSingleBlock (const glu::InterfaceBlock& block, const std::vector<int>& instanceIndex, const std::string& resource, glw::GLint propValue) const
1133 DE_UNREF(resource);
1173 void validate (const ProgramInterfaceDefinition::Program* program, const std::string& resource, glw::GLint propValue) const;
1190 void BlockReferencedByShaderValidator::validate (const ProgramInterfaceDefinition::Program* program, const std::string& resource, glw::GLint propValue) const
1192 const std::string blockName = glu::parseVariableName(resource.c_str());
1195 DE_UNREF(resource);
1229 void validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const;
1237 void TopLevelArraySizeValidator::validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const
1243 DE_UNREF(resource);
1279 void validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const;
1287 void TopLevelArrayStrideValidator::validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const
1290 DE_UNREF(resource);
1330 void validate (const ProgramInterfaceDefinition::Program* program, const std::string& resource, glw::GLint propValue) const;
1333 virtual void validateBuiltinVariable (const std::string& resource, glw::GLint propValue) const = 0;
1334 virtual void validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const = 0;
1343 void TransformFeedbackResourceValidator::validate (const ProgramInterfaceDefinition::Program* program, const std::string& resource, glw::GLint propValue) const
1345 if (deStringBeginsWith(resource.c_str(), "gl_"))
1347 validateBuiltinVariable(resource, propValue);
1351 // Check resource name is a xfb output. (sanity check)
1355 // Check the resource name is a valid transform feedback resource and find the name generating resource
1371 if (de::contains(resources.begin(), resources.end(), resource))
1378 // resource name was not found, should never happen
1383 // verify resource
1387 if (!findProgramVariablePathByPathName(path, program, resource, VariableSearchFilter(glu::SHADERTYPE_VERTEX, glu::STORAGE_OUT)))
1390 validateSingleVariable(path, resource, propValue);
1400 void validateBuiltinVariable (const std::string& resource, glw::GLint propValue) const;
1401 void validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const;
1409 void TransformFeedbackArraySizeValidator::validateBuiltinVariable (const std::string& resource, glw::GLint propValue) const
1413 if (resource == "gl_Position")
1422 setError("resource array size invalid");
1426 void TransformFeedbackArraySizeValidator::validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const
1428 DE_UNREF(resource);
1436 setError("resource array size invalid");
1446 void validateBuiltinVariable (const std::string& resource, glw::GLint propValue) const;
1447 void validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const;
1448 void validateVariable (const std::string& resource, glw::GLint propValue) const;
1456 void TransformFeedbackNameLengthValidator::validateBuiltinVariable (const std::string& resource, glw::GLint propValue) const
1458 validateVariable(resource, propValue);
1461 void TransformFeedbackNameLengthValidator::validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const
1464 validateVariable(resource, propValue);
1467 void TransformFeedbackNameLengthValidator::validateVariable (const std::string& resource, glw::GLint propValue) const
1469 const int expected = (int)resource.length() + 1; // includes null byte
1470 m_testCtx.getLog() << tcu::TestLog::Message << "Verifying name length, expecting " << expected << " (" << (int)resource.length() << " for \"" << resource << "\" + 1 byte for terminating null character)" << tcu::TestLog::EndMessage;
1484 void validateBuiltinVariable (const std::string& resource, glw::GLint propValue) const;
1485 void validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const;
1493 void TransformFeedbackTypeValidator::validateBuiltinVariable (const std::string& resource, glw::GLint propValue) const
1497 if (resource == "gl_Position")
1506 setError("resource type invalid");
1511 void TransformFeedbackTypeValidator::validateSingleVariable (const std::vector<VariablePathComponent>& path, const std::string& resource, glw::GLint propValue) const
1513 DE_UNREF(resource);
1526 setError("resource type invalid");
1596 GLU_EXPECT_NO_ERROR(gl.getError(), "get resource index");
1601 testCtx.setTestResult(QP_TEST_RESULT_FAIL, "could not find target resource");
1621 GLU_EXPECT_NO_ERROR(gl.getError(), "get resource index");
1626 testCtx.getLog() << tcu::TestLog::Message << "\tResource not found, continuing anyway using index obtained for resource \"" << simplifiedResourceName << "\"" << tcu::TestLog::EndMessage;
1653 message << "For resource index " << resourceNdx << " (\"" << targetResourceName << "\") got following properties:\n";
1753 const tcu::ScopedLogSection section (m_testCtx.getLog(), "UniformResource", "Uniform resource \"" + targetResources[targetResourceNdx] + "\"");
1851 const tcu::ScopedLogSection section (m_testCtx.getLog(), "BlockResource", resourceInterfaceName + " resource \"" + targetResources[targetResourceNdx] + "\"");
2150 log << tcu::TestLog::Message << "One or more resource limits exceeded" << tcu::TestLog::EndMessage;
2151 throw tcu::NotSupportedError("one or more resource limits exceeded");