Lines Matching defs:const

58 static std::string sampleMaskToString (const std::vector<deUint32>& bitfield, int numBits)
67 const int targetCharNdx = numBits - (wordNdx*32+bit) - 1;
86 const int wordSize = 32;
87 const int maskLen = highestBitNdx + 1;
97 const int wordSize = 32;
98 const int numWords = getEffectiveSampleMaskWordCount(nthBit - 1);
99 const deUint32 topWordBits = (deUint32)(nthBit - (numWords - 1) * wordSize);
114 const int wordSize = 32;
115 const int numWords = getEffectiveSampleMaskWordCount(nthBit);
116 const deUint32 topWordBits = (deUint32)(nthBit - (numWords - 1) * wordSize);
126 std::string specializeShader (Context& context, const char* code)
128 const glu::ContextType contextType = context.getRenderContext().getType();
129 const glu::GLSLVersion glslVersion = glu::getContextTypeGLSLVersion(contextType);
140 SamplePosRasterizationTest (Context& context, const char* name, const char* desc, int samples);
151 void convertToSceneSpec (TriangleSceneSpec& scene, const tcu::Vec2& samplePos) const;
160 const int m_samples;
161 const int m_canvasSize;
173 const glu::ShaderProgram* m_samplerProgram;
179 SamplePosRasterizationTest::SamplePosRasterizationTest (Context& context, const char* name, const char* desc, int samples)
203 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
260 const tcu::Vec2 p = tcu::Vec2(deFloatCos(((float)i)/20.0f*DE_PI*2) * 0.5f + 0.5f, deFloatSin(((float)i)/20.0f*DE_PI*2) * 0.5f + 0.5f);
261 const tcu::Vec2 d = tcu::Vec2(0.1f, 0.02f);
341 const char* const vertexShaderSource = "${GLSL_VERSION_DECL}\n"
347 const char* const fragmentShaderSource = "${GLSL_VERSION_DECL}\n"
354 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
355 const glu::ShaderProgram program (m_context.getRenderContext(), glu::ProgramSources()
358 const GLuint posLoc = gl.getAttribLocation(program.getProgram(), "a_position");
423 const char* const vertexShaderSource = "${GLSL_VERSION_DECL}\n"
429 const char* const fragShaderSource = "${GLSL_VERSION_DECL}\n"
437 const tcu::ScopedLogSection section (m_testCtx.getLog(), "Generate sampler shader", "Generate sampler shader");
438 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
478 static const tcu::Vec4 fullscreenQuad[] =
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));
487 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
522 void SamplePosRasterizationTest::convertToSceneSpec (TriangleSceneSpec& scene, const tcu::Vec2& samplePos) const
525 const tcu::Vec4 offset = tcu::Vec4(samplePos.x() - 0.5f, samplePos.y() - 0.5f, 0.0f, 0.0f) / tcu::Vec4((float)m_canvasSize, (float)m_canvasSize, 1.0f, 1.0f) * 2.0f;
554 SampleMaskCase (Context& context, const char* name, const char* desc, int samples, int flags);
570 const int m_samples;
571 const int m_canvasSize;
572 const int m_gridsize;
573 const int m_effectiveSampleMaskWordCount;
584 const glu::ShaderProgram* m_samplerProgram;
589 const glu::ShaderProgram* m_alphaProgram;
593 SampleMaskCase::SampleMaskCase (Context& context, const char* name, const char* desc, int samples, int flags)
622 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
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)));
770 const char* const vertexShaderSource = "${GLSL_VERSION_DECL}\n"
776 const char* const fragShaderSource = "${GLSL_VERSION_DECL}\n"
796 const tcu::ScopedLogSection section (m_testCtx.getLog(), "GenerateSamplerShader", "Generate sampler shader");
797 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
799 const glu::GLSLVersion glslVersion = glu::getContextTypeGLSLVersion(m_context.getRenderContext().getType());
817 const char* const vertexShaderSource = "${GLSL_VERSION_DECL}\n"
825 const char* const fragShaderSource = "${GLSL_VERSION_DECL}\n"
832 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
847 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
864 const std::vector<deUint32> bitmask = genSetNthBitSampleMask(sample);
865 const std::vector<deUint32> effectiveMask = genAllSetToNthBitSampleMask(m_samples);
873 const deUint32 randomMask = (deUint32)deUint32Hash(wordNdx << 2 ^ sample);
874 const deUint32 sampleMask = (wordNdx < (int)bitmask.size()) ? (bitmask[wordNdx]) : (0);
875 const deUint32 maskMask = effectiveMask[wordNdx];
885 const GLbitfield wordmask = (wordNdx < (int)totalBitmask.size()) ? ((GLbitfield)(totalBitmask[wordNdx])) : (0);
891 const std::vector<deUint32> bitmask = sample < 0 ? std::vector<deUint32>(m_effectiveSampleMaskWordCount, 0) : genSetNthBitSampleMask(sample);
899 const GLbitfield wordmask = (wordNdx < (int)bitmask.size()) ? ((GLbitfield)(bitmask[wordNdx])) : (0);
964 const tcu::RGBA color = result.getPixel(x, y);
967 const bool allowMissingCoverage = ((m_flags & (FLAGS_ALPHA_TO_COVERAGE | FLAGS_SAMPLE_COVERAGE)) != 0) || (sample == -1);
1003 static const tcu::Vec4 fullscreenQuad[] =
1011 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
1050 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
1101 MultisampleTextureUsageCase (Context& ctx, const char* name, const char* desc, int samples, TextureType type);
1114 bool verifyImage (const tcu::Surface& dst);
1116 static const int s_textureSize = 256;
1117 static const int s_textureArraySize = 8;
1118 static const int s_textureLayer = 3;
1120 const TextureType m_type;
1121 const int m_numSamples;
1130 const bool m_isColorFormat;
1131 const bool m_isSignedFormat;
1132 const bool m_isUnsignedFormat;
1133 const bool m_isDepthFormat;
1134 const bool m_isArrayType;
1137 MultisampleTextureUsageCase::MultisampleTextureUsageCase (Context& ctx, const char* name, const char* desc, int samples, TextureType type)
1162 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
1163 const glw::GLenum internalFormat = (m_isColorFormat) ? (GL_R8) : (m_isSignedFormat) ? (GL_R8I) : (m_isUnsignedFormat) ? (GL_R8UI) : (m_isDepthFormat) ? (GL_DEPTH_COMPONENT32F) : (0);
1164 const glw::GLenum textureTarget = (m_isArrayType) ? (GL_TEXTURE_2D_MULTISAMPLE_ARRAY) : (GL_TEXTURE_2D_MULTISAMPLE);
1165 const glw::GLenum fboAttachment = (m_isDepthFormat) ? (GL_DEPTH_ATTACHMENT) : (GL_COLOR_ATTACHMENT0);
1166 const bool supportsES32orGL45 = glu::contextSupports(m_context.getRenderContext().getType(), glu::ApiType::es(3, 2)) ||
1282 const tcu::ScopedLogSection section (m_testCtx.getLog(), "Sample", "Render to texture and sample texture");
1284 const float minValue = (m_isColorFormat || m_isDepthFormat) ? (0.0f) : (m_isSignedFormat) ? (-100.0f) : (m_isUnsignedFormat) ? (0.0f) : ( 1.0f);
1285 const float maxValue = (m_isColorFormat || m_isDepthFormat) ? (1.0f) : (m_isSignedFormat) ? ( 100.0f) : (m_isUnsignedFormat) ? (200.0f) : (-1.0f);
1287 const float rawValue = rnd.getFloat(minValue, maxValue);
1288 const float preparedValue = (m_isSignedFormat || m_isUnsignedFormat) ? (deFloatFloor(rawValue)) : (rawValue);
1310 const tcu::ScopedLogSection section(m_testCtx.getLog(), "RenderShader", "Generate render-to-texture shader");
1312 static const char* const vertexShaderSource = "${GLSL_VERSION_DECL}\n"
1318 static const char* const fragmentShaderSourceColor = "${GLSL_VERSION_DECL}\n"
1325 static const char* const fragmentShaderSourceDepth = "${GLSL_VERSION_DECL}\n"
1333 const char* const fragmentSource = (m_isDepthFormat) ? (fragmentShaderSourceDepth) : (fragmentShaderSourceColor);
1337 const glu::GLSLVersion glslVersion = glu::getContextTypeGLSLVersion(m_context.getRenderContext().getType());
1358 const tcu::ScopedLogSection section(m_testCtx.getLog(), "SamplerShader", "Generate texture sampler shader");
1360 static const char* const vertexShaderSource = "${GLSL_VERSION_DECL}\n"
1368 static const char* const fragmentShaderSource = "${GLSL_VERSION_DECL}\n"
1378 " const highp vec4 okColor = vec4(0.0, 1.0, 0.0, 1.0);\n"
1379 " const highp vec4 failColor = vec4(1.0, 0.0, 0.0, 1.0);\n"
1380 " const highp float epsilon = ${EPSILON};\n"
1389 const glu::GLSLVersion glslVersion = glu::getContextTypeGLSLVersion(m_context.getRenderContext().getType());
1392 const bool supportsES32orGL45 =
1435 static const tcu::Vec4 fullscreenQuad[] =
1443 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
1444 const int posLocation = gl.getAttribLocation(m_drawShader->getProgram(), "a_position");
1445 const int valueLocation = gl.getUniformLocation(m_drawShader->getProgram(), "u_writeValue");
1463 const float clearColor[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
1468 const deInt32 clearColor[4] = { 0, 0, 0, 0 };
1473 const deUint32 clearColor[4] = { 0, 0, 0, 0 };
1478 const float clearDepth = 0.5f;
1518 static const tcu::Vec4 fullscreenQuad[] =
1526 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
1527 const int posLocation = gl.getAttribLocation(m_samplerShader->getProgram(), "a_position");
1528 const int samplerLocation = gl.getUniformLocation(m_samplerShader->getProgram(), "u_sampler");
1529 const int maxSamplesLocation = gl.getUniformLocation(m_samplerShader->getProgram(), "u_maxSamples");
1530 const int layerLocation = gl.getUniformLocation(m_samplerShader->getProgram(), "u_layer");
1531 const int valueLocation = gl.getUniformLocation(m_samplerShader->getProgram(), "u_cmpValue");
1532 const glw::GLenum textureTarget = (m_isArrayType) ? (GL_TEXTURE_2D_MULTISAMPLE_ARRAY) : (GL_TEXTURE_2D_MULTISAMPLE);
1577 bool MultisampleTextureUsageCase::verifyImage (const tcu::Surface& dst)
1586 const tcu::RGBA color = dst.getPixel(x, y);
1587 const int colorThresholdRed = 1 << (8 - m_context.getRenderTarget().getPixelFormat().redBits);
1588 const int colorThresholdGreen = 1 << (8 - m_context.getRenderTarget().getPixelFormat().greenBits);
1589 const int colorThresholdBlue = 1 << (8 - m_context.getRenderTarget().getPixelFormat().blueBits);
1627 NegativeFramebufferCase (Context& context, const char* name, const char* desc, CaseType caseType);
1637 const CaseType m_caseType;
1638 const int m_fboSize;
1639 const glw::GLenum m_internalFormat;
1645 NegativeFramebufferCase::NegativeFramebufferCase (Context& context, const char* name, const char* desc, CaseType caseType)
1662 const bool colorAttachmentTexture = (m_caseType == CASE_DIFFERENT_N_SAMPLES_TEX) || (m_caseType == CASE_DIFFERENT_FIXED_TEX);
1663 const bool colorAttachmentRbo = (m_caseType == CASE_DIFFERENT_N_SAMPLES_RBO) || (m_caseType == CASE_DIFFERENT_FIXED_RBO);
1664 const bool useDifferentSampleCounts= (m_caseType == CASE_DIFFERENT_N_SAMPLES_TEX) || (m_caseType == CASE_DIFFERENT_N_SAMPLES_RBO);
1740 const bool colorAttachmentTexture = (m_caseType == CASE_DIFFERENT_N_SAMPLES_TEX) || (m_caseType == CASE_DIFFERENT_FIXED_TEX);
1741 const bool colorAttachmentRbo = (m_caseType == CASE_DIFFERENT_N_SAMPLES_RBO) || (m_caseType == CASE_DIFFERENT_FIXED_RBO);
1742 const glw::GLboolean fixedSampleLocations0 = (m_caseType == CASE_DIFFERENT_N_SAMPLES_RBO) ? (GL_TRUE) : (GL_FALSE);
1743 const glw::GLboolean fixedSampleLocations1 = ((m_caseType == CASE_DIFFERENT_FIXED_TEX) || (m_caseType == CASE_DIFFERENT_FIXED_RBO)) ? (GL_TRUE) : (GL_FALSE);
1859 const glw::Functions gl = m_context.getRenderContext().getFunctions();
1891 NegativeTexParameterCase (Context& context, const char* name, const char* desc, TexParam param);
1899 glw::GLenum getParamGLEnum (void) const;
1900 glw::GLint getParamValue (void) const;
1901 glw::GLenum getExpectedError (void) const;
1903 const TexParam m_texParam;
1907 NegativeTexParameterCase::NegativeTexParameterCase (Context& context, const char* name, const char* desc, TexParam param)
1932 static const struct TextureType
1934 const char* name;
1948 const tcu::ScopedLogSection scope(m_testCtx.getLog(), "Iteration", std::string() + "Testing parameter with " + types[m_iteration].name + " texture");
1949 const bool supportsES32orGL45 =
1992 glw::GLenum NegativeTexParameterCase::getParamGLEnum (void) const
2012 glw::GLint NegativeTexParameterCase::getParamValue (void) const
2032 glw::GLenum NegativeTexParameterCase::getExpectedError (void) const
2063 NegativeTexureSampleCase (Context& context, const char* name, const char* desc, SampleCountParam param);
2067 const SampleCountParam m_sampleParam;
2070 NegativeTexureSampleCase::NegativeTexureSampleCase (Context& context, const char* name, const char* desc, SampleCountParam param)
2079 const glw::GLenum expectedError = (m_sampleParam == SAMPLECOUNT_HIGH) ? (GL_INVALID_OPERATION) : (GL_INVALID_VALUE);
2136 static const int sampleCounts[] = { 1, 2, 3, 4, 8, 10, 12, 13, 16, 64 };
2138 static const struct TextureType
2140 const char* name;
2157 tcu::TestCaseGroup* const sampleGroup = new tcu::TestCaseGroup(m_testCtx, (std::string("samples_") + de::toString(sampleCounts[sampleNdx])).c_str(), "Test with N samples");
2179 tcu::TestCaseGroup* const negativeGroup = new tcu::TestCaseGroup(m_testCtx, "negative", "Negative tests");