Lines Matching refs:glu
77 const char* getSimpleShaderSource (const glu::ShaderType shaderType) in getSimpleShaderSource()
96 case glu::SHADERTYPE_VERTEX: in getSimpleShaderSource()
98 case glu::SHADERTYPE_FRAGMENT: in getSimpleShaderSource()
107 void setShaderSources (glu::Shader& shader, const ShaderSources& sources) in setShaderSources()
148 void queryShaderInfo (glu::RenderContext& renderCtx, deUint32 shader, glu::ShaderInfo& info) in queryShaderInfo()
188 void drawWithProgram (glu::RenderContext& renderCtx, deUint32 program) in drawWithProgram()
204 glu::VertexArrayBinding vertexArrays[] = in drawWithProgram()
206 glu::va::Float("a_position", 4, 4, 0, &position[0]) in drawWithProgram()
208 …glu::draw(renderCtx, program, DE_LENGTH_OF_ARRAY(vertexArrays), &vertexArrays[0], glu::pr::Triangl… in drawWithProgram()
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; } in finished()
233 std::string next (const glu::ShaderType shaderType);
239 std::string ConstantShaderGenerator::next (const glu::ShaderType shaderType) in next()
241 DE_ASSERT(shaderType == glu::SHADERTYPE_VERTEX || shaderType == glu::SHADERTYPE_FRAGMENT); in next()
245 …const std::string outputName = (shaderType == glu::SHADERTYPE_VERTEX) ? "gl_Position" : "o_fragCol… in next()
251 if (shaderType == glu::SHADERTYPE_FRAGMENT) in next()
267 ShaderAllocator (glu::RenderContext& context, SourceGenerator& generator);
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… in get()
280 const glu::RenderContext& m_context;
282 std::map<glu::ShaderType, glu::Shader*> m_shaders;
285 ShaderAllocator::ShaderAllocator (glu::RenderContext& context, SourceGenerator& generator) in ShaderAllocator()
293 …for (std::map<glu::ShaderType, glu::Shader*>::iterator shaderIter = m_shaders.begin(); shaderIter … in ~ShaderAllocator()
298 bool ShaderAllocator::hasShader (const glu::ShaderType shaderType) in hasShader()
306 glu::Shader& ShaderAllocator::createShader (const glu::ShaderType shaderType) in createShader()
310 glu::Shader* const shader = new glu::Shader(m_context, shaderType); in createShader()
318 void ShaderAllocator::deleteShader (const glu::ShaderType shaderType) in deleteShader()
326 void ShaderAllocator::setSource (const glu::ShaderType shaderType) in setSource()
339 void logShader (TestLog& log, glu::RenderContext& renderCtx, glu::Shader& shader) in logShader()
341 glu::ShaderInfo info; in logShader()
348 void logProgram (TestLog& log, glu::RenderContext& renderCtx, glu::Program& program, ShaderAllocato… in logProgram()
352 for (int shaderTypeInt = 0; shaderTypeInt < glu::SHADERTYPE_LAST; shaderTypeInt++) in logProgram()
354 const glu::ShaderType shaderType = (glu::ShaderType)shaderTypeInt; in logProgram()
363 …rtexFragmentProgram (TestLog& log, glu::RenderContext& renderCtx, glu::Program& program, glu::Shad… in logVertexFragmentProgram()
365 …DE_ASSERT(vertShader.getType() == glu::SHADERTYPE_VERTEX && fragShader.getType() == glu::SHADERTYP… in logVertexFragmentProgram()
382 CreateShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType) in CreateShaderCase()
390 const GLuint shaderObject = glCreateShader(glu::getGLShaderType(m_shaderType)); in test()
398 const glu::ShaderType m_shaderType;
406 …CompileShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderTyp… in CompileShaderCase()
424 const GLuint shaderObject = glCreateShader(glu::getGLShaderType(m_shaderType)); in test()
437 const glu::ShaderType m_shaderType;
459 const char* vertSource = getSimpleShaderSource(glu::SHADERTYPE_VERTEX); in compileShaders()
460 const char* fragSource = getSimpleShaderSource(glu::SHADERTYPE_FRAGMENT); in compileShaders()
584 …ShaderSourceReplaceCase (Context& context, const char* name, const char* desc, glu::ShaderType sha… in ShaderSourceReplaceCase()
602 if (m_shaderType == glu::SHADERTYPE_FRAGMENT) in generateSecondSource()
609 if (m_shaderType == glu::SHADERTYPE_VERTEX) out << " gl_Position = vec4(variable);\n"; in generateSecondSource()
610 else if (m_shaderType == glu::SHADERTYPE_FRAGMENT) out << " o_fragColor = vec4(variable);\n"; in generateSecondSource()
617 GLint getSourceLength (glu::Shader& shader) in getSourceLength()
626 std::string readSource (glu::Shader& shader) in readSource()
636 …void verifyShaderSourceReplaced (glu::Shader& shader, const std::string& firstSource, const std::s… in verifyShaderSourceReplaced()
657 glu::Shader shader (m_context.getRenderContext(), m_shaderType); in test()
679 glu::ShaderType m_shaderType;
687 …ShaderSourceSplitCase (Context& context, const char* name, const char* desc, glu::ShaderType shade… in ShaderSourceSplitCase()
695 DE_ASSERT(m_shaderType == glu::SHADERTYPE_VERTEX || m_shaderType == glu::SHADERTYPE_FRAGMENT); in ShaderSourceSplitCase()
709 if (m_shaderType == glu::SHADERTYPE_FRAGMENT) in generateFullSource()
716 if (m_shaderType == glu::SHADERTYPE_VERTEX) out << " gl_Position = vec4(variable);\n"; in generateFullSource()
717 else if (m_shaderType == glu::SHADERTYPE_FRAGMENT) out << " o_fragColor = vec4(variable);\n"; in generateFullSource()
759 void buildProgram (glu::Shader& shader) in buildProgram()
762 glu::RenderContext& renderCtx = m_context.getRenderContext(); in buildProgram()
764 …const glu::ShaderType supportShaderType = (m_shaderType == glu::SHADERTYPE_FRAGMENT ? glu::SHADERT… in buildProgram()
766 glu::Shader supportShader (renderCtx, supportShaderType); in buildProgram()
768 glu::Program program (renderCtx); in buildProgram()
778 if (m_shaderType == glu::SHADERTYPE_VERTEX) in buildProgram()
787 glu::RenderContext& renderCtx = m_context.getRenderContext(); in test()
790 glu::Shader shader (renderCtx, m_shaderType); in test()
808 const glu::ShaderType m_shaderType;
820 …ProgramStateCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderType…
823 void buildProgram (glu::Program& program, ShaderAllocator& shaders);
824 void verify (glu::Program& program, const glu::ProgramInfo& reference);
828 virtual void executeForProgram (glu::Program& program, ShaderAllocator& shaders) = 0;
832 const glu::ShaderType m_shaderType;
835 ProgramStateCase::ProgramStateCase (Context& context, const char* name, const char* desc, glu::Shad… in ProgramStateCase()
840 DE_ASSERT(m_shaderType == glu::SHADERTYPE_VERTEX || m_shaderType == glu::SHADERTYPE_FRAGMENT); in ProgramStateCase()
843 void ProgramStateCase::buildProgram (glu::Program& program, ShaderAllocator& shaders) in buildProgram()
847 glu::Shader& vertShader = shaders.createShader(glu::SHADERTYPE_VERTEX); in buildProgram()
848 glu::Shader& fragShader = shaders.createShader(glu::SHADERTYPE_FRAGMENT); in buildProgram()
860 void ProgramStateCase::verify (glu::Program& program, const glu::ProgramInfo& reference) in verify()
863 const glu::ProgramInfo& programInfo = program.getInfo(); in verify()
887 glu::RenderContext& renderCtx = m_context.getRenderContext(); in test()
892 glu::Program program (renderCtx); in test()
898 glu::ProgramInfo programInfo = program.getInfo(); in test()
923 …const glu::ShaderType shaderType = (shaderTypeInt == 1) ? glu::SHADERTYPE_FRAGMENT : glu::SHADERT… in addProgramStateCase()
940 …ProgramStateDetachShaderCase (Context& context, const char* name, const char* desc, glu::ShaderTyp… in ProgramStateDetachShaderCase()
949 void executeForProgram (glu::Program& program, ShaderAllocator& shaders) in executeForProgram()
952 glu::Shader& caseShader = shaders.get(m_shaderType); in executeForProgram()
962 …ProgramStateReattachShaderCase (Context& context, const char* name, const char* desc, glu::ShaderT… in ProgramStateReattachShaderCase()
971 void executeForProgram (glu::Program& program, ShaderAllocator& shaders) in executeForProgram()
974 glu::Shader& caseShader = shaders.get(m_shaderType); in executeForProgram()
985 …ProgramStateDeleteShaderCase (Context& context, const char* name, const char* desc, glu::ShaderTyp… in ProgramStateDeleteShaderCase()
994 void executeForProgram (glu::Program& program, ShaderAllocator& shaders) in executeForProgram()
997 glu::Shader& caseShader = shaders.get(m_shaderType); in executeForProgram()
1008 …ProgramStateReplaceShaderCase (Context& context, const char* name, const char* desc, glu::ShaderTy… in ProgramStateReplaceShaderCase()
1017 void executeForProgram (glu::Program& program, ShaderAllocator& shaders) in executeForProgram()
1020 glu::Shader& caseShader = shaders.get(m_shaderType); in executeForProgram()
1032 …ProgramStateRecompileShaderCase (Context& context, const char* name, const char* desc, glu::Shader… in ProgramStateRecompileShaderCase()
1041 void executeForProgram (glu::Program& program, ShaderAllocator& shaders) in executeForProgram()
1044 glu::Shader& caseShader = shaders.get(m_shaderType); in executeForProgram()
1055 …ProgramStateReplaceSourceCase (Context& context, const char* name, const char* desc, glu::ShaderTy… in ProgramStateReplaceSourceCase()
1064 void executeForProgram (glu::Program& program, ShaderAllocator& shaders) in executeForProgram()
1067 glu::Shader& caseShader = shaders.get(m_shaderType); in executeForProgram()
1099 class ProgramBinaryCase : public TestCase, protected glu::CallLogWrapper
1233 const std::string vertSrc = getSimpleShaderSource(glu::SHADERTYPE_VERTEX); in test()
1234 const std::string fragSrc = getSimpleShaderSource(glu::SHADERTYPE_FRAGMENT); in test()
1236 const glu::ProgramSources sources = glu::makeVtxFragSources(vertSrc, fragSrc); in test()
1238 glu::ShaderProgram program (m_context.getRenderContext(), sources); in test()
1265 std::string getShaderSource (const glu::ShaderType shaderType) const in getShaderSource()
1289 DE_ASSERT(shaderType == glu::SHADERTYPE_VERTEX || shaderType == glu::SHADERTYPE_FRAGMENT); in getShaderSource()
1291 return (shaderType == glu::SHADERTYPE_VERTEX) ? vertSrc : fragSrc; in getShaderSource()
1294 void setUniformsRandom (glu::ShaderProgram& program) in setUniformsRandom()
1317 void verifyUniformInt (glu::ShaderProgram& program, const std::string& name) in verifyUniformInt()
1331 void verifyUniformFloat (glu::ShaderProgram& program, const std::string& name) in verifyUniformFloat()
1345 void verifyUniformsReset (glu::ShaderProgram& program) in verifyUniformsReset()
1358 const std::string vertSrc = getShaderSource(glu::SHADERTYPE_VERTEX); in test()
1359 const std::string fragSrc = getShaderSource(glu::SHADERTYPE_FRAGMENT); in test()
1361 const glu::ProgramSources sources = glu::makeVtxFragSources(vertSrc, fragSrc); in test()
1363 glu::ShaderProgram program (m_context.getRenderContext(), sources); in test()
1394 …ProgramBinaryPersistenceCase (Context& context, const char* name, const char* desc, glu::ShaderTyp…
1397 void buildProgram (glu::Program& program, ShaderAllocator& shaders);
1401 virtual void executeForProgram (glu::Program& program, ShaderAllocator& shaders) = 0;
1402 virtual void verify (glu::Program& program, const ProgramBinary& binary);
1406 const glu::ShaderType m_shaderType;
1409 …naryPersistenceCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderT… in ProgramBinaryPersistenceCase()
1414 DE_ASSERT(m_shaderType == glu::SHADERTYPE_VERTEX || m_shaderType == glu::SHADERTYPE_FRAGMENT); in ProgramBinaryPersistenceCase()
1417 void ProgramBinaryPersistenceCase::buildProgram (glu::Program& program, ShaderAllocator& shaders) in buildProgram()
1421 glu::Shader& vertShader = shaders.createShader(glu::SHADERTYPE_VERTEX); in buildProgram()
1422 glu::Shader& fragShader = shaders.createShader(glu::SHADERTYPE_FRAGMENT); in buildProgram()
1434 void ProgramBinaryPersistenceCase::verify (glu::Program& program, const ProgramBinary& binary) in verify()
1451 glu::RenderContext& renderCtx = m_context.getRenderContext(); in test()
1456 glu::Program program (renderCtx); in test()
1488 …const glu::ShaderType shaderType = (shaderTypeInt == 1) ? glu::SHADERTYPE_FRAGMENT : glu::SHADERT… in addProgramBinaryPersistenceCase()
1505 …nceDetachShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderT… in ProgramBinaryPersistenceDetachShaderCase()
1514 void executeForProgram (glu::Program& program, ShaderAllocator& shaders) in executeForProgram()
1517 glu::Shader& caseShader = shaders.get(m_shaderType); in executeForProgram()
1527 …eReattachShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderT… in ProgramBinaryPersistenceReattachShaderCase()
1536 void executeForProgram (glu::Program& program, ShaderAllocator& shaders) in executeForProgram()
1539 glu::Shader& caseShader = shaders.get(m_shaderType); in executeForProgram()
1550 …nceDeleteShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderT… in ProgramBinaryPersistenceDeleteShaderCase()
1559 void executeForProgram (glu::Program& program, ShaderAllocator& shaders) in executeForProgram()
1562 glu::Shader& caseShader = shaders.get(m_shaderType); in executeForProgram()
1573 …ceReplaceShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderT… in ProgramBinaryPersistenceReplaceShaderCase()
1582 void executeForProgram (glu::Program& program, ShaderAllocator& shaders) in executeForProgram()
1585 glu::Shader& caseShader = shaders.get(m_shaderType); in executeForProgram()
1597 …RecompileShaderCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderT… in ProgramBinaryPersistenceRecompileShaderCase()
1606 void executeForProgram (glu::Program& program, ShaderAllocator& shaders) in executeForProgram()
1609 glu::Shader& caseShader = shaders.get(m_shaderType); in executeForProgram()
1620 …ceReplaceSourceCase (Context& context, const char* name, const char* desc, glu::ShaderType shaderT… in ProgramBinaryPersistenceReplaceSourceCase()
1629 void executeForProgram (glu::Program& program, ShaderAllocator& shaders) in executeForProgram()
1632 glu::Shader& caseShader = shaders.get(m_shaderType); in executeForProgram()
1659 …erCase(m_context, "create_vertex_shader", "Create vertex shader object", glu::SHADERTYPE_VERTEX)… in init()
1660 …Case(m_context, "create_fragment_shader", "Create fragment shader object", glu::SHADERTYPE_FRAGMEN… in init()
1670 …ileShaderCase(m_context, "compile_vertex_shader", "Compile vertex shader", glu::SHADERTYPE_VERTEX)… in init()
1671 …haderCase(m_context, "compile_fragment_shader", "Compile fragment shader", glu::SHADERTYPE_FRAGMEN… in init()
1683 …const glu::ShaderType shaderType = (shaderTypeInt == 1) ? glu::SHADERTYPE_FRAGMENT : glu::SHADERT… in init()
1697 …const glu::ShaderType shaderType = (shaderTypeInt == 1) ? glu::SHADERTYPE_FRAGMENT : glu::SHADERT… in init()
1708 + ((shaderType == glu::SHADERTYPE_FRAGMENT) ? "_fragment" : "_vertex"); in init()
1710 …const std::string caseDesc = std::string((shaderType == glu::SHADERTYPE_FRAGMENT) ? "Fragment" :… in init()