Lines Matching defs:const

56 	virtual bool	verify	(const tcu::RGBA& testColor, const tcu::IVec2& position) const = 0;
57 virtual void logInfo (tcu::TestLog& log) const = 0;
63 ColorVerifier (const tcu::Vec3& _color, int _threshold = 8)
69 ColorVerifier (const tcu::Vec3& _color, tcu::IVec3 _threshold)
75 bool verify (const tcu::RGBA& testColor, const tcu::IVec2& position) const
81 void logInfo (tcu::TestLog& log) const
92 const tcu::RGBA m_color;
93 const tcu::IVec3 m_threshold;
103 bool verify (const tcu::RGBA& testColor, const tcu::IVec2& position) const
118 void logInfo (tcu::TestLog& log) const
131 bool verify (const tcu::RGBA& testColor, const tcu::IVec2& position) const
137 void logInfo (tcu::TestLog& log) const
148 bool verify (const tcu::RGBA& testColor, const tcu::IVec2& position) const;
149 void logInfo (tcu::TestLog& log) const;
151 const int m_numSamples;
152 const bool m_isStatisticallySignificant;
162 const float variance = (1.0f / (12.0f * (float)m_numSamples));
163 const float standardDeviation = deFloatSqrt(variance);
171 bool SampleAverageVerifier::verify (const tcu::RGBA& testColor, const tcu::IVec2& position) const
176 const tcu::Vec2 avgPosition ((float)testColor.getGreen() / 255.0f, (float)testColor.getBlue() / 255.0f);
177 const tcu::Vec2 distanceFromCenter = tcu::abs(avgPosition - tcu::Vec2(0.5f, 0.5f));
182 void SampleAverageVerifier::logInfo (tcu::TestLog& log) const
194 bool verify (const tcu::RGBA& testColor, const tcu::IVec2& position) const
201 void logInfo (tcu::TestLog& log) const
207 static bool verifyImageWithVerifier (const tcu::Surface& resultImage, tcu::TestLog& log, const Verifier& verifier, bool logOnSuccess = true)
223 const tcu::RGBA color = resultImage.getPixel(x, y);
259 MultisampleRenderCase (Context& context, const char* name, const char* desc, int numSamples, RenderTarget target, int renderSize, int flags = 0);
266 MultisampleRenderCase::MultisampleRenderCase (Context& context, const char* name, const char* desc, int numSamples, RenderTarget target, int renderSize, int flags)
279 const bool supportsES32orGL45 =
291 NumSamplesCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target);
294 std::string genFragmentSource (int numTargetSamples) const;
295 bool verifyImage (const tcu::Surface& resultImage);
304 NumSamplesCase::NumSamplesCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target)
313 std::string NumSamplesCase::genFragmentSource (int numTargetSamples) const
316 const bool supportsES32orGL45 =
336 bool NumSamplesCase::verifyImage (const tcu::Surface& resultImage)
344 MaxSamplesCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target);
349 std::string genFragmentSource (int numTargetSamples) const;
350 bool verifyImage (const tcu::Surface& resultImage);
358 MaxSamplesCase::MaxSamplesCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target)
369 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
382 const int maxSampleLoc = gl.getUniformLocation(m_program->getProgram(), "u_maxSamples");
393 std::string MaxSamplesCase::genFragmentSource (int numTargetSamples) const
398 const bool supportsES32orGL45 =
419 bool MaxSamplesCase::verifyImage (const tcu::Surface& resultImage)
427 SampleIDCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target);
433 std::string genFragmentSource (int numTargetSamples) const;
434 bool verifyImage (const tcu::Surface& resultImage);
435 bool verifySampleBuffers (const std::vector<tcu::Surface>& resultBuffers);
447 const VerificationMode m_vericationMode;
450 SampleIDCase::SampleIDCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target)
482 std::string SampleIDCase::genFragmentSource (int numTargetSamples) const
487 const bool supportsES32orGL45 =
548 bool SampleIDCase::verifyImage (const tcu::Surface& resultImage)
568 bool SampleIDCase::verifySampleBuffers (const std::vector<tcu::Surface>& resultBuffers)
585 const int threshold = 255 / 4 / m_numTargetSamples + 1;
586 const float sampleIdColor = (float)sampleNdx / (float)m_numTargetSamples;
601 SamplePosDistributionCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target);
611 std::string genFragmentSource (int numTargetSamples) const;
612 bool verifyImage (const tcu::Surface& resultImage);
613 bool verifySampleBuffers (const std::vector<tcu::Surface>& resultBuffers);
616 SamplePosDistributionCase::SamplePosDistributionCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target)
655 std::string SamplePosDistributionCase::genFragmentSource (int numTargetSamples) const
660 const bool multisampleTarget = (m_numRequestedSamples > 0) || (m_renderTarget == TARGET_DEFAULT && m_context.getRenderTarget().getNumSamples() > 1);
662 const bool supportsES32orGL45 =
701 bool SamplePosDistributionCase::verifyImage (const tcu::Surface& resultImage)
703 const int sampleCount = (m_renderTarget == TARGET_DEFAULT) ? (m_context.getRenderTarget().getNumSamples()) : (m_numRequestedSamples);
717 bool SamplePosDistributionCase::verifySampleBuffers (const std::vector<tcu::Surface>& resultBuffers)
719 const int width = resultBuffers[0].getWidth();
720 const int height = resultBuffers[0].getHeight();
758 const int printFloodLimit = 5;
771 const tcu::RGBA color = resultBuffers[sampleNdx].getPixel(x, y);
818 const SampleAverageVerifier verifier (m_numTargetSamples);
821 const int printFloodLimit = 5;
840 const tcu::RGBA color = resultBuffers[sampleNdx].getPixel(x, y);
901 SamplePosCorrectnessCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target);
914 std::string genVertexSource (int numTargetSamples) const;
915 std::string genFragmentSource (int numTargetSamples) const;
916 bool verifyImage (const tcu::Surface& resultImage);
921 SamplePosCorrectnessCase::SamplePosCorrectnessCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target)
934 const bool isES32orGL45 = glu::contextSupports(ctxType, glu::ApiType::es(3, 2)) ||
960 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
975 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
983 std::string SamplePosCorrectnessCase::genVertexSource (int numTargetSamples) const
986 const bool supportsES32orGL45 =
1008 std::string SamplePosCorrectnessCase::genFragmentSource (int numTargetSamples) const
1013 const bool supportsES32orGL45 =
1029 " const highp float maxDistance = 0.15625; // 4 subpixel bits. Assume 3 accurate bits + 0.03125 for other errors\n" // 0.03125 = mediump epsilon when value = 32 (RENDER_SIZE)
1056 bool SamplePosCorrectnessCase::verifyImage (const tcu::Surface& resultImage)
1073 SampleMaskBaseCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target, int renderSize, ShaderRunMode runMode, int flags = 0);
1080 virtual bool verifyImage (const tcu::Surface& resultImage);
1082 const ShaderRunMode m_runMode;
1085 SampleMaskBaseCase::SampleMaskBaseCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target, int renderSize, ShaderRunMode runMode, int flags)
1098 const bool supportsES32orGL45 = glu::contextSupports(m_context.getRenderContext().getType(), glu::ApiType::es(3, 2)) ||
1109 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
1123 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
1133 bool SampleMaskBaseCase::verifyImage (const tcu::Surface& resultImage)
1142 SampleMaskCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target);
1155 std::string genFragmentSource (int numTargetSamples) const;
1158 SampleMaskCase::SampleMaskCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target)
1182 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
1183 const bool multisampleTarget = (m_numRequestedSamples > 0) || (m_renderTarget == TARGET_DEFAULT && m_context.getRenderTarget().getNumSamples() > 1);
1184 const deUint32 fullMask = (deUint32)0xAAAAAAAAUL;
1185 const deUint32 maskMask = (1U << m_numTargetSamples) - 1;
1186 const deUint32 effectiveMask = fullMask & maskMask;
1198 const int maskLoc = gl.getUniformLocation(m_program->getProgram(), "u_sampleMask");
1212 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
1213 const deUint32 fullMask = (1U << m_numTargetSamples) - 1;
1223 std::string SampleMaskCase::genFragmentSource (int numTargetSamples) const
1227 const bool multisampleTarget = (m_numRequestedSamples > 0) || (m_renderTarget == TARGET_DEFAULT && m_context.getRenderTarget().getNumSamples() > 1);
1229 const bool supportsES32orGL45 = glu::contextSupports(m_context.getRenderContext().getType(), glu::ApiType::es(3, 2)) ||
1276 SampleMaskCountCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target, ShaderRunMode runMode);
1289 std::string genFragmentSource (int numTargetSamples) const;
1292 SampleMaskCountCase::SampleMaskCountCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target, ShaderRunMode runMode)
1334 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
1338 const int maxLoc = gl.getUniformLocation(m_program->getProgram(), "u_maxBitCount");
1339 const int minLoc = gl.getUniformLocation(m_program->getProgram(), "u_minBitCount");
1340 const int minBitCount = 1;
1341 const int maxBitCount = m_numTargetSamples;
1356 const int maxLoc = gl.getUniformLocation(m_program->getProgram(), "u_maxBitCount");
1357 const int minLoc = gl.getUniformLocation(m_program->getProgram(), "u_minBitCount");
1360 const int minInvocationCount = ((m_numTargetSamples + 1) / 2);
1361 const int minBitCount = 1;
1362 const int maxBitCount = m_numTargetSamples - ((minInvocationCount-1) * minBitCount);
1384 std::string SampleMaskCountCase::genFragmentSource (int numTargetSamples) const
1389 const bool supportsES32orGL45 = glu::contextSupports(m_context.getRenderContext().getType(), glu::ApiType::es(3, 2)) ||
1445 SampleMaskUniqueCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target, ShaderRunMode runMode);
1456 std::string genFragmentSource (int numTargetSamples) const;
1457 bool verifySampleBuffers (const std::vector<tcu::Surface>& resultBuffers);
1460 SampleMaskUniqueCase::SampleMaskUniqueCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target, ShaderRunMode runMode)
1486 std::string SampleMaskUniqueCase::genFragmentSource (int numTargetSamples) const
1491 const bool supportsES32orGL45 = glu::contextSupports(m_context.getRenderContext().getType(), glu::ApiType::es(3, 2)) ||
1536 bool SampleMaskUniqueCase::verifySampleBuffers (const std::vector<tcu::Surface>& resultBuffers)
1538 const int width = resultBuffers[0].getWidth();
1539 const int height = resultBuffers[0].getHeight();
1587 const int printFloodLimit = 5;
1602 const tcu::RGBA color = resultBuffers[sampleNdx].getPixel(x, y);
1653 SampleMaskUniqueSetCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target, ShaderRunMode runMode);
1667 std::string genFragmentSource (int numTargetSamples) const;
1668 bool verifySampleBuffers (const std::vector<tcu::Surface>& resultBuffers);
1669 std::string getIterationDescription (int iteration) const;
1677 SampleMaskUniqueSetCase::SampleMaskUniqueSetCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target, ShaderRunMode runMode)
1714 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
1715 const int selectorLoc = gl.getUniformLocation(m_program->getProgram(), "u_bitSelector");
1730 std::string SampleMaskUniqueSetCase::genFragmentSource (int numTargetSamples) const
1735 const bool supportsES32orGL45 = glu::contextSupports(m_context.getRenderContext().getType(), glu::ApiType::es(3, 2)) ||
1769 bool SampleMaskUniqueSetCase::verifySampleBuffers (const std::vector<tcu::Surface>& resultBuffers)
1780 std::string SampleMaskUniqueSetCase::getIterationDescription (int iteration) const
1801 const int width = m_iterationSampleBuffers[0].getWidth();
1802 const int height = m_iterationSampleBuffers[0].getHeight();
1805 const tcu::ScopedLogSection section (m_testCtx.getLog(), "Verify", "Verify masks");
1816 const tcu::RGBA lowColor = m_iterationSampleBuffers[sampleNdx].getPixel(x, y);
1817 const tcu::RGBA highColor = m_iterationSampleBuffers[sampleNdx + (int)sampleCoverage.size()].getPixel(x, y);
1845 const int printFloodLimit = 5;
1883 const int printFloodLimit = 5;
1895 const deUint32 maskA = sampleCoverage[sampleNdxA].getAccess().getPixelUint(x, y).x();
1896 const deUint32 maskB = sampleCoverage[sampleNdxB].getAccess().getPixelUint(x, y).x();
1937 const deUint32 minNumInvocations = (deUint32)de::max(1, (m_numTargetSamples+1)/2);
1940 const int printFloodLimit = 5;
1951 const deUint32 mask = sampleCoverage[maskNdx].getAccess().getPixelUint(x, y).x();
2003 SampleMaskWriteCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target, ShaderRunMode runMode, TestMode testMode);
2016 std::string genFragmentSource (int numTargetSamples) const;
2017 bool verifyImage (const tcu::Surface& resultImage);
2019 const TestMode m_testMode;
2022 SampleMaskWriteCase::SampleMaskWriteCase (Context& context, const char* name, const char* desc, int sampleCount, RenderTarget target, ShaderRunMode runMode, TestMode testMode)
2059 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2065 const int maskLoc = gl.getUniformLocation(m_program->getProgram(), "u_mask");
2066 const deUint32 mask = (deUint32)0xAAAAAAAAUL;
2086 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2090 const deUint32 fullMask = (1U << m_numTargetSamples) - 1;
2100 std::string SampleMaskWriteCase::genFragmentSource (int numTargetSamples) const
2106 const bool supportsES32orGL45 = glu::contextSupports(m_context.getRenderContext().getType(), glu::ApiType::es(3, 2)) ||
2164 bool SampleMaskWriteCase::verifyImage (const tcu::Surface& resultImage)
2166 const bool singleSampleTarget = m_numRequestedSamples == 0 && !(m_renderTarget == TARGET_DEFAULT && m_context.getRenderTarget().getNumSamples() > 1);
2221 tcu::TestCaseGroup* const numSampleGroup = new tcu::TestCaseGroup(m_testCtx, "num_samples", "Test NumSamples");
2222 tcu::TestCaseGroup* const maxSampleGroup = new tcu::TestCaseGroup(m_testCtx, "max_samples", "Test MaxSamples");
2223 tcu::TestCaseGroup* const sampleIDGroup = new tcu::TestCaseGroup(m_testCtx, "sample_id", "Test SampleID");
2224 tcu::TestCaseGroup* const samplePosGroup = new tcu::TestCaseGroup(m_testCtx, "sample_pos", "Test SamplePosition");
2225 tcu::TestCaseGroup* const sampleMaskInGroup = new tcu::TestCaseGroup(m_testCtx, "sample_mask_in", "Test SampleMaskIn");
2226 tcu::TestCaseGroup* const sampleMaskGroup = new tcu::TestCaseGroup(m_testCtx, "sample_mask", "Test SampleMask");
2235 static const struct RenderTarget
2237 const char* name;
2238 const char* desc;
2279 tcu::TestCaseGroup* const group = new tcu::TestCaseGroup(m_testCtx, "correctness", "Test SamplePos correctness");
2287 tcu::TestCaseGroup* const group = new tcu::TestCaseGroup(m_testCtx, "distribution", "Test SamplePos distribution");
2299 tcu::TestCaseGroup* const group = new tcu::TestCaseGroup(m_testCtx, "sample_mask", "Test with GL_SAMPLE_MASK");
2307 tcu::TestCaseGroup* const group = new tcu::TestCaseGroup(m_testCtx, "bit_count_per_pixel", "Test number of coverage bits");
2315 tcu::TestCaseGroup* const group = new tcu::TestCaseGroup(m_testCtx, "bit_count_per_sample", "Test number of coverage bits");
2323 tcu::TestCaseGroup* const group = new tcu::TestCaseGroup(m_testCtx, "bit_count_per_two_samples", "Test number of coverage bits");
2331 tcu::TestCaseGroup* const group = new tcu::TestCaseGroup(m_testCtx, "bits_unique_per_sample", "Test coverage bits");
2340 tcu::TestCaseGroup* const group = new tcu::TestCaseGroup(m_testCtx, "bits_unique_per_two_samples", "Test coverage bits");
2353 tcu::TestCaseGroup* const group = new tcu::TestCaseGroup(m_testCtx, "discard_half_per_pixel", "Test coverage bits");
2361 tcu::TestCaseGroup* const group = new tcu::TestCaseGroup(m_testCtx, "discard_half_per_sample", "Test coverage bits");
2369 tcu::TestCaseGroup* const group = new tcu::TestCaseGroup(m_testCtx, "discard_half_per_two_samples", "Test coverage bits");
2378 tcu::TestCaseGroup* const group = new tcu::TestCaseGroup(m_testCtx, "inverse_per_pixel", "Test coverage bits");
2386 tcu::TestCaseGroup* const group = new tcu::TestCaseGroup(m_testCtx, "inverse_per_sample", "Test coverage bits");
2394 tcu::TestCaseGroup* const group = new tcu::TestCaseGroup(m_testCtx, "inverse_per_two_samples", "Test coverage bits");