Lines Matching defs:sample

93  * \brief Creates sample mask with all less significant bits than nthBit set
110 * \brief Creates sample mask with nthBit set
213 throw tcu::NotSupportedError("Requested sample count is greater than GL_MAX_COLOR_TEXTURE_SAMPLES");
277 // generate multisample texture (and query the sample positions in it)
286 m_testCtx.getLog() << tcu::TestLog::Message << "// ERROR: Sample position of sample " << sampleNdx << " should be in range ([0, 1], [0, 1]). Got " << m_samplePositions[sampleNdx] << tcu::TestLog::EndMessage;
287 throw tcu::TestError("invalid sample position");
371 // Setup fbo for drawing and for sample position query
380 // Query sample positions of the multisample texture by querying the sample positions
391 throw tcu::TestError("Error while querying sample positions");
456 // Draw sample
477 // Downsample using only one sample
486 const tcu::ScopedLogSection section (m_testCtx.getLog(), "Test sample position " + de::toString(sampleNdx+1) + "/" + de::toString(m_samples), "Test sample position " + de::toString(sampleNdx+1) + "/" + de::toString(m_samples));
508 m_testCtx.getLog() << tcu::TestLog::Message << "Reading from texture with sample index " << sampleNdx << tcu::TestLog::EndMessage;
564 void updateTexture (int sample);
565 bool verifyTexture (int sample);
566 void drawSample (tcu::Surface& dst, int sample);
637 throw tcu::NotSupportedError("Requested sample count is greater than glGetInternalformativ(GL_SAMPLES) for this target/format");
645 m_testCtx.getLog() << tcu::TestLog::Message << "Sample count is multiple of word size. No unused high bits in sample mask.\nSkipping." << tcu::TestLog::EndMessage;
646 throw tcu::NotSupportedError("Test requires unused high bits (sample count not multiple of 32)");
651 m_testCtx.getLog() << tcu::TestLog::Message << "Creating multisample texture with sample count " << m_samples << tcu::TestLog::EndMessage;
738 const tcu::ScopedLogSection section(m_testCtx.getLog(), "Iteration", (m_currentSample == -1) ? ("Verifying with zero mask") : (std::string() + "Verifying sample " + de::toString(m_currentSample + 1) + "/" + de::toString(m_samples)));
742 // Mask only one sample, clear rest
746 // Verify only one sample set is in the texture
845 void SampleMaskCase::updateTexture (int sample)
864 const std::vector<deUint32> bitmask = genSetNthBitSampleMask(sample);
873 const deUint32 randomMask = (deUint32)deUint32Hash(wordNdx << 2 ^ sample);
880 m_testCtx.getLog() << tcu::TestLog::Message << "Setting sample mask to 0b" << sampleMaskToString(totalBitmask, (int)totalBitmask.size() * 32) << tcu::TestLog::EndMessage;
891 const std::vector<deUint32> bitmask = sample < 0 ? std::vector<deUint32>(m_effectiveSampleMaskWordCount, 0) : genSetNthBitSampleMask(sample);
894 m_testCtx.getLog() << tcu::TestLog::Message << "Setting sample mask to 0b" << sampleMaskToString(bitmask, m_samples) << tcu::TestLog::EndMessage;
910 m_testCtx.getLog() << tcu::TestLog::Message << "Enabling sample coverage. Varying sample coverage for grid cells." << tcu::TestLog::EndMessage;
947 bool SampleMaskCase::verifyTexture (int sample)
955 // Draw sample:
958 drawSample(result, sample);
967 const bool allowMissingCoverage = ((m_flags & (FLAGS_ALPHA_TO_COVERAGE | FLAGS_SAMPLE_COVERAGE)) != 0) || (sample == -1);
969 // disabled sample was written to
975 // enabled sample was not written to
1000 void SampleMaskCase::drawSample (tcu::Surface& dst, int sample)
1002 // Downsample using only one sample
1030 gl.uniform1i (m_samplerProgramSampleNdxLoc, (deInt32)sample);
1033 m_testCtx.getLog() << tcu::TestLog::Message << "Reading from texture with sampler shader, u_sample = " << sample << tcu::TestLog::EndMessage;
1056 /* Check and return the first conformant sample count */
1183 throw tcu::NotSupportedError("Requested sample count is greater than supported");
1185 m_testCtx.getLog() << tcu::TestLog::Message << "Max sample count for " << glu::getTextureFormatStr(internalFormat) << ": " << maxSamples << tcu::TestLog::EndMessage;
1282 const tcu::ScopedLogSection section (m_testCtx.getLog(), "Sample", "Render to texture and sample texture");
1674 // select sample counts
1685 throw tcu::NotSupportedError("Test requires multiple supported sample counts");
1700 throw tcu::NotSupportedError("Test requires multiple supported sample counts");
1725 throw tcu::NotSupportedError("Test requires a sample count supported in both rbo and texture");
2163 // sample mask is ANDed properly
2166 sampleGroup->addChild(new SampleMaskCase(m_context, "sample_mask_and_sample_coverage", "Test with SampleMask and sample coverage", sampleCounts[sampleNdx], SampleMaskCase::FLAGS_SAMPLE_COVERAGE));
2167 sampleGroup->addChild(new SampleMaskCase(m_context, "sample_mask_and_sample_coverage_and_alpha_to_coverage", "Test with SampleMask, sample coverage, and alpha to coverage", sampleCounts[sampleNdx], SampleMaskCase::FLAGS_ALPHA_TO_COVERAGE | SampleMaskCase::FLAGS_SAMPLE_COVERAGE));
2170 sampleGroup->addChild(new SampleMaskCase(m_context, "sample_mask_non_effective_bits", "Test with SampleMask, set higher bits than sample count", sampleCounts[sampleNdx], SampleMaskCase::FLAGS_HIGH_BITS));
2182 negativeGroup->addChild(new NegativeFramebufferCase (m_context, "fbo_attach_different_sample_count_tex_tex", "Attach different sample counts", NegativeFramebufferCase::CASE_DIFFERENT_N_SAMPLES_TEX));
2183 negativeGroup->addChild(new NegativeFramebufferCase (m_context, "fbo_attach_different_sample_count_tex_rbo", "Attach different sample counts", NegativeFramebufferCase::CASE_DIFFERENT_N_SAMPLES_RBO));