Lines Matching full:glu
72 const char *getSimpleShaderSource(const glu::ShaderType shaderType) in getSimpleShaderSource()
79 case glu::SHADERTYPE_VERTEX: in getSimpleShaderSource()
81 case glu::SHADERTYPE_FRAGMENT: in getSimpleShaderSource()
90 void setShaderSources(glu::Shader &shader, const ShaderSources &sources) in setShaderSources()
131 void queryShaderInfo(glu::RenderContext &renderCtx, uint32_t shader, glu::ShaderInfo &info) in queryShaderInfo()
178 virtual std::string next(const glu::ShaderType shaderType) = 0;
179 virtual bool finished(const glu::ShaderType shaderType) const = 0;
192 bool finished(const glu::ShaderType shaderType) const in finished()
198 std::string next(const glu::ShaderType shaderType);
204 std::string ConstantShaderGenerator::next(const glu::ShaderType shaderType) in next()
206 DE_ASSERT(shaderType == glu::SHADERTYPE_VERTEX || shaderType == glu::SHADERTYPE_FRAGMENT); in next()
210 …const std::string outputName = (shaderType == glu::SHADERTYPE_VERTEX) ? "gl_Position" : "gl_FragC… in next()
224 ShaderAllocator(glu::RenderContext &context, SourceGenerator &generator);
227 bool hasShader(const glu::ShaderType shaderType);
229 void setSource(const glu::ShaderType shaderType);
231 glu::Shader &createShader(const glu::ShaderType shaderType);
232 void deleteShader(const glu::ShaderType shaderType);
234 glu::Shader &get(const glu::ShaderType shaderType) in get()
241 const glu::RenderContext &m_context;
243 std::map<glu::ShaderType, glu::Shader *> m_shaders;
246 ShaderAllocator::ShaderAllocator(glu::RenderContext &context, SourceGenerator &generator) in ShaderAllocator()
254 for (std::map<glu::ShaderType, glu::Shader *>::iterator shaderIter = m_shaders.begin(); in ~ShaderAllocator()
260 bool ShaderAllocator::hasShader(const glu::ShaderType shaderType) in hasShader()
268 glu::Shader &ShaderAllocator::createShader(const glu::ShaderType shaderType) in createShader()
272 glu::Shader *const shader = new glu::Shader(m_context, shaderType); in createShader()
280 void ShaderAllocator::deleteShader(const glu::ShaderType shaderType) in deleteShader()
288 void ShaderAllocator::setSource(const glu::ShaderType shaderType) in setSource()
301 void logShader(TestLog &log, glu::RenderContext &renderCtx, glu::Shader &shader) in logShader()
303 glu::ShaderInfo info; in logShader()
309 void logProgram(TestLog &log, glu::RenderContext &renderCtx, glu::Program &program, ShaderAllocator… in logProgram()
313 for (int shaderTypeInt = 0; shaderTypeInt < glu::SHADERTYPE_LAST; shaderTypeInt++) in logProgram()
315 const glu::ShaderType shaderType = (glu::ShaderType)shaderTypeInt; in logProgram()
324 void logVertexFragmentProgram(TestLog &log, glu::RenderContext &renderCtx, glu::Program &program, in logVertexFragmentProgram()
325 glu::Shader &vertShader, glu::Shader &fragShader) in logVertexFragmentProgram()
327 …DE_ASSERT(vertShader.getType() == glu::SHADERTYPE_VERTEX && fragShader.getType() == glu::SHADERTYP… in logVertexFragmentProgram()
344 … CreateShaderCase(Context &context, const char *name, const char *desc, glu::ShaderType shaderType) in CreateShaderCase()
352 const GLuint shaderObject = glCreateShader(glu::getGLShaderType(m_shaderType)); in test()
360 const glu::ShaderType m_shaderType;
368 …CompileShaderCase(Context &context, const char *name, const char *desc, glu::ShaderType shaderType) in CompileShaderCase()
386 const GLuint shaderObject = glCreateShader(glu::getGLShaderType(m_shaderType)); in test()
399 const glu::ShaderType m_shaderType;
421 const char *vertSource = getSimpleShaderSource(glu::SHADERTYPE_VERTEX); in compileShaders()
422 const char *fragSource = getSimpleShaderSource(glu::SHADERTYPE_FRAGMENT); in compileShaders()
545 …ShaderSourceReplaceCase(Context &context, const char *name, const char *desc, glu::ShaderType shad… in ShaderSourceReplaceCase()
567 if (m_shaderType == glu::SHADERTYPE_VERTEX) in generateSecondSource()
569 else if (m_shaderType == glu::SHADERTYPE_FRAGMENT) in generateSecondSource()
577 GLint getSourceLength(glu::Shader &shader) in getSourceLength()
586 std::string readSource(glu::Shader &shader) in readSource()
596 void verifyShaderSourceReplaced(glu::Shader &shader, const std::string &firstSource, in verifyShaderSourceReplaced()
618 glu::Shader shader(m_context.getRenderContext(), m_shaderType); in test()
640 glu::ShaderType m_shaderType;
648 …ShaderSourceSplitCase(Context &context, const char *name, const char *desc, glu::ShaderType shader… in ShaderSourceSplitCase()
657 … DE_ASSERT(m_shaderType == glu::SHADERTYPE_VERTEX || m_shaderType == glu::SHADERTYPE_FRAGMENT); in ShaderSourceSplitCase()
675 if (m_shaderType == glu::SHADERTYPE_VERTEX) in generateFullSource()
677 else if (m_shaderType == glu::SHADERTYPE_FRAGMENT) in generateFullSource()
720 void buildProgram(glu::Shader &shader) in buildProgram()
723 glu::RenderContext &renderCtx = m_context.getRenderContext(); in buildProgram()
725 const glu::ShaderType supportShaderType = in buildProgram()
726 … (m_shaderType == glu::SHADERTYPE_FRAGMENT ? glu::SHADERTYPE_VERTEX : glu::SHADERTYPE_FRAGMENT); in buildProgram()
728 glu::Shader supportShader(renderCtx, supportShaderType); in buildProgram()
730 glu::Program program(renderCtx); in buildProgram()
740 if (m_shaderType == glu::SHADERTYPE_VERTEX) in buildProgram()
749 glu::RenderContext &renderCtx = m_context.getRenderContext(); in test()
752 glu::Shader shader(renderCtx, m_shaderType); in test()
770 glu::ShaderType m_shaderType;
782 …ProgramStateCase(Context &context, const char *name, const char *desc, glu::ShaderType shaderType);
787 void buildProgram(glu::Program &program, ShaderAllocator &shaders);
788 void verify(glu::Program &program, const glu::ProgramInfo &reference);
792 virtual void executeForProgram(glu::Program &program, ShaderAllocator &shaders) = 0;
796 const glu::ShaderType m_shaderType;
799 ProgramStateCase::ProgramStateCase(Context &context, const char *name, const char *desc, glu::Shade… in ProgramStateCase()
804 DE_ASSERT(m_shaderType == glu::SHADERTYPE_VERTEX || m_shaderType == glu::SHADERTYPE_FRAGMENT); in ProgramStateCase()
807 void ProgramStateCase::buildProgram(glu::Program &program, ShaderAllocator &shaders) in buildProgram()
811 glu::Shader &vertShader = shaders.createShader(glu::SHADERTYPE_VERTEX); in buildProgram()
812 glu::Shader &fragShader = shaders.createShader(glu::SHADERTYPE_FRAGMENT); in buildProgram()
824 void ProgramStateCase::verify(glu::Program &program, const glu::ProgramInfo &reference) in verify()
827 const glu::ProgramInfo &programInfo = program.getInfo(); in verify()
853 glu::RenderContext &renderCtx = m_context.getRenderContext(); in test()
858 glu::Program program(renderCtx); in test()
864 glu::ProgramInfo programInfo = program.getInfo(); in test()
889 …const glu::ShaderType shaderType = (shaderTypeInt == 1) ? glu::SHADERTYPE_FRAGMENT : glu::SHADERTY… in addProgramStateCase()
906 …ProgramStateDetachShaderCase(Context &context, const char *name, const char *desc, glu::ShaderType… in ProgramStateDetachShaderCase()
915 void executeForProgram(glu::Program &program, ShaderAllocator &shaders) in executeForProgram()
918 glu::Shader &caseShader = shaders.get(m_shaderType); in executeForProgram()
929 …ProgramStateReattachShaderCase(Context &context, const char *name, const char *desc, glu::ShaderTy… in ProgramStateReattachShaderCase()
938 void executeForProgram(glu::Program &program, ShaderAllocator &shaders) in executeForProgram()
941 glu::Shader &caseShader = shaders.get(m_shaderType); in executeForProgram()
953 …ProgramStateDeleteShaderCase(Context &context, const char *name, const char *desc, glu::ShaderType… in ProgramStateDeleteShaderCase()
962 void executeForProgram(glu::Program &program, ShaderAllocator &shaders) in executeForProgram()
965 glu::Shader &caseShader = shaders.get(m_shaderType); in executeForProgram()
977 …ProgramStateReplaceShaderCase(Context &context, const char *name, const char *desc, glu::ShaderTyp… in ProgramStateReplaceShaderCase()
986 void executeForProgram(glu::Program &program, ShaderAllocator &shaders) in executeForProgram()
989 glu::Shader &caseShader = shaders.get(m_shaderType); in executeForProgram()
1002 …ProgramStateRecompileShaderCase(Context &context, const char *name, const char *desc, glu::ShaderT… in ProgramStateRecompileShaderCase()
1011 void executeForProgram(glu::Program &program, ShaderAllocator &shaders) in executeForProgram()
1014 glu::Shader &caseShader = shaders.get(m_shaderType); in executeForProgram()
1026 …ProgramStateReplaceSourceCase(Context &context, const char *name, const char *desc, glu::ShaderTyp… in ProgramStateReplaceSourceCase()
1035 void executeForProgram(glu::Program &program, ShaderAllocator &shaders) in executeForProgram()
1038 glu::Shader &caseShader = shaders.get(m_shaderType); in executeForProgram()
1067 … "Create vertex shader object", glu::SHADERTYPE_VERTEX)); in init()
1069 … "Create fragment shader object", glu::SHADERTYPE_FRAGMENT)); in init()
1081 …new CompileShaderCase(m_context, "compile_vertex_shader", "Compile vertex shader", glu::SHADERTYPE… in init()
1083 … "Compile fragment shader", glu::SHADERTYPE_FRAGMENT)); in init()
1096 …const glu::ShaderType shaderType = (shaderTypeInt == 1) ? glu::SHADERTYPE_FRAGMENT : glu::SHADERTY… in init()
1099 …std::string("replace_source") + ((shaderType == glu::SHADERTYPE_FRAGMENT) ? "_fragment" : "_vertex… in init()
1101 … ((shaderType == glu::SHADERTYPE_FRAGMENT) ? "fragment" : "vertex") + in init()
1113 const glu::ShaderType shaderType = in init()
1114 (shaderTypeInt == 1) ? glu::SHADERTYPE_FRAGMENT : glu::SHADERTYPE_VERTEX; in init()
1126 ((shaderType == glu::SHADERTYPE_FRAGMENT) ? "_fragment" : "_vertex"); in init()
1129 … std::string((shaderType == glu::SHADERTYPE_FRAGMENT) ? "Fragment" : "Vertex") + in init()