Home | History | Annotate | Download | only in functional

Lines Matching refs:ShaderType

77 const char* getSimpleShaderSource (const glu::ShaderType shaderType)
94 switch (shaderType)
221 virtual std::string next (const glu::ShaderType shaderType) = 0;
222 virtual bool finished (const glu::ShaderType shaderType) const = 0;
231 bool finished (const glu::ShaderType shaderType) const { DE_UNREF(shaderType); return false; }
233 std::string next (const glu::ShaderType shaderType);
239 std::string ConstantShaderGenerator::next (const glu::ShaderType shaderType)
241 DE_ASSERT(shaderType == glu::SHADERTYPE_VERTEX || shaderType == glu::SHADERTYPE_FRAGMENT);
245 const std::string outputName = (shaderType == glu::SHADERTYPE_VERTEX) ? "gl_Position" : "o_fragColor";
251 if (shaderType == glu::SHADERTYPE_FRAGMENT)
270 bool hasShader (const glu::ShaderType shaderType);
272 void setSource (const glu::ShaderType shaderType);
274 glu::Shader& createShader (const glu::ShaderType shaderType);
275 void deleteShader (const glu::ShaderType shaderType);
277 glu::Shader& get (const glu::ShaderType shaderType) { DE_ASSERT(hasShader(shaderType)); return *m_shaders[shaderType]; }
282 std::map<glu::ShaderType, glu::Shader*> m_shaders;
293 for (std::map<glu::ShaderType, glu::Shader*>::iterator shaderIter = m_shaders.begin(); shaderIter != m_shaders.end(); shaderIter++)
298 bool ShaderAllocator::hasShader (const glu::ShaderType shaderType)
300 if (m_shaders.find(shaderType) != m_shaders.end())
306 glu::Shader& ShaderAllocator::createShader (const glu::ShaderType shaderType)
308 DE_ASSERT(!this->hasShader(shaderType));
310 glu::Shader* const shader = new glu::Shader(m_context, shaderType);
312 m_shaders[shaderType] = shader;
313 this->setSource(shaderType);
318 void ShaderAllocator::deleteShader (const glu::ShaderType shaderType)
320 DE_ASSERT(this->hasShader(shaderType));
322 delete m_shaders[shaderType];
323 m_shaders.erase(shaderType);
326 void ShaderAllocator::setSource (const glu::ShaderType shaderType)
328 DE_ASSERT(this->hasShader(shaderType));
329 DE_ASSERT(!m_srcGen.finished(shaderType));
331 const std::string source = m_srcGen.next(shaderType);
334 m_shaders[shaderType]->setSources(1, &cSource, 0);
354 const glu::ShaderType shaderType = (glu::ShaderType)shaderTypeInt;
356 if (shaders.hasShader(shaderType))
357 logShader(log, renderCtx, shaders.get(shaderType));
382 CreateShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
384 , m_shaderType (shaderType)
398 const glu::ShaderType m_shaderType;
406 CompileShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
408 , m_shaderType (shaderType)
437 const glu::ShaderType m_shaderType;
584 ShaderSourceReplaceCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
586 , m_shaderType (shaderType)
679 glu::ShaderType m_shaderType;
687 ShaderSourceSplitCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType, const int numSlices, const deUint32 flags = 0)
690 , m_shaderType (shaderType)
764 const glu::ShaderType supportShaderType = (m_shaderType == glu::SHADERTYPE_FRAGMENT ? glu::SHADERTYPE_VERTEX : glu::SHADERTYPE_FRAGMENT);
808 const glu::ShaderType m_shaderType;
820 ProgramStateCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType);
832 const glu::ShaderType m_shaderType;
835 ProgramStateCase::ProgramStateCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
838 , m_shaderType (shaderType)
923 const glu::ShaderType shaderType = (shaderTypeInt == 1) ? glu::SHADERTYPE_FRAGMENT : glu::SHADERTYPE_VERTEX;
924 const std::string shaderTypeName = getShaderTypeName(shaderType);
929 group->addChild(new T(context, caseName.c_str(), caseDesc.c_str(), shaderType));
940 ProgramStateDetachShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
941 : ProgramStateCase (context, name, desc, shaderType)
962 ProgramStateReattachShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
963 : ProgramStateCase (context, name, desc, shaderType)
985 ProgramStateDeleteShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
986 : ProgramStateCase (context, name, desc, shaderType)
1008 ProgramStateReplaceShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
1009 : ProgramStateCase (context, name, desc, shaderType)
1032 ProgramStateRecompileShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
1033 : ProgramStateCase (context, name, desc, shaderType)
1055 ProgramStateReplaceSourceCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
1056 : ProgramStateCase (context, name, desc, shaderType)
1265 std::string getShaderSource (const glu::ShaderType shaderType) const
1289 DE_ASSERT(shaderType == glu::SHADERTYPE_VERTEX || shaderType == glu::SHADERTYPE_FRAGMENT);
1291 return (shaderType == glu::SHADERTYPE_VERTEX) ? vertSrc : fragSrc;
1394 ProgramBinaryPersistenceCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType);
1406 const glu::ShaderType m_shaderType;
1409 ProgramBinaryPersistenceCase::ProgramBinaryPersistenceCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
1412 , m_shaderType (shaderType)
1488 const glu::ShaderType shaderType = (shaderTypeInt == 1) ? glu::SHADERTYPE_FRAGMENT : glu::SHADERTYPE_VERTEX;
1489 const std::string shaderTypeName = getShaderTypeName(shaderType);
1494 group->addChild(new T(context, caseName.c_str(), caseDesc.c_str(), shaderType));
1505 ProgramBinaryPersistenceDetachShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
1506 : ProgramBinaryPersistenceCase (context, name, desc, shaderType)
1527 ProgramBinaryPersistenceReattachShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
1528 : ProgramBinaryPersistenceCase (context, name, desc, shaderType)
1550 ProgramBinaryPersistenceDeleteShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
1551 : ProgramBinaryPersistenceCase (context, name, desc, shaderType)
1573 ProgramBinaryPersistenceReplaceShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
1574 : ProgramBinaryPersistenceCase (context, name, desc, shaderType)
1597 ProgramBinaryPersistenceRecompileShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
1598 : ProgramBinaryPersistenceCase (context, name, desc, shaderType)
1620 ProgramBinaryPersistenceReplaceSourceCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
1621 : ProgramBinaryPersistenceCase (context, name, desc, shaderType)
1683 const glu::ShaderType shaderType = (shaderTypeInt == 1) ? glu::SHADERTYPE_FRAGMENT : glu::SHADERTYPE_VERTEX;
1684 const std::string shaderTypeName = getShaderTypeName(shaderType);
1689 shaderSourceGroup->addChild(new ShaderSourceReplaceCase(m_context, caseName.c_str(), caseDesc.c_str(), shaderType));
1697 const glu::ShaderType shaderType = (shaderTypeInt == 1) ? glu::SHADERTYPE_FRAGMENT : glu::SHADERTYPE_VERTEX;
1708 + ((shaderType == glu::SHADERTYPE_FRAGMENT) ? "_fragment" : "_vertex");
1710 const std::string caseDesc = std::string((shaderType == glu::SHADERTYPE_FRAGMENT) ? "Fragment" : "Vertex")
1717 shaderSourceGroup->addChild(new ShaderSourceSplitCase(m_context, caseName.c_str(), caseDesc.c_str(), shaderType, numSlices, flags));