Lines Matching refs:glu

60 using glu::ShaderProgram;
61 using glu::RenderContext;
185 tcu::Surface getPixels (const glu::RenderContext& rCtx, int x, int y, int width, int height)
188 glu::readPixels(rCtx, x, y, result.getAccess());
192 tcu::Surface getPixels (const glu::RenderContext& rCtx, const RandomViewport& vp)
210 static int numBasicSubobjects (const glu::VarType& type)
218 const glu::StructType& structType = *type.getStructPtr();
262 GLU_EXPECT_NO_ERROR(gl.getError(), (string() + "glMapBufferRange(" + glu::getBufferTargetName((int)bufferTarget) + ", 0, " + de::toString(numBytes) + ", GL_MAP_READ_BIT)").c_str());
302 TransformFeedbackHandler (const glu::RenderContext& renderCtx, int maxNumVertices);
304 Result renderAndGetPrimitives (deUint32 programGL, deUint32 tfPrimTypeGL, int numBindings, const glu::VertexArrayBinding* bindings, int numVertices) const;
307 const glu::RenderContext& m_renderCtx;
308 const glu::TransformFeedback m_tf;
309 const glu::Buffer m_tfBuffer;
310 const glu::Query m_tfPrimQuery;
314 TransformFeedbackHandler<AttribType>::TransformFeedbackHandler (const glu::RenderContext& renderCtx, int maxNumVertices)
329 typename TransformFeedbackHandler<AttribType>::Result TransformFeedbackHandler<AttribType>::renderAndGetPrimitives (deUint32 programGL, deUint32 tfPrimTypeGL, int numBindings, const glu::VertexArrayBinding* bindings, int numVertices) const
342 glu::draw(m_renderCtx, programGL, numBindings, bindings, glu::pr::Patches(numVertices));
1573 m_program = SharedPtr<const ShaderProgram>(new ShaderProgram(m_context.getRenderContext(), glu::ProgramSources()
1574 << glu::VertexSource ("#version 310 es\n"
1588 << glu::TessellationControlSource ("#version 310 es\n"
1619 << glu::TessellationEvaluationSource ("#version 310 es\n"
1671 << glu::FragmentSource ("#version 310 es\n"
1785 const glu::VertexArrayBinding attrBindings[] =
1787 glu::va::Float("in_v_position", numPosCompsPerVertex, numVertices, 0, &gridPosComps[0]),
1788 glu::va::Float("in_v_tessParam", 1, numVertices, 0, &gridTessParams[0])
1791 glu::draw(renderCtx, programGL, DE_LENGTH_OF_ARRAY(attrBindings), &attrBindings[0],
1792 glu::pr::Patches((int)gridIndices.size(), &gridIndices[0]));
1878 m_program = SharedPtr<const ShaderProgram>(new ShaderProgram(m_context.getRenderContext(), glu::ProgramSources()
1879 << glu::VertexSource ("#version 310 es\n"
1885 << glu::TessellationControlSource ("#version 310 es\n"
1909 << glu::TessellationEvaluationSource ("#version 310 es\n"
1922 << glu::FragmentSource ("#version 310 es\n"
1931 << glu::TransformFeedbackVarying ("out_te_tessCoord")
1932 << glu::TransformFeedbackMode (GL_INTERLEAVED_ATTRIBS)));
2113 m_program = SharedPtr<const ShaderProgram>(new ShaderProgram(m_context.getRenderContext(), glu::ProgramSources()
2114 << glu::VertexSource ("#version 310 es\n"
2120 << glu::TessellationControlSource ("#version 310 es\n"
2133 << glu::TessellationEvaluationSource ("#version 310 es\n"
2146 << glu::FragmentSource ("#version 310 es\n"
2155 << glu::TransformFeedbackVarying ("out_te_tessCoord")
2156 << glu::TransformFeedbackMode (GL_INTERLEAVED_ATTRIBS)));
2268 virtual const glu::ProgramSources makeSources (TessPrimitiveType, SpacingMode, const char* vtxOutPosAttrName) const = DE_NULL;
2286 glu::ProgramSources sources = makeSources(m_primitiveType, m_spacing, "in_tc_position");
2287 DE_ASSERT(sources.sources[glu::SHADERTYPE_TESSELLATION_CONTROL].empty());
2289 sources << glu::TessellationControlSource( "#version 310 es\n"
2318 m_program = SharedPtr<const ShaderProgram>(new glu::ShaderProgram(m_context.getRenderContext(), sources));
2404 const glu::VertexArrayBinding attrBindings[] =
2406 glu::va::Float("in_v_position", 2, (int)positions.size(), 0, &positions[0].x())
2409 glu::draw(m_context.getRenderContext(), programGL, DE_LENGTH_OF_ARRAY(attrBindings), &attrBindings[0],
2410 glu::pr::Patches(patchSize));
2442 const glu::ProgramSources makeSources (TessPrimitiveType primitiveType, SpacingMode spacing, const char* vtxOutPosAttrName) const
2444 return glu::ProgramSources()
2445 << glu::VertexSource ("#version 310 es\n"
2456 << glu::TessellationEvaluationSource ("#version 310 es\n"
2493 << glu::FragmentSource ("#version 310 es\n"
2515 const glu::ProgramSources makeSources (TessPrimitiveType primitiveType, SpacingMode spacing, const char* vtxOutPosAttrName) const
2517 return glu::ProgramSources()
2518 << glu::VertexSource ("#version 310 es\n"
2529 << glu::TessellationEvaluationSource ("#version 310 es\n"
2575 << glu::FragmentSource ("#version 310 es\n"
2598 const glu::ProgramSources makeSources (TessPrimitiveType primitiveType, SpacingMode spacing, const char* vtxOutPosAttrName) const
2603 return glu::ProgramSources()
2604 << glu::VertexSource ("#version 310 es\n"
2615 << glu::TessellationEvaluationSource ("#version 310 es\n"
2647 << glu::FragmentSource ("#version 310 es\n"
2690 m_program = SharedPtr<const ShaderProgram>(new ShaderProgram(m_context.getRenderContext(), glu::ProgramSources()
2691 << glu::VertexSource ("#version 310 es\n"
2697 << glu::TessellationControlSource ("#version 310 es\n"
2713 << glu::TessellationEvaluationSource ("#version 310 es\n"
2723 << glu::FragmentSource ("#version 310 es\n"
2749 const glu::VertexArray vao (renderCtx);
2878 m_program = SharedPtr<const ShaderProgram>(new ShaderProgram(m_context.getRenderContext(), glu::ProgramSources()
2879 << glu::VertexSource ("#version 310 es\n"
2890 << glu::TessellationControlSource ("#version 310 es\n"
2912 << glu::TessellationEvaluationSource ("#version 310 es\n"
2929 << glu::FragmentSource ("#version 310 es\n"
2977 const glu::VertexArrayBinding attrBindings[] =
2979 glu::va::Float("in_v_attr", 1, (int)attributeData.size(), 0, &attributeData[0])
2982 glu::draw(m_context.getRenderContext(), programGL, DE_LENGTH_OF_ARRAY(attrBindings), &attrBindings[0],
2983 glu::pr::Patches(m_inputPatchSize));
3110 m_program = SharedPtr<const ShaderProgram>(new ShaderProgram(m_context.getRenderContext(), glu::ProgramSources()
3111 << glu::VertexSource ("#version 310 es\n"
3122 << glu::TessellationControlSource ("#version 310 es\n"
3150 << glu::TessellationEvaluationSource ("#version 310 es\n"
3183 << glu::FragmentSource ("#version 310 es\n"
3236 const glu::VertexArrayBinding attrBindings[] =
3238 glu::va::Float("in_v_attr", 1, (int)attributeData.size(), 0, &attributeData[0])
3241 glu::draw(m_context.getRenderContext(), programGL, DE_LENGTH_OF_ARRAY(attrBindings), &attrBindings[0],
3242 glu::pr::Patches(numPrimitives*INPUT_PATCH_SIZE));
3314 m_program = SharedPtr<const ShaderProgram>(new ShaderProgram(m_context.getRenderContext(), glu::ProgramSources()
3315 << glu::VertexSource ("#version 310 es\n"
3326 << glu::TessellationControlSource ("#version 310 es\n"
3364 << glu::TessellationEvaluationSource ("#version 310 es\n"
3382 << glu::FragmentSource ("#version 310 es\n"
3424 const glu::VertexArrayBinding attrBindings[] =
3426 glu::va::Float("in_v_attr", 1, (int)attributeData.size(), 0, &attributeData[0])
3429 glu::draw(m_context.getRenderContext(), programGL, DE_LENGTH_OF_ARRAY(attrBindings), &attrBindings[0],
3430 glu::pr::Patches(NUM_VERTICES));
3584 SharedPtr<const ShaderProgram>(new ShaderProgram(m_context.getRenderContext(), glu::ProgramSources()
3585 << glu::VertexSource ("#version 310 es\n"
3595 << glu::TessellationControlSource ("#version 310 es\n"
3617 << glu::TessellationEvaluationSource ("#version 310 es\n"
3634 << glu::FragmentSource ("#version 310 es\n"
3645 << glu::TransformFeedbackVarying ("out_te_tessCoord")
3646 << glu::TransformFeedbackMode (GL_INTERLEAVED_ATTRIBS)))));
3718 const glu::VertexArrayBinding bindings[] = { glu::va::Float("in_v_attr", 1, DE_LENGTH_OF_ARRAY(attribute), 0, &attribute[0]) };
3881 SharedPtr<const ShaderProgram>(new ShaderProgram(m_context.getRenderContext(), glu::ProgramSources()
3882 << glu::VertexSource ("#version 310 es\n"
3892 << glu::TessellationControlSource ("#version 310 es\n"
3910 << glu::TessellationEvaluationSource ("#version 310 es\n"
3925 << glu::FragmentSource ("#version 310 es\n"
3936 << glu::TransformFeedbackVarying ("out_te_tessCoord")
3937 << glu::TransformFeedbackMode (GL_INTERLEAVED_ATTRIBS)))));
3999 const glu::VertexArrayBinding bindings[] = { glu::va::Float("in_v_attr", 1, (int)patchTessLevels.size(), 0, &patchTessLevels[0]) };
4138 SharedPtr<const glu::ShaderProgram> m_program;
4152 m_program = SharedPtr<const ShaderProgram>(new ShaderProgram(m_context.getRenderContext(), glu::ProgramSources()
4153 << glu::VertexSource ("#version 310 es\n"
4163 << glu::TessellationControlSource ("#version 310 es\n"
4181 << glu::TessellationEvaluationSource ("#version 310 es\n"
4219 << glu::FragmentSource ("#version 310 es\n"
4230 << glu::TransformFeedbackVarying ("out_te_tessCoord_isMirrored")
4231 << glu::TransformFeedbackMode (GL_INTERLEAVED_ATTRIBS)));
4278 const glu::VertexArrayBinding bindings[] = { glu::va::Float("in_v_attr", 1, (int)patchTessLevels.size(), 0, &patchTessLevels[0]) };
4422 SharedPtr<const glu::ShaderProgram> m_program;
4436 m_program = SharedPtr<const ShaderProgram>(new ShaderProgram(m_context.getRenderContext(), glu::ProgramSources()
4437 << glu::VertexSource ("#version 310 es\n"
4447 << glu::TessellationControlSource ("#version 310 es\n"
4465 << glu::TessellationEvaluationSource ("#version 310 es\n"
4480 << glu::FragmentSource ("#version 310 es\n"
4491 << glu::TransformFeedbackVarying ("out_te_tessCoord")
4492 << glu::TransformFeedbackMode (GL_INTERLEAVED_ATTRIBS)));
4542 const glu::VertexArrayBinding bindings[] = { glu::va::Float("in_v_attr", 1, (int)patchTessLevels.size(), 0, &patchTessLevels[0]) };
4919 SharedPtr<const glu::ShaderProgram> m_program;
4927 m_program = SharedPtr<const ShaderProgram>(new ShaderProgram(m_context.getRenderContext(), glu::ProgramSources()
4928 << glu::VertexSource ("#version 310 es\n"
4938 << glu::TessellationControlSource ("#version 310 es\n"
4956 << glu::TessellationEvaluationSource ("#version 310 es\n"
4976 << glu::FragmentSource ("#version 310 es\n"
4987 << glu::TransformFeedbackVarying ("out_te_output")
4988 << glu::TransformFeedbackMode (GL_INTERLEAVED_ATTRIBS)));
5041 const glu::VertexArrayBinding bindings[] = { glu::va::Float("in_v_attr", 1, (int)6, 0, &tessLevels[6*tessLevelCaseNdx]) };
5170 SharedPtr<const glu::ShaderProgram> m_program;
5178 m_program = SharedPtr<const ShaderProgram>(new ShaderProgram(m_context.getRenderContext(), glu::ProgramSources()
5179 << glu::VertexSource ("#version 310 es\n"
5189 << glu::TessellationControlSource ("#version 310 es\n"
5213 << glu::TessellationEvaluationSource ("#version 310 es\n"
5229 << glu::FragmentSource ("#version 310 es\n"
5238 << glu::TransformFeedbackVarying ("out_te_tessCoord")
5239 << glu::TransformFeedbackMode (GL_INTERLEAVED_ATTRIBS)));
5351 const glu::VertexArrayBinding bindings[] = { glu::va::Float("in_v_attr", 1, (int)attributes.size(), 0, &attributes[0]) };
5512 typedef string (*BasicTypeVisitFunc)(const string& name, glu::DataType type, int indentationDepth); //!< See glslTraverseBasicTypes below.
5531 Variable (const string& name_, const glu::VarType& type, bool isArray)
5547 glu::VarType m_type; //!< If this Variable is an array element, m_type is the element type; otherwise just the variable type.
5557 glu::VarType type;
5558 Member (const string& n, const glu::VarType& t) : name(n), type(t) {}
5581 const glu::VarType& rootType,
5586 static string glslAssignBasicTypeObject (const string& name, glu::DataType, int indentationDepth);
5587 static string glslCheckBasicTypeObject (const string& name, glu::DataType, int indentationDepth);
5600 vector<glu::StructType> m_structTypes;
5604 SharedPtr<const glu::ShaderProgram> m_program;
5620 const glu::VarType& rootType,
5639 const glu::StructType& structType = *rootType.getStructPtr();
5645 const glu::StructMember& member = structType.getMember(membNdx);
5660 return de::toString(glu::declare(m_type, m_name)) + (m_isArray ? "[" + sizeExpr + "]" : "") + ";\n";
5668 result += "\t" + de::toString(glu::declare(m_members[i].type, m_members[i].name)) + ";\n";
5677 const glu::VarType type = traverseAsArray ? glu::VarType(m_type, numArrayElements) : m_type;
5718 const glu::VarType type = m_isArray ? glu::VarType(m_type, arraySize) : m_type;
5721 for (glu::BasicTypeIterator basicIt = glu::BasicTypeIterator::begin(&type);
5722 basicIt != glu::BasicTypeIterator::end(&type);
5726 return m_name + de::toString(glu::TypeAccessFormat(type, basicIt.getPath()));
5740 const glu::VarType& membType = m_members[memberNdx].type;
5741 for (glu::BasicTypeIterator basicIt = glu::BasicTypeIterator::begin(&membType);
5742 basicIt != glu::BasicTypeIterator::end(&membType);
5746 return m_interfaceName + "[" + de::toString(arrayNdx) + "]." + m_members[memberNdx].name + de::toString(glu::TypeAccessFormat(membType, basicIt.getPath()));
5756 string UserDefinedIOCase::glslAssignBasicTypeObject (const string& name, glu::DataType type, int indentationDepth)
5758 const int scalarSize = glu::getDataTypeScalarSize(type);
5764 if (type != glu::TYPE_FLOAT)
5765 result += string() + glu::getDataTypeName(type) + "(";
5769 if (type != glu::TYPE_FLOAT)
5777 string UserDefinedIOCase::glslCheckBasicTypeObject (const string& name, glu::DataType type, int indentationDepth)
5779 const int scalarSize = glu::getDataTypeScalarSize(type);
5783 result += indentation + "allOk = allOk && compare_" + glu::getDataTypeName(type) + "(" + name + ", ";
5785 if (type != glu::TYPE_FLOAT)
5786 result += string() + glu::getDataTypeName(type) + "(";
5790 if (type != glu::TYPE_FLOAT)
5848 m_structTypes.push_back(glu::StructType("S"));
5850 const glu::VarType highpFloat (glu::TYPE_FLOAT, glu::PRECISION_HIGHP);
5851 glu::StructType& structType = m_structTypes.back();
5852 const glu::VarType structVarType (&structType);
5854 structType.addMember("x", glu::VarType(glu::TYPE_INT, glu::PRECISION_HIGHP));
5855 structType.addMember("y", glu::VarType(glu::TYPE_FLOAT_VEC4, glu::PRECISION_HIGHP));
5856 structType.addMember("z", glu::VarType(highpFloat, 2));
5862 blockMembers.push_back(IOBlock::Member("blockFa", glu::VarType(highpFloat, 3)));
5863 blockMembers.push_back(IOBlock::Member("blockSa", glu::VarType(structVarType, 2)));
5881 tcsDeclarations += de::toString(glu::declare(structType)) + ";\n";
5903 tesDeclarations += de::toString(glu::declare(structType)) + ";\n";
5920 m_program = SharedPtr<const ShaderProgram>(new ShaderProgram(m_context.getRenderContext(), glu::ProgramSources()
5921 << glu::VertexSource ("#version 310 es\n"
5931 << glu::TessellationControlSource ("#version 310 es\n"
5957 << glu::TessellationEvaluationSource ("#version 310 es\n"
5986 << glu::FragmentSource ("#version 310 es\n"
5997 << glu::TransformFeedbackVarying ("out_te_firstFailedInputIndex")
5998 << glu::TransformFeedbackMode (GL_INTERLEAVED_ATTRIBS)));
6031 const glu::VertexArrayBinding bindings[] = { glu::va::Float("in_v_attr", 1, DE_LENGTH_OF_ARRAY(attributes), 0, &attributes[0]) };
6122 SharedPtr<const glu::ShaderProgram> m_program;
6149 m_program = SharedPtr<const ShaderProgram>(new ShaderProgram(m_context.getRenderContext(), glu::ProgramSources()
6150 << glu::VertexSource ("#version 310 es\n"
6160 << glu::TessellationControlSource ("#version 310 es\n"
6183 << glu::TessellationEvaluationSource ("#version 310 es\n"
6204 << glu::FragmentSource ("#version 310 es\n"
6250 const glu::VertexArrayBinding bindings[] = { glu::va::Float("in_v_attr", 4, 3, 0, &attributes[0]) };
6251 glu::draw(renderCtx, programGL, DE_LENGTH_OF_ARRAY(bindings), &bindings[0], glu::pr::Patches(3));