void TestGroup::init (void) { addChild(m_fboc.createRenderableTests()); addChild(m_fboc.createAttachmentTests()); addChild(m_fboc.createSizeTests()); TestCaseGroup* layerTests = new TestCaseGroup( getContext(), "layer", "Tests for layer attachments"); static const NumLayersParams s_layersParams[] = { // textureKind numLayers attachmentKind { GL_TEXTURE_2D_ARRAY, 1, 0 }, { GL_TEXTURE_2D_ARRAY, 1, 3 }, { GL_TEXTURE_2D_ARRAY, 4, 3 }, { GL_TEXTURE_2D_ARRAY, 4, 15 }, { GL_TEXTURE_3D, 1, 0 }, { GL_TEXTURE_3D, 1, 15 }, { GL_TEXTURE_3D, 4, 15 }, { GL_TEXTURE_3D, 64, 15 }, }; for (const NumLayersParams* lp = DE_ARRAY_BEGIN(s_layersParams); lp != DE_ARRAY_END(s_layersParams); ++lp) layerTests->addChild(new NumLayersTest(m_fboc, *lp)); addChild(layerTests); TestCaseGroup* sampleTests = new TestCaseGroup( getContext(), "samples", "Tests for multisample attachments"); static const NumSamplesParams s_samplesParams[] = { { { 0, SAMPLES_NONE, SAMPLES_NONE } }, { { 1, SAMPLES_NONE, SAMPLES_NONE } }, { { 2, SAMPLES_NONE, SAMPLES_NONE } }, { { 0, SAMPLES_TEXTURE, SAMPLES_NONE } }, { { 1, SAMPLES_TEXTURE, SAMPLES_NONE } }, { { 2, SAMPLES_TEXTURE, SAMPLES_NONE } }, { { 2, 1, SAMPLES_NONE } }, { { 2, 2, SAMPLES_NONE } }, { { 0, 0, SAMPLES_TEXTURE } }, { { 1, 2, 0 } }, { { 2, 2, 0 } }, { { 1, 1, 1 } }, { { 1, 2, 4 } }, }; for (const NumSamplesParams* lp = DE_ARRAY_BEGIN(s_samplesParams); lp != DE_ARRAY_END(s_samplesParams); ++lp) sampleTests->addChild(new NumSamplesTest(m_fboc, *lp)); addChild(sampleTests); }
std::vector<FunctionContainer> getNegativeAdvancedBlendEquationTestFunctions (void) { const FunctionContainer funcs[] = { {blend_qualifier_mismatch, "blend_qualifier_mismatch", "Test blend qualifier mismatch." }, {attachment_advanced_equation, "attachment_advanced_equation", "Test draw buffer for other color outputs." }, }; return std::vector<FunctionContainer>(DE_ARRAY_BEGIN(funcs), DE_ARRAY_END(funcs)); }
std::vector<FunctionContainer> getNegativePreciseTestFunctions (void) { const FunctionContainer funcs[] = { {precise_as_variable_name, "precise_as_variable_name", "Test precise keyword as variable name." }, {precise_as_function_name, "precise_as_function_name", "Test precise keyword as function name." }, {precise_as_function_argument, "precise_as_function_argument", "Test precise keyword as argument name." }, }; return std::vector<FunctionContainer>(DE_ARRAY_BEGIN(funcs), DE_ARRAY_END(funcs)); }
string NumSamplesParams::getName (const NumSamplesParams& params) { ostringstream os; bool first = true; for (const GLsizei* ns = DE_ARRAY_BEGIN(params.numSamples); ns != DE_ARRAY_END(params.numSamples); ns++) { if (first) first = false; else os << "_"; if (*ns == SAMPLES_NONE) os << "none"; else if (*ns == SAMPLES_TEXTURE) os << "tex"; else os << "rbo" << *ns; } return os.str(); }