Lines Matching refs:glu
64 static glu::ShaderProgram* createFloatPrecisionEvalProgram (const glu::RenderContext& context, glu::Precision precision, const char* evalOp, bool isVertexCase)
66 glu::DataType type = glu::TYPE_FLOAT;
67 glu::DataType outType = glu::TYPE_UINT;
68 const char* typeName = glu::getDataTypeName(type);
69 const char* outTypeName = glu::getDataTypeName(outType);
70 const char* precName = glu::getPrecisionName(precision);
121 return new glu::ShaderProgram(context, glu::makeVtxFragSources(vtx.str(), frag.str()));
124 static glu::ShaderProgram* createIntUintPrecisionEvalProgram (const glu::RenderContext& context, glu::DataType type, glu::Precision precision, const char* evalOp, bool isVertexCase)
126 const char* typeName = glu::getDataTypeName(type);
127 const char* precName = glu::getPrecisionName(precision);
174 return new glu::ShaderProgram(context, glu::makeVtxFragSources(vtx.str(), frag.str()));
182 ShaderFloatPrecisionCase (Context& context, const char* name, const char* desc, const char* op, EvalFunc evalFunc, glu::Precision precision, const tcu::Vec2& rangeA, const tcu::Vec2& rangeB, bool isVertexCase);
199 glu::Precision m_precision;
209 glu::ShaderProgram* m_program;
215 ShaderFloatPrecisionCase::ShaderFloatPrecisionCase (Context& context, const char* name, const char* desc, const char* op, EvalFunc evalFunc, glu::Precision precision, const tcu::Vec2& rangeA, const tcu::Vec2& rangeB, bool isVertexCase)
296 const int mantissaBits = m_precision == glu::PRECISION_HIGHP ? 23 : 10;
304 const int roundingUlpError = m_precision == glu::PRECISION_HIGHP ? 1 : 3;
345 vector<glu::VertexArrayBinding> vertexArrays;
356 vertexArrays.push_back(glu::va::Float("a_position", 4, numVertices, 0, &position[0]));
357 vertexArrays.push_back(glu::va::Float("a_in0", 1, numVertices, 0, &in0Arr[0]));
358 vertexArrays.push_back(glu::va::Float("a_in1", 1, numVertices, 0, &in1Arr[0]));
379 glu::draw(m_context.getRenderContext(), prog, (int)vertexArrays.size(), &vertexArrays[0],
380 glu::pr::Triangles(DE_LENGTH_OF_ARRAY(indices), &indices[0]));
436 ShaderIntPrecisionCase (Context& context, const char* name, const char* desc, const char* op, EvalFunc evalFunc, glu::Precision precision, int bits, const tcu::IVec2& rangeA, const tcu::IVec2& rangeB, bool isVertexCase);
450 glu::Precision m_precision;
461 glu::ShaderProgram* m_program;
467 ShaderIntPrecisionCase::ShaderIntPrecisionCase (Context& context, const char* name, const char* desc, const char* op, EvalFunc evalFunc, glu::Precision precision, int bits, const tcu::IVec2& rangeA, const tcu::IVec2& rangeB, bool isVertexCase)
499 m_program = createIntUintPrecisionEvalProgram(m_context.getRenderContext(), glu::TYPE_INT, m_precision, m_op.c_str(), m_isVertexCase);
561 vector<glu::VertexArrayBinding> vertexArrays;
572 vertexArrays.push_back(glu::va::Float("a_position", 4, numVertices, 0, &position[0]));
573 vertexArrays.push_back(glu::va::Int32("a_in0", 1, numVertices, 0, &in0Arr[0]));
574 vertexArrays.push_back(glu::va::Int32("a_in1", 1, numVertices, 0, &in1Arr[0]));
593 glu::draw(m_context.getRenderContext(), prog, (int)vertexArrays.size(), &vertexArrays[0],
594 glu::pr::Triangles(DE_LENGTH_OF_ARRAY(indices), &indices[0]));
630 ShaderUintPrecisionCase (Context& context, const char* name, const char* desc, const char* op, EvalFunc evalFunc, glu::Precision precision, int bits, const tcu::UVec2& rangeA, const tcu::UVec2& rangeB, bool isVertexCase);
644 glu::Precision m_precision;
655 glu::ShaderProgram* m_program;
661 ShaderUintPrecisionCase::ShaderUintPrecisionCase (Context& context, const char* name, const char* desc, const char* op, EvalFunc evalFunc, glu::Precision precision, int bits, const tcu::UVec2& rangeA, const tcu::UVec2& rangeB, bool isVertexCase)
693 m_program = createIntUintPrecisionEvalProgram(m_context.getRenderContext(), glu::TYPE_UINT, m_precision, m_op.c_str(), m_isVertexCase);
755 vector<glu::VertexArrayBinding> vertexArrays;
766 vertexArrays.push_back(glu::va::Float("a_position", 4, numVertices, 0, &position[0]));
767 vertexArrays.push_back(glu::va::Uint32("a_in0", 1, numVertices, 0, &in0Arr[0]));
768 vertexArrays.push_back(glu::va::Uint32("a_in1", 1, numVertices, 0, &in1Arr[0]));
786 glu::draw(m_context.getRenderContext(), prog, (int)vertexArrays.size(), &vertexArrays[0],
787 glu::pr::Triangles(DE_LENGTH_OF_ARRAY(indices), &indices[0]));
859 glu::Precision precision;
865 { "highp_add", "in0 + in1", add<double>, glu::PRECISION_HIGHP, fullRange32F, fullRange32F },
866 { "highp_sub", "in0 - in1", sub<double>, glu::PRECISION_HIGHP, fullRange32F, fullRange32F },
867 { "highp_mul", "in0 * in1", mul<double>, glu::PRECISION_HIGHP, Vec2(-1e5f, 1e5f), Vec2(-1e5f, 1e5f) },
868 { "highp_div", "in0 / in1", div<double>, glu::PRECISION_HIGHP, Vec2(-1e5f, 1e5f), Vec2(-1e5f, 1e5f) },
869 { "mediump_add", "in0 + in1", add<double>, glu::PRECISION_MEDIUMP, fullRange16F, fullRange16F },
870 { "mediump_sub", "in0 - in1", sub<double>, glu::PRECISION_MEDIUMP, fullRange16F, fullRange16F },
871 { "mediump_mul", "in0 * in1", mul<double>, glu::PRECISION_MEDIUMP, Vec2(-1e2f, 1e2f), Vec2(-1e2f, 1e2f) },
872 { "mediump_div", "in0 / in1", div<double>, glu::PRECISION_MEDIUMP, Vec2(-1e2f, 1e2f), Vec2(-1e2f, 1e2f) }
880 glu::Precision precision;
887 { "highp_add", "in0 + in1", add<deInt64>, glu::PRECISION_HIGHP, 32, fullRange32I, fullRange32I },
888 { "highp_sub", "in0 - in1", sub<deInt64>, glu::PRECISION_HIGHP, 32, fullRange32I, fullRange32I },
889 { "highp_mul", "in0 * in1", mul<deInt64>, glu::PRECISION_HIGHP, 32, fullRange32I, fullRange32I },
890 { "highp_div", "in0 / in1", div<deInt64>, glu::PRECISION_HIGHP, 32, fullRange32I, IVec2(-10000, -1) },
891 { "mediump_add", "in0 + in1", add<deInt64>, glu::PRECISION_MEDIUMP, 16, fullRange16I, fullRange16I },
892 { "mediump_sub", "in0 - in1", sub<deInt64>, glu::PRECISION_MEDIUMP, 16, fullRange16I, fullRange16I },
893 { "mediump_mul", "in0 * in1", mul<deInt64>, glu::PRECISION_MEDIUMP, 16, fullRange16I, fullRange16I },
894 { "mediump_div", "in0 / in1", div<deInt64>, glu::PRECISION_MEDIUMP, 16, fullRange16I, IVec2(1, 1000) },
895 { "lowp_add", "in0 + in1", add<deInt64>, glu::PRECISION_LOWP, 8, fullRange8I, fullRange8I },
896 { "lowp_sub", "in0 - in1", sub<deInt64>, glu::PRECISION_LOWP, 8, fullRange8I, fullRange8I },
897 { "lowp_mul", "in0 * in1", mul<deInt64>, glu::PRECISION_LOWP, 8, fullRange8I, fullRange8I },
898 { "lowp_div", "in0 / in1", div<deInt64>, glu::PRECISION_LOWP, 8, fullRange8I, IVec2(-50, -1) }
906 glu::Precision precision;
913 { "highp_add", "in0 + in1", add<deUint32>, glu::PRECISION_HIGHP, 32, fullRange32U, fullRange32U },
914 { "highp_sub", "in0 - in1", sub<deUint32>, glu::PRECISION_HIGHP, 32, fullRange32U, fullRange32U },
915 { "highp_mul", "in0 * in1", mul<deUint32>, glu::PRECISION_HIGHP, 32, fullRange32U, fullRange32U },
916 { "highp_div", "in0 / in1", div<deUint32>, glu::PRECISION_HIGHP, 32, fullRange32U, UVec2(1u, 10000u) },
917 { "mediump_add", "in0 + in1", add<deUint32>, glu::PRECISION_MEDIUMP, 16, fullRange16U, fullRange16U },
918 { "mediump_sub", "in0 - in1", sub<deUint32>, glu::PRECISION_MEDIUMP, 16, fullRange16U, fullRange16U },
919 { "mediump_mul", "in0 * in1", mul<deUint32>, glu::PRECISION_MEDIUMP, 16, fullRange16U, fullRange16U },
920 { "mediump_div", "in0 / in1", div<deUint32>, glu::PRECISION_MEDIUMP, 16, fullRange16U, UVec2(1, 1000u) },
921 { "lowp_add", "in0 + in1", add<deUint32>, glu::PRECISION_LOWP, 8, fullRange8U, fullRange8U },
922 { "lowp_sub", "in0 - in1", sub<deUint32>, glu::PRECISION_LOWP, 8, fullRange8U, fullRange8U },
923 { "lowp_mul", "in0 * in1", mul<deUint32>, glu::PRECISION_LOWP, 8, fullRange8U, fullRange8U },
924 { "lowp_div", "in0 / in1", div<deUint32>, glu::PRECISION_LOWP, 8, fullRange8U, UVec2(1, 50u) }