Home | History | Annotate | Download | only in functional

Lines Matching refs:ShaderType

72 const char* getSimpleShaderSource (const glu::ShaderType shaderType)
77 switch (shaderType)
176 virtual std::string next (const glu::ShaderType shaderType) = 0;
177 virtual bool finished (const glu::ShaderType shaderType) const = 0;
186 bool finished (const glu::ShaderType shaderType) const { DE_UNREF(shaderType); return false; }
188 std::string next (const glu::ShaderType shaderType);
194 std::string ConstantShaderGenerator::next (const glu::ShaderType shaderType)
196 DE_ASSERT(shaderType == glu::SHADERTYPE_VERTEX || shaderType == glu::SHADERTYPE_FRAGMENT);
200 const std::string outputName = (shaderType == glu::SHADERTYPE_VERTEX) ? "gl_Position" : "gl_FragColor";
217 bool hasShader (const glu::ShaderType shaderType);
219 void setSource (const glu::ShaderType shaderType);
221 glu::Shader& createShader (const glu::ShaderType shaderType);
222 void deleteShader (const glu::ShaderType shaderType);
224 glu::Shader& get (const glu::ShaderType shaderType) { DE_ASSERT(hasShader(shaderType)); return *m_shaders[shaderType]; }
229 std::map<glu::ShaderType, glu::Shader*> m_shaders;
240 for (std::map<glu::ShaderType, glu::Shader*>::iterator shaderIter = m_shaders.begin(); shaderIter != m_shaders.end(); shaderIter++)
245 bool ShaderAllocator::hasShader (const glu::ShaderType shaderType)
247 if (m_shaders.find(shaderType) != m_shaders.end())
253 glu::Shader& ShaderAllocator::createShader (const glu::ShaderType shaderType)
255 DE_ASSERT(!this->hasShader(shaderType));
257 glu::Shader* const shader = new glu::Shader(m_context, shaderType);
259 m_shaders[shaderType] = shader;
260 this->setSource(shaderType);
265 void ShaderAllocator::deleteShader (const glu::ShaderType shaderType)
267 DE_ASSERT(this->hasShader(shaderType));
269 delete m_shaders[shaderType];
270 m_shaders.erase(shaderType);
273 void ShaderAllocator::setSource (const glu::ShaderType shaderType)
275 DE_ASSERT(this->hasShader(shaderType));
276 DE_ASSERT(!m_srcGen.finished(shaderType));
278 const std::string source = m_srcGen.next(shaderType);
281 m_shaders[shaderType]->setSources(1, &cSource, 0);
300 const glu::ShaderType shaderType = (glu::ShaderType)shaderTypeInt;
302 if (shaders.hasShader(shaderType))
303 logShader(log, renderCtx, shaders.get(shaderType));
328 CreateShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
330 , m_shaderType (shaderType)
344 const glu::ShaderType m_shaderType;
352 CompileShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
354 , m_shaderType (shaderType)
383 const glu::ShaderType m_shaderType;
530 ShaderSourceReplaceCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
532 , m_shaderType (shaderType)
622 glu::ShaderType m_shaderType;
630 ShaderSourceSplitCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType, const int numSlices, const deUint32 flags = 0)
633 , m_shaderType (shaderType)
704 const glu::ShaderType supportShaderType = (m_shaderType == glu::SHADERTYPE_FRAGMENT ? glu::SHADERTYPE_VERTEX : glu::SHADERTYPE_FRAGMENT);
748 glu::ShaderType m_shaderType;
760 ProgramStateCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType);
772 const glu::ShaderType m_shaderType;
775 ProgramStateCase::ProgramStateCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
778 , m_shaderType (shaderType)
863 const glu::ShaderType shaderType = (shaderTypeInt == 1) ? glu::SHADERTYPE_FRAGMENT : glu::SHADERTYPE_VERTEX;
864 const std::string shaderTypeName = getShaderTypeName(shaderType);
869 group->addChild(new T(context, caseName.c_str(), caseDesc.c_str(), shaderType));
880 ProgramStateDetachShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
881 : ProgramStateCase (context, name, desc, shaderType)
902 ProgramStateReattachShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
903 : ProgramStateCase (context, name, desc, shaderType)
925 ProgramStateDeleteShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
926 : ProgramStateCase (context, name, desc, shaderType)
948 ProgramStateReplaceShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
949 : ProgramStateCase (context, name, desc, shaderType)
972 ProgramStateRecompileShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
973 : ProgramStateCase (context, name, desc, shaderType)
995 ProgramStateReplaceSourceCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType)
996 : ProgramStateCase (context, name, desc, shaderType)
1058 const glu::ShaderType shaderType = (shaderTypeInt == 1) ? glu::SHADERTYPE_FRAGMENT : glu::SHADERTYPE_VERTEX;
1060 const std::string caseName = std::string("replace_source") + ((shaderType == glu::SHADERTYPE_FRAGMENT) ? "_fragment" : "_vertex");
1061 const std::string caseDesc = std::string("Replace source code of ") + ((shaderType == glu::SHADERTYPE_FRAGMENT) ? "fragment" : "vertex") + " shader.";
1063 shaderSourceGroup->addChild(new ShaderSourceReplaceCase(m_context, caseName.c_str(), caseDesc.c_str(), shaderType));
1071 const glu::ShaderType shaderType = (shaderTypeInt == 1) ? glu::SHADERTYPE_FRAGMENT : glu::SHADERTYPE_VERTEX;
1082 + ((shaderType == glu::SHADERTYPE_FRAGMENT) ? "_fragment" : "_vertex");
1084 const std::string caseDesc = std::string((shaderType == glu::SHADERTYPE_FRAGMENT) ? "Fragment" : "Vertex")
1091 shaderSourceGroup->addChild(new ShaderSourceSplitCase(m_context, caseName.c_str(), caseDesc.c_str(), shaderType, numSlices, flags));