Lines Matching defs:config

2248 	// Get the proper viewport vector according to the test config.
2254 // Gets the proper vertex generator according to the test config.
2260 // Gets the inactive vertex generator according to the test config. If there's only one, return that.
2266 // Get the active number of patch control points according to the test config.
2679 // Returns the list of dynamic states affected by this config.
2795 // Returns the list of extensions needed by this config. Note some other
6518 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6519 config.cullModeConfig.staticValue = vk::VK_CULL_MODE_FRONT_BIT;
6520 config.cullModeConfig.dynamicValue = tcu::just<vk::VkCullModeFlags>(vk::VK_CULL_MODE_NONE);
6522 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "cull_none", config));
6525 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6526 config.cullModeConfig.staticValue = vk::VK_CULL_MODE_FRONT_AND_BACK;
6527 config.cullModeConfig.dynamicValue = tcu::just<vk::VkCullModeFlags>(vk::VK_CULL_MODE_BACK_BIT);
6529 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "cull_back", config));
6532 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6534 config.meshParams[0].reversed = true;
6535 config.cullModeConfig.staticValue = vk::VK_CULL_MODE_BACK_BIT;
6536 config.cullModeConfig.dynamicValue = tcu::just<vk::VkCullModeFlags>(vk::VK_CULL_MODE_FRONT_BIT);
6538 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "cull_front", config));
6541 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6542 config.cullModeConfig.staticValue = vk::VK_CULL_MODE_NONE;
6543 config.cullModeConfig.dynamicValue = tcu::just<vk::VkCullModeFlags>(vk::VK_CULL_MODE_FRONT_AND_BACK);
6544 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
6546 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "cull_front_and_back", config));
6551 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6552 config.cullModeConfig.staticValue = vk::VK_CULL_MODE_BACK_BIT;
6553 config.frontFaceConfig.staticValue = vk::VK_FRONT_FACE_CLOCKWISE;
6554 config.frontFaceConfig.dynamicValue = tcu::just<vk::VkFrontFace>(vk::VK_FRONT_FACE_COUNTER_CLOCKWISE);
6556 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "front_face_cw", config));
6559 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6561 config.meshParams[0].reversed = true;
6562 config.cullModeConfig.staticValue = vk::VK_CULL_MODE_BACK_BIT;
6563 config.frontFaceConfig.staticValue = vk::VK_FRONT_FACE_COUNTER_CLOCKWISE;
6564 config.frontFaceConfig.dynamicValue = tcu::just<vk::VkFrontFace>(vk::VK_FRONT_FACE_CLOCKWISE);
6566 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "front_face_ccw", config));
6569 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6570 config.cullModeConfig.staticValue = vk::VK_CULL_MODE_BACK_BIT;
6571 config.frontFaceConfig.staticValue = vk::VK_FRONT_FACE_COUNTER_CLOCKWISE;
6572 config.frontFaceConfig.dynamicValue = tcu::just<vk::VkFrontFace>(vk::VK_FRONT_FACE_CLOCKWISE);
6573 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
6575 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "front_face_cw_reversed", config));
6578 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6580 config.meshParams[0].reversed = true;
6581 config.cullModeConfig.staticValue = vk::VK_CULL_MODE_BACK_BIT;
6582 config.frontFaceConfig.staticValue = vk::VK_FRONT_FACE_CLOCKWISE;
6583 config.frontFaceConfig.dynamicValue = tcu::just<vk::VkFrontFace>(vk::VK_FRONT_FACE_COUNTER_CLOCKWISE);
6584 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
6586 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "front_face_ccw_reversed", config));
6591 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6592 config.rastDiscardEnableConfig.staticValue = false;
6593 config.rastDiscardEnableConfig.dynamicValue = tcu::just(true);
6594 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
6596 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "disable_raster", config));
6599 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6600 config.rastDiscardEnableConfig.staticValue = true;
6601 config.rastDiscardEnableConfig.dynamicValue = tcu::just(false);
6603 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "enable_raster", config));
6608 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6610 config.logicOpEnableConfig.staticValue = true;
6611 config.logicOpConfig.staticValue = vk::VK_LOGIC_OP_CLEAR;
6612 config.logicOpConfig.dynamicValue = tcu::just<vk::VkLogicOp>(vk::VK_LOGIC_OP_OR);
6615 config.meshParams[0].color = kLogicOpTriangleColorFl;
6616 config.clearColorValue = vk::makeClearValueColorU32(kGreenClearColor.x(), kGreenClearColor.y(), kGreenClearColor.z(), kGreenClearColor.w());
6617 config.referenceColor.reset (new SingleColorGenerator(kLogicOpFinalColor));
6620 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "logic_op_or", config));
6625 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6627 config.logicOpEnableConfig.staticValue = false;
6628 config.logicOpEnableConfig.dynamicValue = true;
6629 config.logicOpConfig.staticValue = vk::VK_LOGIC_OP_OR;
6632 config.meshParams[0].color = kLogicOpTriangleColorFl;
6633 config.clearColorValue = vk::makeClearValueColorU32(kGreenClearColor.x(), kGreenClearColor.y(), kGreenClearColor.z(), kGreenClearColor.w());
6634 config.referenceColor.reset (new SingleColorGenerator(kLogicOpFinalColor));
6637 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "logic_op_enable", config));
6640 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6642 config.logicOpEnableConfig.staticValue = true;
6643 config.logicOpEnableConfig.dynamicValue = false;
6644 config.logicOpConfig.staticValue = vk::VK_LOGIC_OP_OR;
6647 config.meshParams[0].color = kLogicOpTriangleColorFl;
6648 config.clearColorValue = vk::makeClearValueColorU32(kGreenClearColor.x(), kGreenClearColor.y(), kGreenClearColor.z(), kGreenClearColor.w());
6649 config.referenceColor.reset (new SingleColorGenerator(kLogicOpTriangleColor));
6652 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "logic_op_disable", config));
6657 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6660 config.colorBlendEquationConfig.staticValue = ColorBlendEq(vk::VK_BLEND_FACTOR_ZERO,
6667 config.colorBlendEnableConfig.staticValue = false;
6668 config.colorBlendEnableConfig.dynamicValue = true;
6669 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
6672 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "color_blend_enable", config));
6675 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6678 config.colorBlendEquationConfig.staticValue = ColorBlendEq(vk::VK_BLEND_FACTOR_ZERO,
6685 config.colorBlendEnableConfig.staticValue = true;
6686 config.colorBlendEnableConfig.dynamicValue = false;
6689 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "color_blend_disable", config));
6711 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6714 config.colorBlendEquationConfig.staticValue = ColorBlendEq(vk::VK_BLEND_FACTOR_ZERO,
6722 config.colorBlendEquationConfig.dynamicValue = ColorBlendEq(vk::VK_BLEND_FACTOR_ONE,
6731 config.colorBlendEnableConfig.staticValue = !enableStateValue;
6732 config.colorBlendEnableConfig.dynamicValue = enableStateValue;
6733 config.colorWriteMaskConfig.staticValue = ( 0 | 0 | 0 | 0);
6734 config.colorWriteMaskConfig.dynamicValue = (CR | CG | CB | CA);
6735 config.blendConstantsConfig.staticValue = BlendConstArray{1.0f, 1.0f, 1.0f, 1.0f};
6736 config.blendConstantsConfig.dynamicValue = BlendConstArray{0.0f, 0.0f, 0.0f, 0.0f};
6739 config.useColorWriteEnable = true;
6740 config.colorWriteEnableConfig.staticValue = false;
6741 config.colorWriteEnableConfig.dynamicValue = true;
6745 config.forceUnormColorFormat = true;
6746 config.logicOpEnableConfig.staticValue = true;
6747 config.logicOpEnableConfig.dynamicValue = false;
6748 config.logicOpConfig.staticValue = vk::VK_LOGIC_OP_COPY;
6749 config.logicOpConfig.dynamicValue = vk::VK_LOGIC_OP_CLEAR;
6754 config.colorBlendEnableConfig.staticValue = enableStateValue;
6761 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "color_blend_equation_new_color" + nameSuffix, config));
6763 config.colorBlendEquationConfig.swapValues();
6764 config.referenceColor.reset(new SingleColorGenerator(enableStateValue ? kDefaultClearColor : kDefaultTriangleColor));
6767 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "color_blend_equation_old_color" + nameSuffix, config));
6791 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6794 config.colorBlendEquationConfig.staticValue = ColorBlendEq(vk::VK_BLEND_FACTOR_ZERO,
6802 config.colorBlendEquationConfig.dynamicValue = ColorBlendEq(vk::VK_BLEND_FACTOR_ONE,
6811 config.colorBlendEnableConfig.staticValue = !enableStateValue;
6812 config.colorBlendEnableConfig.dynamicValue = enableStateValue;
6813 config.colorWriteMaskConfig.staticValue = ( 0 | 0 | 0 | 0);
6814 config.colorWriteMaskConfig.dynamicValue = (CR | CG | CB | CA);
6815 config.blendConstantsConfig.staticValue = BlendConstArray{1.0f, 1.0f, 1.0f, 1.0f};
6816 config.blendConstantsConfig.dynamicValue = BlendConstArray{0.0f, 0.0f, 0.0f, 0.0f};
6819 config.useColorWriteEnable = true;
6820 config.colorWriteEnableConfig.staticValue = false;
6821 config.colorWriteEnableConfig.dynamicValue = true;
6825 config.forceUnormColorFormat = true;
6826 config.logicOpEnableConfig.staticValue = true;
6827 config.logicOpEnableConfig.dynamicValue = false;
6828 config.logicOpConfig.staticValue = vk::VK_LOGIC_OP_COPY;
6829 config.logicOpConfig.dynamicValue = vk::VK_LOGIC_OP_CLEAR;
6834 config.colorBlendEnableConfig.staticValue = true;
6841 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "color_blend_equation_advanced_new_color" + nameSuffix, config));
6843 config.colorBlendEquationConfig.swapValues();
6844 config.referenceColor.reset(new SingleColorGenerator(enableStateValue ? kDefaultClearColor : kDefaultTriangleColor));
6847 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "color_blend_equation_advanced_old_color" + nameSuffix, config));
6866 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6869 config.colorBlendBoth = true;
6871 config.colorBlendEnableConfig.staticValue = colorBlendEnableStatic;
6872 config.colorBlendEnableConfig.dynamicValue = colorBlendEnableDyn;
6874 config.colorWriteMaskConfig.staticValue = ( 0 | 0 | 0 | 0);
6875 config.colorWriteMaskConfig.dynamicValue = (CR | CG | CB | CA);
6876 config.blendConstantsConfig.staticValue = BlendConstArray{1.0f, 1.0f, 1.0f, 1.0f};
6877 config.blendConstantsConfig.dynamicValue = BlendConstArray{0.0f, 0.0f, 0.0f, 0.0f};
6879 config.useColorWriteEnable = true;
6880 config.colorWriteEnableConfig.staticValue = false;
6881 config.colorWriteEnableConfig.dynamicValue = true;
6883 config.forceUnormColorFormat = true;
6884 config.logicOpEnableConfig.staticValue = true;
6885 config.logicOpEnableConfig.dynamicValue = false;
6886 config.logicOpConfig.staticValue = vk::VK_LOGIC_OP_COPY;
6887 config.logicOpConfig.dynamicValue = vk::VK_LOGIC_OP_CLEAR;
6890 config.colorBlendEquationConfig.staticValue = ColorBlendEq(vk::VK_BLEND_FACTOR_ONE,
6898 config.colorBlendEquationConfig.dynamicValue = ColorBlendEq(vk::VK_BLEND_FACTOR_ZERO,
6906 config.colorBlendEquationConfig.swapValues();
6910 config.referenceColor.reset(new SingleColorGenerator(expectGeomColor ? kDefaultTriangleColor : kDefaultClearColor));
6913 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, testName, config));
6956 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
6958 config.dualSrcBlend = true;
6959 config.colorBlendEnableConfig.staticValue = true;
6960 config.colorBlendEquationConfig.staticValue = staticEq;
6961 config.colorBlendEquationConfig.dynamicValue = dynamicEq;
6962 config.referenceColor.reset (new SingleColorGenerator(dualSrcCases[dynamicPick].expectedColor));
6966 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "color_blend_dual_index_" + indexStr, config));
6972 TestConfig config (pipelineConstructionType, kOrdering, kUseMeshShaders);
6975 config.colorBlendEquationConfig.staticValue = ColorBlendEq(vk::VK_BLEND_FACTOR_ZERO,
6983 config.colorBlendEquationConfig.dynamicValue = ColorBlendEq(vk::VK_BLEND_FACTOR_ONE,
6990 config.colorBlendEnableConfig.staticValue = false;
6991 config.colorBlendEnableConfig.dynamicValue = true;
6993 config.colorWriteMaskConfig.staticValue = ( 0 | 0 | 0 | 0);
6994 config.colorWriteMaskConfig.dynamicValue = (CR | CG | CB | CA);
6996 config.nullStaticColorBlendAttPtr = true; // What this test is about.
7000 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, testName, config));
7011 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7012 config.topologyConfig.staticValue = vk::VK_PRIMITIVE_TOPOLOGY_LINE_STRIP;
7013 config.extraLineRestarts = true;
7014 config.primRestartEnableConfig.staticValue = false;
7015 config.primRestartEnableConfig.dynamicValue = tcu::just(true);
7016 config.bindUnusedMeshShadingPipeline = bindUnusedCase.bindUnusedMeshShadingPipeline;
7017 config.referenceColor.reset (new CenterStripGenerator(kDefaultTriangleColor, kDefaultClearColor));
7019 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, std::string("prim_restart_enable") + bindUnusedCase.nameSuffix, config));
7031 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7032 config.topologyConfig.staticValue = vk::VK_PRIMITIVE_TOPOLOGY_PATCH_LIST;
7033 config.patchControlPointsConfig.staticValue = 1;
7034 config.patchControlPointsConfig.dynamicValue = 3;
7035 config.bindUnusedMeshShadingPipeline = bindUnusedCase.bindUnusedMeshShadingPipeline;
7037 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "patch_control_points" + bindUnusedCase.nameSuffix, config));
7041 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7042 config.topologyConfig.staticValue = vk::VK_PRIMITIVE_TOPOLOGY_PATCH_LIST;
7043 config.patchControlPointsConfig.staticValue = 1;
7044 config.patchControlPointsConfig.dynamicValue = 3;
7045 config.useExtraDynPCPPipeline = true;
7049 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, testName, config));
7057 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7058 config.topologyConfig.staticValue = vk::VK_PRIMITIVE_TOPOLOGY_PATCH_LIST;
7059 config.patchControlPointsConfig.staticValue = 3;
7060 config.tessDomainOriginConfig.staticValue = vk::VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT;
7061 config.tessDomainOriginConfig.dynamicValue = vk::VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT;
7062 config.cullModeConfig.staticValue = vk::VK_CULL_MODE_BACK_BIT;
7065 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "tess_domain_origin_lower_left", config));
7068 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7069 config.topologyConfig.staticValue = vk::VK_PRIMITIVE_TOPOLOGY_PATCH_LIST;
7070 config.patchControlPointsConfig.staticValue = 3;
7071 config.tessDomainOriginConfig.staticValue = vk::VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT;
7072 config.tessDomainOriginConfig.dynamicValue = vk::VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT;
7073 config.cullModeConfig.staticValue = vk::VK_CULL_MODE_FRONT_BIT;
7076 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "tess_domain_origin_upper_left", config));
7109 TestConfig config(baseConfig);
7110 config.forceGeometryShader = forceGeometryShader;
7111 config.topologyConfig.staticValue = kTopologyCase.staticVal;
7112 config.topologyConfig.dynamicValue = tcu::just<vk::VkPrimitiveTopology>(kTopologyCase.dynamicVal);
7113 config.primRestartEnableConfig.staticValue = (topologyClass == TopologyClass::LINE);
7114 config.patchControlPointsConfig.staticValue = (config.needsTessellation() ? 3u : 1u);
7115 config.bindUnusedMeshShadingPipeline = bindUnusedCase.bindUnusedMeshShadingPipeline;
7120 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, name, config));
7128 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7130 config.primRestartEnableConfig.staticValue = true;
7131 config.topologyConfig.staticValue = vk::VK_PRIMITIVE_TOPOLOGY_LINE_STRIP;
7132 config.lineStippleEnableConfig.staticValue = true;
7133 config.lineStippleEnableConfig.dynamicValue = false;
7134 config.lineStippleParamsConfig.staticValue = LineStippleParams{1u, 0x5555u};
7137 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "line_stipple_disable", config));
7139 config.lineStippleEnableConfig.swapValues();
7140 config.referenceColor.reset(new VerticalStripesGenerator(kDefaultTriangleColor, kDefaultClearColor, 1u));
7143 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "line_stipple_enable", config));
7148 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7150 config.primRestartEnableConfig.staticValue = true;
7151 config.topologyConfig.staticValue = vk::VK_PRIMITIVE_TOPOLOGY_LINE_STRIP;
7152 config.lineStippleEnableConfig.staticValue = true;
7153 config.lineStippleParamsConfig.staticValue = LineStippleParams{1u, 0x5555u};
7154 config.lineStippleParamsConfig.dynamicValue = LineStippleParams{2u, 0x3333u};
7155 config.referenceColor.reset (new VerticalStripesGenerator(kDefaultTriangleColor, kDefaultClearColor, 4u));
7158 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "line_stipple_params", config));
7163 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7165 config.topologyConfig.staticValue = vk::VK_PRIMITIVE_TOPOLOGY_LINE_STRIP;
7166 config.obliqueLine = true;
7167 config.colorVerificator = verifyTopLeftCornerExactly;
7168 config.lineStippleEnableConfig.staticValue = false;
7169 config.lineStippleParamsConfig.staticValue = LineStippleParams{0u, 0u};
7170 config.lineRasterModeConfig.staticValue = LineRasterizationMode::RECTANGULAR;
7171 config.lineRasterModeConfig.dynamicValue = LineRasterizationMode::BRESENHAM;
7174 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "line_raster_mode_bresenham", config));
7176 config.lineRasterModeConfig.swapValues();
7177 config.referenceColor.reset(new SingleColorGenerator(kDefaultClearColor));
7179 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "line_raster_mode_rectangular", config));
7182 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7184 config.topologyConfig.staticValue = vk::VK_PRIMITIVE_TOPOLOGY_LINE_STRIP;
7185 config.obliqueLine = true;
7186 config.colorVerificator = verifyTopLeftCornerWithPartialAlpha;
7187 config.lineStippleEnableConfig.staticValue = false;
7188 config.lineStippleParamsConfig.staticValue = LineStippleParams{0u, 0u};
7189 config.lineRasterModeConfig.staticValue = LineRasterizationMode::BRESENHAM;
7190 config.lineRasterModeConfig.dynamicValue = LineRasterizationMode::SMOOTH;
7193 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "line_raster_mode_smooth", config));
7198 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7200 config.scissorConfig.staticValue = ScissorVec{vk::makeRect2D(0, 0, kHalfWidthU, kFramebufferHeight), vk::makeRect2D(kHalfWidthI, 0, kHalfWidthU, kFramebufferHeight)};
7201 config.viewportConfig.staticValue = ViewportVec(1u, vk::makeViewport(kHalfWidthU, kFramebufferHeight));
7202 config.viewportConfig.dynamicValue = ViewportVec{
7207 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "2_viewports", config));
7210 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7212 config.viewportConfig.staticValue = ViewportVec(1u, vk::makeViewport(kHalfWidthU, kFramebufferHeight));
7213 config.viewportConfig.staticValue = ViewportVec(1u, vk::makeViewport(kFramebufferWidth, kFramebufferHeight));
7215 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "1_full_viewport", config));
7218 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7220 config.scissorConfig.staticValue = ScissorVec{vk::makeRect2D(0, 0, kHalfWidthU, kFramebufferHeight), vk::makeRect2D(kHalfWidthI, 0, kHalfWidthU, kFramebufferHeight)};
7221 config.viewportConfig.staticValue = ViewportVec{
7225 config.viewportConfig.dynamicValue = ViewportVec{config.viewportConfig.staticValue.back(), config.viewportConfig.staticValue.front()};
7227 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "2_viewports_switch", config));
7230 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7232 config.scissorConfig.staticValue = ScissorVec{vk::makeRect2D(0, 0, kHalfWidthU, kFramebufferHeight), vk::makeRect2D(kHalfWidthI, 0, kHalfWidthU, kFramebufferHeight)};
7233 config.viewportConfig.staticValue = ViewportVec{
7237 config.viewportConfig.dynamicValue = ViewportVec{config.viewportConfig.staticValue.back(), config.viewportConfig.staticValue.front()};
7238 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
7240 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "2_viewports_switch_clean", config));
7245 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7247 config.viewportConfig.staticValue = ViewportVec{
7251 config.scissorConfig.staticValue = ScissorVec(1u, vk::makeRect2D(kHalfWidthI, 0, kHalfWidthU, kFramebufferHeight));
7252 config.scissorConfig.dynamicValue = ScissorVec{
7257 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "2_scissors", config));
7260 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7262 config.scissorConfig.staticValue = ScissorVec(1u, vk::makeRect2D(kHalfWidthI, 0, kHalfWidthU, kFramebufferHeight));
7263 config.scissorConfig.dynamicValue = ScissorVec(1u, vk::makeRect2D(kFramebufferWidth, kFramebufferHeight));
7265 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "1_full_scissor", config));
7268 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7270 config.viewportConfig.staticValue = ViewportVec{
7274 config.scissorConfig.staticValue = ScissorVec{
7278 config.scissorConfig.dynamicValue = ScissorVec{config.scissorConfig.staticValue.back(), config.scissorConfig.staticValue.front()};
7280 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "2_scissors_switch", config));
7283 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7285 config.viewportConfig.staticValue = ViewportVec{
7289 config.scissorConfig.staticValue = ScissorVec{
7293 config.scissorConfig.dynamicValue = ScissorVec{config.scissorConfig.staticValue.back(), config.scissorConfig.staticValue.front()};
7294 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
7296 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "2_scissors_switch_clean", config));
7336 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders, factory);
7337 config.strideConfig.staticValue = halfStrides;
7338 config.strideConfig.dynamicValue = vertexStrides;
7339 config.bindUnusedMeshShadingPipeline = bindUnusedCase.bindUnusedMeshShadingPipeline;
7341 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, prefix + bindUnusedCase.nameSuffix, config));
7344 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders, factory);
7345 config.strideConfig.staticValue = halfStrides;
7346 config.strideConfig.dynamicValue = vertexStrides;
7347 config.vertexDataOffset = vertexStrides[0];
7348 config.bindUnusedMeshShadingPipeline = bindUnusedCase.bindUnusedMeshShadingPipeline;
7350 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, prefix + "_with_offset" + bindUnusedCase.nameSuffix, config));
7353 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders, factory);
7354 config.strideConfig.staticValue = halfStrides;
7355 config.strideConfig.dynamicValue = vertexStrides;
7356 config.vertexDataOffset = vertexStrides[0];
7357 config.vertexDataExtraBytes = config.vertexDataOffset;
7358 config.bindUnusedMeshShadingPipeline = bindUnusedCase.bindUnusedMeshShadingPipeline;
7361 config.referenceColor.reset (new HorizontalSplitGenerator(kDefaultTriangleColor, kDefaultClearColor));
7362 config.meshParams[0].scaleY = 0.5f;
7363 config.meshParams[0].offsetY = -0.5f;
7366 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, prefix + "_with_offset_and_padding" + bindUnusedCase.nameSuffix, config));
7377 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders, getVertexWithExtraAttributesGenerator());
7378 config.strideConfig.staticValue = config.getActiveVertexGenerator()->getVertexDataStrides();
7379 config.strideConfig.dynamicValue = { 0 };
7380 config.vertexDataOffset = 4;
7381 config.singleVertex = true;
7382 config.singleVertexDrawCount = 6;
7386 config.referenceColor.reset (new HorizontalSplitGenerator(kDefaultTriangleColor, kDefaultClearColor));
7387 config.meshParams[0].scaleY = 0.5f;
7388 config.meshParams[0].offsetY = -0.5f;
7391 config.meshParams[0].stripScale = 1.0f;
7394 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "zero_stride_with_offset", config));
7400 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7401 config.depthTestEnableConfig.staticValue = false;
7402 config.depthTestEnableConfig.dynamicValue = tcu::just(true);
7404 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
7406 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_test_enable", config));
7409 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7410 config.depthTestEnableConfig.staticValue = true;
7411 config.depthTestEnableConfig.dynamicValue = tcu::just(false);
7413 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_test_disable", config));
7418 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7421 config.depthTestEnableConfig.staticValue = true;
7422 config.depthCompareOpConfig.staticValue = vk::VK_COMPARE_OP_LESS;
7423 config.clearDepthValue = 0.5f;
7424 config.meshParams[0].depth = 0.25f;
7427 config.depthWriteEnableConfig.staticValue = false;
7428 config.depthWriteEnableConfig.dynamicValue = tcu::just(true);
7429 config.expectedDepth = 0.25f;
7432 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_write_enable", config));
7435 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7438 config.depthTestEnableConfig.staticValue = true;
7439 config.depthCompareOpConfig.staticValue = vk::VK_COMPARE_OP_LESS;
7440 config.clearDepthValue = 0.5f;
7441 config.meshParams[0].depth = 0.25f;
7444 config.depthWriteEnableConfig.staticValue = true;
7445 config.depthWriteEnableConfig.dynamicValue = tcu::just(false);
7446 config.expectedDepth = 0.5f;
7449 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_write_disable", config));
7456 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7458 config.meshParams[0].depth = 1.5f;
7459 config.clearDepthValue = 0.625f;
7460 config.depthTestEnableConfig.staticValue = true;
7461 config.depthWriteEnableConfig.staticValue = true;
7462 config.depthCompareOpConfig.staticValue = vk::VK_COMPARE_OP_LESS;
7463 config.viewportConfig.staticValue = ViewportVec(1u, vk::makeViewport(0.0f, 0.0f, kWidthF, kHeightF, 0.0f, 0.5f));
7464 config.expectedDepth = 0.5f;
7466 config.depthClampEnableConfig.staticValue = false;
7467 config.depthClampEnableConfig.dynamicValue = true;
7470 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_clamp_enable", config));
7474 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7476 config.meshParams[0].depth = 1.5f;
7477 config.clearDepthValue = 0.625f;
7478 config.depthTestEnableConfig.staticValue = true;
7479 config.depthWriteEnableConfig.staticValue = true;
7480 config.depthCompareOpConfig.staticValue = vk::VK_COMPARE_OP_LESS;
7481 config.viewportConfig.staticValue = ViewportVec(1u, vk::makeViewport(0.0f, 0.0f, kWidthF, kHeightF, 0.0f, 0.5f));
7482 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
7483 config.expectedDepth = 0.625f;
7485 config.depthClampEnableConfig.staticValue = true;
7486 config.depthClampEnableConfig.dynamicValue = false;
7489 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_clamp_disable", config));
7503 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7505 config.meshParams[0].depth = -0.5f;
7506 config.clearDepthValue = 1.0f;
7507 config.depthTestEnableConfig.staticValue = true;
7508 config.depthWriteEnableConfig.staticValue = true;
7509 config.depthCompareOpConfig.staticValue = vk::VK_COMPARE_OP_ALWAYS;
7510 config.viewportConfig.staticValue = ViewportVec(1u, vk::makeViewport(0.0f, 0.0f, kWidthF, kHeightF, 0.5f, 1.0f));
7511 config.expectedDepth = 0.5f; // Geometry will be clamped to this value.
7513 config.depthClampEnableConfig.staticValue = false;
7514 config.depthClampEnableConfig.dynamicValue = true;
7517 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_clamp_enable_no_clip", config));
7520 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7522 config.meshParams[0].depth = -0.5f;
7523 config.clearDepthValue = 1.0f;
7524 config.depthTestEnableConfig.staticValue = true;
7525 config.depthWriteEnableConfig.staticValue = true;
7526 config.depthCompareOpConfig.staticValue = vk::VK_COMPARE_OP_ALWAYS;
7527 config.viewportConfig.staticValue = ViewportVec(1u, vk::makeViewport(0.0f, 0.0f, kWidthF, kHeightF, 0.5f, 1.0f));
7528 config.expectedDepth = 1.0f; // Geometry should be clipped in this case.
7529 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
7532 config.depthClampEnableConfig.staticValue = false;
7533 config.depthClampEnableConfig.dynamicValue = true;
7534 config.depthClipEnableConfig.staticValue = OptBoolean(true);
7537 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_clamp_enable_with_clip", config));
7540 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7542 config.meshParams[0].depth = -0.5f;
7543 config.clearDepthValue = 1.0f;
7544 config.depthTestEnableConfig.staticValue = true;
7545 config.depthWriteEnableConfig.staticValue = true;
7546 config.depthCompareOpConfig.staticValue = vk::VK_COMPARE_OP_ALWAYS;
7547 config.viewportConfig.staticValue = ViewportVec(1u, vk::makeViewport(0.0f, 0.0f, kWidthF, kHeightF, 0.5f, 1.0f));
7548 config.expectedDepth = 1.0f; // Geometry should be clipped in this case.
7549 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
7551 config.depthClampEnableConfig.staticValue = true;
7552 config.depthClampEnableConfig.dynamicValue = false;
7554 config.depthClipEnableConfig.staticValue = OptBoolean(true);
7557 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_clamp_disable_with_clip", config));
7566 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7568 config.polygonModeConfig.staticValue = vk::VK_POLYGON_MODE_FILL;
7569 config.polygonModeConfig.dynamicValue = vk::VK_POLYGON_MODE_POINT;
7570 config.oversizedTriangle = true;
7571 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
7574 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "polygon_mode_point", config));
7577 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7579 config.polygonModeConfig.staticValue = vk::VK_POLYGON_MODE_POINT;
7580 config.polygonModeConfig.dynamicValue = vk::VK_POLYGON_MODE_FILL;
7581 config.oversizedTriangle = true;
7584 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "polygon_mode_fill", config));
7597 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7600 if (!config.useStaticPipeline())
7602 config.rasterizationSamplesConfig.staticValue = inactiveSampleCount;
7603 config.rasterizationSamplesConfig.dynamicValue = activeSampleCount;
7605 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, namePrefix + "rasterization_samples", config));
7611 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7612 config.rasterizationSamplesConfig = activeSampleCount;
7613 config.sampleMaskConfig.staticValue = SampleMaskVec(1u, 0u);
7614 config.sampleMaskConfig.dynamicValue = SampleMaskVec(1u, 0xFFu);
7617 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, namePrefix + "sample_mask_enable", config));
7620 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7621 config.rasterizationSamplesConfig = activeSampleCount;
7622 config.sampleMaskConfig.staticValue = SampleMaskVec(1u, 0xFFu);
7623 config.sampleMaskConfig.dynamicValue = SampleMaskVec(1u, 0u);
7624 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
7627 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, namePrefix + "sample_mask_disable", config));
7632 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7634 config.rasterizationSamplesConfig = activeSampleCount;
7635 config.meshParams[0].color = kTransparentColor;
7636 config.alphaToCoverageConfig.staticValue = false;
7637 config.alphaToCoverageConfig.dynamicValue = true;
7638 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
7641 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, namePrefix + "alpha_to_coverage_enable", config));
7644 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7646 config.rasterizationSamplesConfig = activeSampleCount;
7647 config.meshParams[0].color = kTransparentColor;
7648 config.alphaToCoverageConfig.staticValue = true;
7649 config.alphaToCoverageConfig.dynamicValue = false;
7650 config.referenceColor.reset (new SingleColorGenerator(kTransparentColor));
7653 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, namePrefix + "alpha_to_coverage_disable", config));
7658 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7660 config.rasterizationSamplesConfig = activeSampleCount;
7661 config.meshParams[0].color = kTransparentColor;
7662 config.alphaToOneConfig.staticValue = false;
7663 config.alphaToOneConfig.dynamicValue = true;
7664 config.referenceColor.reset (new SingleColorGenerator(kDefaultTriangleColor));
7667 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, namePrefix + "alpha_to_one_enable", config));
7670 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7672 config.rasterizationSamplesConfig = activeSampleCount;
7673 config.meshParams[0].color = kTransparentColor;
7674 config.alphaToOneConfig.staticValue = true;
7675 config.alphaToOneConfig.dynamicValue = false;
7676 config.referenceColor.reset (new SingleColorGenerator(kTransparentColor));
7679 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, namePrefix + "alpha_to_one_disable", config));
7685 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7692 config.dynamicSampleMaskCount = tcu::just(kMultiSampleCount);
7693 config.sampleMaskConfig.staticValue = SampleMaskVec(1u, 0u);
7694 config.sampleMaskConfig.dynamicValue = SampleMaskVec(1u, 0xFFu);
7695 config.offCenterTriangle = true;
7696 config.offCenterProportion = tcu::Vec2(0.0f, 0.75f);
7697 config.referenceColor.reset (new TopLeftBorderGenerator(kDefaultTriangleColor, kDefaultTriangleColor, kDefaultClearColor, kDefaultClearColor));
7700 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "sample_mask_count", config));
7706 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7711 if (!config.useStaticPipeline())
7713 config.rasterizationSamplesConfig.staticValue = kLargeRasterizationSampleCount;
7714 config.rasterizationSamplesConfig.dynamicValue = kMultiSampleCount;
7715 config.sampleMaskConfig.staticValue = SampleMaskVec{ 0xFFFFFFF0u, 0xFFFFFFFFu }; // Last 4 bits off.
7716 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
7719 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "large_static_rasterization_samples_off", config));
7721 config.sampleMaskConfig.staticValue = SampleMaskVec{ 0xFu, 0u }; // Last 4 bits on.
7722 config.referenceColor.reset (new SingleColorGenerator(kDefaultTriangleColor));
7725 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "large_static_rasterization_samples_on", config));
7751 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7753 config.clearColorValue = vk::makeClearValueColor(kTransparentClearColor);
7754 config.meshParams[0].color = kOpaqueWhite;
7755 config.colorWriteMaskConfig.staticValue = colorCompCase.staticVal;
7756 config.colorWriteMaskConfig.dynamicValue = colorCompCase.dynamicVal;
7757 config.referenceColor.reset (new SingleColorGenerator(filterColor(kTransparentClearColor, kOpaqueWhite, colorCompCase.dynamicVal)));
7763 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, testName, config));
7797 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7799 config.rasterizationStreamConfig.staticValue = rastStreamCase.staticVal;
7800 config.rasterizationStreamConfig.dynamicValue = rastStreamCase.dynamicVal;
7801 config.shaderRasterizationStream = rastStreamCase.shaderStream;
7802 config.referenceColor.reset (new SingleColorGenerator(rastStreamCase.expectDraw ? kDefaultTriangleColor : kDefaultClearColor));
7807 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, testName, config));
7836 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders, getProvokingVertexWithPaddingGenerator(provokingVtxCase.dynamicVal.get()));
7837 config.provokingVertexConfig.staticValue = provokingVtxCase.staticVal;
7838 config.provokingVertexConfig.dynamicValue = provokingVtxCase.dynamicVal;
7839 config.oversizedTriangle = true;
7841 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, provokingVtxCase.name, config));
7870 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7871 config.negativeOneToOneConfig.staticValue = negOneToOneCase.staticVal;
7872 config.negativeOneToOneConfig.dynamicValue = negOneToOneCase.dynamicVal;
7875 config.depthTestEnableConfig.staticValue = true;
7876 config.depthWriteEnableConfig.staticValue = true;
7877 config.depthCompareOpConfig.staticValue = vk::VK_COMPARE_OP_LESS;
7878 config.meshParams[0].depth = 0.5f;
7879 config.expectedDepth = (config.getActiveNegativeOneToOneValue() ? 0.75f : 0.5f);
7881 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, negOneToOneCase.name, config));
7910 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7911 config.depthClipEnableConfig.staticValue = depthClipEnableCase.staticVal;
7912 config.depthClipEnableConfig.dynamicValue = depthClipEnableCase.dynamicVal;
7914 const bool depthClipActive = config.getActiveDepthClipEnable();
7917 config.depthTestEnableConfig.staticValue = true;
7918 config.depthWriteEnableConfig.staticValue = true;
7919 config.depthCompareOpConfig.staticValue = vk::VK_COMPARE_OP_LESS;
7920 config.meshParams[0].depth = -0.5f;
7921 config.viewportConfig.staticValue = ViewportVec(1u, vk::makeViewport(0.0f, 0.0f, kWidthF, kHeightF, 0.5f, 1.0f));
7922 config.expectedDepth = (depthClipActive ? 1.0f : 0.25f);
7923 config.referenceColor.reset (new SingleColorGenerator(depthClipActive ? kDefaultClearColor : kDefaultTriangleColor));
7925 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, depthClipEnableCase.name, config));
7931 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7932 config.rasterizationSamplesConfig = kMultiSampleCount;
7933 config.offCenterTriangle = true;
7934 config.offCenterProportion = tcu::Vec2(0.90625f, 0.90625f);
7937 config.sampleLocations = tcu::Vec2(1.0f, 1.0f);
7939 config.sampleLocationsEnableConfig.staticValue = false;
7940 config.sampleLocationsEnableConfig.dynamicValue = true;
7943 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "sample_locations_enable", config));
7945 config.sampleLocationsEnableConfig.swapValues();
7946 config.referenceColor.reset(new TopLeftBorderGenerator(kDefaultTriangleColor, kDefaultClearColor, kDefaultClearColor, kDefaultClearColor));
7949 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "sample_locations_disable", config));
7963 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7965 config.oversizedTriangle = true; // This avoids partial coverages in fragments.
7966 config.rasterizationSamplesConfig = (multisample ? kMultiSampleCount : kSingleSampleCount);
7967 config.coverageToColorEnableConfig.staticValue = !covToColor;
7968 config.coverageToColorEnableConfig.dynamicValue = covToColor;
7969 config.meshParams[0].color = tcu::Vec4(48.0f, 0.0f, 0.0f, 1.0f); // Distinct value, does not match any coverage mask.
7970 config.referenceColor.reset (new SingleColorGenerator(tcu::UVec4(referenceRed, 0u, 0u, 1u)));
7975 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, testName, config));
7993 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
7995 config.oversizedTriangle = true; // This avoids partial coverages in fragments.
7996 config.rasterizationSamplesConfig = (multisample ? kMultiSampleCount : kSingleSampleCount);
7997 config.colorAttachmentCount = colorAttCount;
7998 config.coverageToColorEnableConfig.staticValue = true;
7999 config.coverageToColorLocationConfig.staticValue = (locationLast ? 0u : colorAttCount - 1u);
8000 config.coverageToColorLocationConfig.dynamicValue = covToColorLoc;
8001 config.meshParams[0].color = tcu::Vec4(48.0f, 0.0f, 0.0f, 1.0f); // Distinct value, does not match any coverage mask.
8002 config.referenceColor.reset (new SingleColorGenerator(tcu::UVec4(referenceRed, 0u, 0u, 1u)));
8007 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, testName, config));
8031 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
8033 config.coverageModulation = true;
8034 config.rasterizationSamplesConfig = kMultiSampleCount;
8035 config.colorSampleCount = kSingleSampleCount;
8041 config.offCenterProportion = tcu::Vec2(0.6875f, 0.6875f);
8042 config.offCenterTriangle = true;
8044 config.coverageModulationModeConfig.staticValue = modulationModeCase.staticVal;
8045 config.coverageModulationModeConfig.dynamicValue = modulationModeCase.dynamicVal;
8048 config.referenceColor.reset(new TopLeftBorderGenerator(kDefaultTriangleColor, partialCoverageColor, kDefaultClearColor, partialCoverageColor));
8052 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, testName, config));
8058 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
8060 config.coverageModulation = true;
8061 config.rasterizationSamplesConfig = kMultiSampleCount;
8062 config.colorSampleCount = kSingleSampleCount;
8068 config.offCenterProportion = tcu::Vec2(0.6875f, 0.6875f);
8069 config.offCenterTriangle = true;
8072 config.coverageModulationModeConfig.staticValue = vk::VK_COVERAGE_MODULATION_MODE_RGB_NV;
8073 config.coverageModTableConfig.staticValue = table;
8075 config.coverageModTableEnableConfig.staticValue = false;
8076 config.coverageModTableEnableConfig.dynamicValue = true;
8081 config.referenceColor.reset(new TopLeftBorderGenerator(kDefaultTriangleColor, tablePartialCoverageColor, kDefaultClearColor, tablePartialCoverageColor));
8084 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "coverage_modulation_table_enable", config));
8087 config.coverageModTableEnableConfig.swapValues();
8090 config.referenceColor.reset (new TopLeftBorderGenerator(kDefaultTriangleColor, noTablePartialCoverageColor, kDefaultClearColor, noTablePartialCoverageColor));
8093 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "coverage_modulation_table_disable", config));
8098 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
8100 config.coverageModulation = true;
8101 config.rasterizationSamplesConfig = kMultiSampleCount;
8102 config.colorSampleCount = kSingleSampleCount;
8108 config.offCenterProportion = tcu::Vec2(0.5f, 0.5f);
8109 config.offCenterTriangle = true;
8111 config.coverageModulationModeConfig.staticValue = vk::VK_COVERAGE_MODULATION_MODE_RGB_NV;
8112 config.coverageModTableEnableConfig.staticValue = true;
8118 config.coverageModTableConfig.staticValue = badTable;
8119 config.coverageModTableConfig.dynamicValue = goodTable;
8130 config.referenceColor.reset(new TopLeftBorderGenerator(mainColor, borderColor, cornerColor, borderColor));
8133 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "coverage_modulation_table_change", config));
8138 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
8140 config.coverageReduction = true;
8141 config.rasterizationSamplesConfig = kMultiSampleCount;
8142 config.colorSampleCount = kSingleSampleCount;
8148 config.offCenterProportion = tcu::Vec2(0.6875f, 0.6875f);
8149 config.offCenterTriangle = true;
8151 config.coverageReductionModeConfig.staticValue = vk::VK_COVERAGE_REDUCTION_MODE_MERGE_NV;
8152 config.coverageReductionModeConfig.dynamicValue = vk::VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV;
8154 config.referenceColor.reset(new TopLeftBorderGenerator(kDefaultTriangleColor, kDefaultClearColor, kDefaultClearColor, kDefaultClearColor));
8156 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "coverage_reduction_truncate", config));
8167 config.coverageReductionModeConfig.swapValues();
8168 config.referenceColor.reset(new TopLeftBorderGenerator(kDefaultTriangleColor, kDefaultTriangleColor, kDefaultClearColor, kDefaultTriangleColor));
8170 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "coverage_reduction_merge", config));
8175 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
8177 config.viewportSwizzle = true;
8178 config.oversizedTriangle = true;
8179 config.cullModeConfig.staticValue = vk::VK_CULL_MODE_BACK_BIT;
8197 config.viewportSwizzleConfig.staticValue = ViewportSwzVec(1u, idSwizzle);
8198 config.viewportSwizzleConfig.dynamicValue = ViewportSwzVec(1u, yxSwizzle);
8199 config.frontFaceConfig.staticValue = vk::VK_FRONT_FACE_CLOCKWISE;
8202 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "viewport_swizzle_yx", config));
8204 config.viewportSwizzleConfig.swapValues();
8205 config.frontFaceConfig.staticValue = vk::VK_FRONT_FACE_COUNTER_CLOCKWISE;
8207 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "viewport_swizzle_xy", config));
8214 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
8221 config.shadingRateImage = true;
8222 config.shadingRateImageEnableConfig.staticValue = !sriEnable;
8223 config.shadingRateImageEnableConfig.dynamicValue = sriEnable;
8224 config.referenceColor.reset(new SingleColorGenerator(sriEnable ? kDefaultClearColor : kDefaultTriangleColor));
8226 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "shading_rate_image_" + enableStr, config));
8232 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
8239 config.colorVerificator = verifyTopLeftCornerExactly;
8240 config.viewportWScaling = true;
8241 config.viewportWScalingEnableConfig.staticValue = !wScalingEnable;
8242 config.viewportWScalingEnableConfig.dynamicValue = wScalingEnable;
8243 config.referenceColor.reset(new SingleColorGenerator(wScalingEnable ? kDefaultClearColor : kDefaultTriangleColor));
8245 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "viewport_w_scaling_" + enableStr, config));
8251 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
8258 config.depthTestEnableConfig.staticValue = true;
8259 config.depthCompareOpConfig.staticValue = vk::VK_COMPARE_OP_LESS;
8260 config.colorWriteMaskConfig.staticValue = 0u; // Disable color writes.
8261 config.oversizedTriangle = true;
8262 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
8264 config.representativeFragmentTest = true;
8265 config.reprFragTestEnableConfig.staticValue = !reprFragTestEnable;
8266 config.reprFragTestEnableConfig.dynamicValue = reprFragTestEnable;
8268 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "repr_frag_test_" + enableStr, config));
8275 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
8276 config.offCenterTriangle = true;
8279 config.offCenterProportion = tcu::Vec2(0.75f, 0.75f);
8280 config.extraPrimitiveOverEstConfig.staticValue = 0.0f;
8281 config.conservativeRasterModeConfig.staticValue = vk::VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT;
8282 config.conservativeRasterModeConfig.dynamicValue = vk::VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT;
8285 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "conservative_rasterization_mode_overestimate", config));
8287 config.conservativeRasterModeConfig.swapValues();
8288 config.referenceColor.reset(new TopLeftBorderGenerator(kDefaultTriangleColor, kDefaultClearColor, kDefaultClearColor, kDefaultClearColor));
8290 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "conservative_rasterization_mode_disabled", config));
8293 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
8294 config.offCenterTriangle = true;
8297 config.offCenterProportion = tcu::Vec2(0.25f, 0.25f);
8298 config.extraPrimitiveOverEstConfig.staticValue = 0.0f;
8299 config.conservativeRasterModeConfig.staticValue = vk::VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT;
8300 config.conservativeRasterModeConfig.dynamicValue = vk::VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT;
8301 config.referenceColor.reset (new TopLeftBorderGenerator(kDefaultTriangleColor, kDefaultClearColor, kDefaultClearColor, kDefaultClearColor));
8304 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "conservative_rasterization_mode_underestimate", config));
8313 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
8314 config.offCenterTriangle = true;
8317 config.offCenterProportion = tcu::Vec2(1.125f, 1.125f);
8318 config.maxPrimitiveOverestimationSize = 0.5f; // Otherwise the base overestimation size will be enough. This should never trigger.
8319 config.conservativeRasterModeConfig.staticValue = vk::VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT;
8320 config.extraPrimitiveOverEstConfig.staticValue = 0.0f;
8321 config.extraPrimitiveOverEstConfig.dynamicValue = 0.75f; // Large enough to reach the center of the border pixel.
8324 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "extra_overestimation_size_large", config));
8326 config.extraPrimitiveOverEstConfig.swapValues();
8327 config.referenceColor.reset(new TopLeftBorderGenerator(kDefaultTriangleColor, kDefaultClearColor, kDefaultClearColor, kDefaultClearColor));
8330 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "extra_overestimation_size_none", config));
8342 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
8345 config.depthTestEnableConfig.staticValue = true;
8346 config.depthWriteEnableConfig.staticValue = true;
8347 config.depthCompareOpConfig.staticValue = vk::VK_COMPARE_OP_ALWAYS;
8349 config.clearDepthValue = 0.25f;
8351 config.meshParams[0].depth = 0.5f;
8356 config.depthBiasConfig.staticValue = kNoDepthBiasParams;
8357 config.depthBiasConfig.dynamicValue = kAlternativeDepthBiasParams;
8361 config.depthBiasConfig.staticValue = kAlternativeDepthBiasParams;
8364 config.depthBiasEnableConfig.staticValue = false;
8365 config.depthBiasEnableConfig.dynamicValue = tcu::just(true);
8366 config.expectedDepth = 0.75f;
8375 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, caseName, config));
8378 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
8381 config.depthTestEnableConfig.staticValue = true;
8382 config.depthWriteEnableConfig.staticValue = true;
8383 config.depthCompareOpConfig.staticValue = vk::VK_COMPARE_OP_ALWAYS;
8385 config.clearDepthValue = 0.25f;
8387 config.meshParams[0].depth = 0.5f;
8392 config.depthBiasConfig.staticValue = kNoDepthBiasParams;
8393 config.depthBiasConfig.dynamicValue = kAlternativeDepthBiasParams;
8397 config.depthBiasConfig.staticValue = kAlternativeDepthBiasParams;
8400 config.depthBiasEnableConfig.staticValue = true;
8401 config.depthBiasEnableConfig.dynamicValue = tcu::just(false);
8402 config.expectedDepth = 0.5f;
8411 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, caseName, config));
8419 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
8422 config.depthTestEnableConfig.staticValue = true;
8423 config.depthWriteEnableConfig.staticValue = true;
8424 config.depthCompareOpConfig.staticValue = vk::VK_COMPARE_OP_ALWAYS;
8425 config.clearDepthValue = 0.0f;
8426 config.meshParams[0].depth = 0.125f;
8428 config.expectedDepth = 0.625f; // mesh depth + target bias
8433 config.depthBiasReprInfo = depthBiasReprInfo;
8434 config.neededDepthChannelClass = tcu::TEXTURECHANNELCLASS_FLOATING_POINT;
8448 config.depthBiasEnableConfig.staticValue = true;
8449 config.depthBiasConfig.staticValue = kNoDepthBiasParams;
8450 config.depthBiasConfig.dynamicValue = kPositiveBias;
8451 config.extraDepthThreshold = static_cast<float>(minR);
8455 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, caseName, config));
8458 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
8461 config.depthTestEnableConfig.staticValue = true;
8462 config.depthWriteEnableConfig.staticValue = true;
8463 config.depthCompareOpConfig.staticValue = vk::VK_COMPARE_OP_ALWAYS;
8464 config.clearDepthValue = 0.25f; // Clear depth buffer to 0.25.
8465 config.meshParams[0].depth = 0.5f; // Set mesh depth to 0.5 as a base.
8472 config.depthBiasReprInfo = depthBiasReprInfo;
8475 config.depthBiasEnableConfig.staticValue = true;
8476 config.depthBiasConfig.staticValue = kNoDepthBiasParams;
8477 config.depthBiasConfig.dynamicValue = kPositiveBias;
8478 config.expectedDepth = 0.75f;
8482 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, caseName, config));
8496 TestConfig config = baseConfig;
8497 config.depthCompareOpConfig.staticValue = vk::VK_COMPARE_OP_ALWAYS;
8498 config.depthCompareOpConfig.dynamicValue = vk::VK_COMPARE_OP_NEVER;
8499 config.meshParams[0].depth = 0.25f;
8500 config.expectedDepth = 0.5f;
8501 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
8503 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_compare_never", config));
8506 TestConfig config = baseConfig;
8507 config.depthCompareOpConfig.dynamicValue = vk::VK_COMPARE_OP_LESS;
8508 config.meshParams[0].depth = 0.25f;
8509 config.expectedDepth = 0.25f;
8511 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_compare_less", config));
8514 TestConfig config = baseConfig;
8515 config.depthCompareOpConfig.dynamicValue = vk::VK_COMPARE_OP_GREATER;
8516 config.meshParams[0].depth = 0.75f;
8517 config.expectedDepth = 0.75f;
8519 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_compare_greater", config));
8522 TestConfig config = baseConfig;
8523 config.depthCompareOpConfig.dynamicValue = vk::VK_COMPARE_OP_EQUAL;
8524 config.meshParams[0].depth = 0.5f;
8525 config.meshParams[0].color = kAlternativeColor;
8527 config.meshParams.push_back(MeshParams(kDefaultTriangleColor, 0.25f));
8528 config.expectedDepth = 0.5f;
8529 config.referenceColor.reset (new SingleColorGenerator(kAlternativeColor));
8531 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_compare_equal", config));
8534 TestConfig config = baseConfig;
8535 config.depthCompareOpConfig.dynamicValue = vk::VK_COMPARE_OP_LESS_OR_EQUAL;
8536 config.meshParams[0].depth = 0.25f;
8537 config.expectedDepth = 0.25f;
8539 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_compare_less_equal_less", config));
8542 TestConfig config = baseConfig;
8543 config.depthCompareOpConfig.dynamicValue = vk::VK_COMPARE_OP_LESS_OR_EQUAL;
8544 config.meshParams[0].depth = 0.5f;
8545 config.expectedDepth = 0.5f;
8547 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_compare_less_equal_equal", config));
8550 TestConfig config = baseConfig;
8551 config.depthCompareOpConfig.dynamicValue = vk::VK_COMPARE_OP_LESS_OR_EQUAL;
8552 config.meshParams[0].depth = 0.25f;
8554 config.meshParams.push_back(MeshParams(kAlternativeColor, 0.25f));
8555 config.expectedDepth = 0.25f;
8556 config.referenceColor.reset (new SingleColorGenerator(kAlternativeColor));
8558 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_compare_less_equal_less_then_equal", config));
8561 TestConfig config = baseConfig;
8562 config.depthCompareOpConfig.dynamicValue = vk::VK_COMPARE_OP_GREATER_OR_EQUAL;
8563 config.meshParams[0].depth = 0.75f;
8564 config.expectedDepth = 0.75f;
8566 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_compare_greater_equal_greater", config));
8569 TestConfig config = baseConfig;
8570 config.depthCompareOpConfig.dynamicValue = vk::VK_COMPARE_OP_GREATER_OR_EQUAL;
8571 config.meshParams[0].depth = 0.5f;
8572 config.expectedDepth = 0.5f;
8574 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_compare_greater_equal_equal", config));
8577 TestConfig config = baseConfig;
8578 config.depthCompareOpConfig.dynamicValue = vk::VK_COMPARE_OP_GREATER_OR_EQUAL;
8579 config.meshParams[0].depth = 0.75f;
8581 config.meshParams.push_back(MeshParams(kAlternativeColor, 0.75f));
8582 config.expectedDepth = 0.75f;
8583 config.referenceColor.reset (new SingleColorGenerator(kAlternativeColor));
8585 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_compare_greater_equal_greater_then_equal", config));
8588 TestConfig config = baseConfig;
8589 config.depthCompareOpConfig.dynamicValue = vk::VK_COMPARE_OP_NOT_EQUAL;
8592 config.meshParams[0].depth = 0.25f;
8594 config.meshParams.push_back(MeshParams(kAlternativeColor, 0.5f));
8596 config.meshParams.push_back(MeshParams(kDefaultTriangleColor, 0.5f));
8598 config.referenceColor.reset (new SingleColorGenerator(kAlternativeColor));
8599 config.expectedDepth = 0.5f;
8601 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_compare_not_equal", config));
8604 TestConfig config = baseConfig;
8605 config.depthCompareOpConfig.dynamicValue = vk::VK_COMPARE_OP_ALWAYS;
8607 config.meshParams[0].depth = 0.5f;
8608 config.expectedDepth = 0.5f;
8610 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_compare_always_equal", config));
8612 config.meshParams[0].depth = 0.25f;
8613 config.expectedDepth = 0.25f;
8615 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_compare_always_less", config));
8617 config.meshParams[0].depth = 0.75f;
8618 config.expectedDepth = 0.75f;
8620 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_compare_always_greater", config));
8631 TestConfig config = baseConfig;
8632 config.depthBoundsTestEnableConfig.staticValue = false;
8633 config.depthBoundsTestEnableConfig.dynamicValue = tcu::just(true);
8634 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
8636 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_bounds_test_enable", config));
8639 TestConfig config = baseConfig;
8640 config.depthBoundsTestEnableConfig.staticValue = true;
8641 config.depthBoundsTestEnableConfig.dynamicValue = tcu::just(false);
8643 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "depth_bounds_test_disable", config));
8649 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
8650 config.stencilTestEnableConfig.staticValue = false;
8651 config.stencilTestEnableConfig.dynamicValue = tcu::just(true);
8652 config.stencilOpConfig.staticValue.front().compareOp = vk::VK_COMPARE_OP_NEVER;
8653 config.referenceColor.reset (new SingleColorGenerator(kDefaultClearColor));
8655 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "stencil_test_enable", config));
8658 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
8659 config.stencilTestEnableConfig.staticValue = true;
8660 config.stencilTestEnableConfig.dynamicValue = tcu::just(false);
8661 config.stencilOpConfig.staticValue.front().compareOp = vk::VK_COMPARE_OP_NEVER;
8663 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "stencil_test_disable", config));
8760 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
8770 config.meshParams[0].reversed = true;
8778 config.meshParams.push_back(config.meshParams.front());
8779 config.meshParams.back().reversed = true;
8782 config.meshParams.front().scaleY = 0.5f;
8783 config.meshParams.front().offsetY = -0.5f;
8786 config.meshParams.back().scaleY = 0.5f;
8787 config.meshParams.back().offsetY = 0.5f;
8791 config.stencilTestEnableConfig.staticValue = true;
8836 auto& staticStencilConfig = config.stencilOpConfig.staticValue.front();
8856 config.stencilOpConfig.dynamicValue = tcu::just(stencilOps);
8857 config.clearStencilValue = clearVal;
8858 config.referenceStencil = refValU32;
8863 config.depthTestEnableConfig.staticValue = true;
8864 config.clearDepthValue = 0.5f;
8865 config.depthCompareOpConfig.staticValue = vk::VK_COMPARE_OP_LESS;
8867 for (auto& meshPar : config.meshParams)
8872 config.referenceColor.reset (new SingleColorGenerator(globalPass ? kDefaultTriangleColor : kDefaultClearColor));
8873 config.expectedDepth = config.clearDepthValue; // No depth writing by default.
8874 config.expectedStencil = stencilResult(op.stencilOp, clearVal, refValU8, kMinVal, kMaxVal);
8876 config.useExtraDynPipeline = useExtraPipeline;
8888 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, testName, config));
8918 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders, staticGen, dynamicGen);
8919 config.strideConfig.staticValue = badStrides;
8920 config.strideConfig.dynamicValue = goodStrides;
8921 config.bindUnusedMeshShadingPipeline = bindUnusedCase.bindUnusedMeshShadingPipeline;
8922 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "vertex_input" + bindUnusedCase.nameSuffix, config));
8934 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders, staticGen);
8935 config.strideConfig.staticValue = badStrides;
8936 config.strideConfig.dynamicValue = goodStrides;
8937 config.bindUnusedMeshShadingPipeline = bindUnusedCase.bindUnusedMeshShadingPipeline;
8938 config.instanceCount = 2u;
8940 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "instance_rate_stride" + bindUnusedCase.nameSuffix, config));
8945 // Variant without mixing in the stride config.
8946 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders, getVertexWithPaddingGenerator(), getVertexWithExtraAttributesGenerator());
8947 config.bindUnusedMeshShadingPipeline = bindUnusedCase.bindUnusedMeshShadingPipeline;
8949 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "vertex_input_no_dyn_stride" + bindUnusedCase.nameSuffix, config));
8954 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders, getVertexWithExtraAttributesGenerator(), getVertexWithMultipleBindingsGenerator());
8955 config.bindUnusedMeshShadingPipeline = bindUnusedCase.bindUnusedMeshShadingPipeline;
8957 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "vertex_input_multiple_bindings" + bindUnusedCase.nameSuffix, config));
8962 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders, getVertexWithPaddingGenerator(), getVertexWithPadding16Generator());
8963 config.bindUnusedMeshShadingPipeline = bindUnusedCase.bindUnusedMeshShadingPipeline;
8965 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "vertex_input_float16" + bindUnusedCase.nameSuffix, config));
8977 TestConfig config(pipelineConstructionType, kOrdering, false, getVertexWithPaddingGenerator(), getVertexWithExtraAttributesGenerator());
8978 config.favorStaticNullPointers = true;
8980 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "null_vertex_input_state", config));
8985 TestConfig config(baseConfig);
8986 config.topologyConfig.staticValue = vk::VK_PRIMITIVE_TOPOLOGY_LINE_LIST;
8987 config.topologyConfig.dynamicValue = vk::VK_PRIMITIVE_TOPOLOGY_LINE_STRIP;
8988 config.extraLineRestarts = true;
8989 config.primRestartEnableConfig.staticValue = false;
8990 config.primRestartEnableConfig.dynamicValue = tcu::just(true);
8991 config.referenceColor.reset (new CenterStripGenerator(kDefaultTriangleColor, kDefaultClearColor));
8993 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "null_input_assembly_state", config));
8998 TestConfig config(baseConfig);
8999 config.topologyConfig.staticValue = vk::VK_PRIMITIVE_TOPOLOGY_PATCH_LIST;
9000 config.patchControlPointsConfig.staticValue = 1;
9001 config.patchControlPointsConfig.dynamicValue = 3;
9003 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "null_tessellation_state", config));
9007 TestConfig config(baseConfig);
9009 config.viewportConfig.staticValue = ViewportVec{
9014 config.scissorConfig.staticValue = ScissorVec{
9019 config.scissorConfig.dynamicValue = ScissorVec{config.scissorConfig.staticValue.back(), config.scissorConfig.staticValue.front()};
9020 config.viewportConfig.dynamicValue = ViewportVec{config.viewportConfig.staticValue.back(), config.viewportConfig.staticValue.front()};
9023 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "null_viewport_state", config));
9027 TestConfig config(baseConfig);
9028 config.depthClampEnableConfig.staticValue = true;
9029 config.depthClampEnableConfig.dynamicValue = false;
9030 config.rastDiscardEnableConfig.staticValue = true;
9031 config.rastDiscardEnableConfig.dynamicValue = false;
9032 config.polygonModeConfig.staticValue = vk::VK_POLYGON_MODE_POINT;
9033 config.polygonModeConfig.dynamicValue = vk::VK_POLYGON_MODE_FILL;
9034 config.cullModeConfig.staticValue = vk::VK_CULL_MODE_FRONT_AND_BACK;
9035 config.cullModeConfig.dynamicValue = vk::VK_CULL_MODE_NONE;
9036 config.frontFaceConfig.staticValue = vk::VK_FRONT_FACE_CLOCKWISE;
9037 config.frontFaceConfig.dynamicValue = vk::VK_FRONT_FACE_COUNTER_CLOCKWISE;
9038 config.depthBiasEnableConfig.staticValue = true;
9039 config.depthBiasEnableConfig.dynamicValue = false;
9040 config.depthBiasConfig.staticValue = DepthBiasParams{1.0f, 1.0f};
9041 config.depthBiasConfig.dynamicValue = kNoDepthBiasParams;
9042 config.lineWidthConfig.staticValue = 0.0f;
9043 config.lineWidthConfig.dynamicValue = 1.0f;
9045 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "null_rasterization_state", config));
9049 TestConfig config(baseConfig);
9050 config.rasterizationSamplesConfig.staticValue = kMultiSampleCount;
9051 config.rasterizationSamplesConfig.dynamicValue = kSingleSampleCount;
9052 config.sampleMaskConfig.staticValue = SampleMaskVec(1u, 0u);
9053 config.sampleMaskConfig.dynamicValue = SampleMaskVec(1u, 0xFFu);
9054 config.alphaToCoverageConfig.staticValue = true;
9055 config.alphaToCoverageConfig.dynamicValue = false;
9056 config.alphaToOneConfig.staticValue = true;
9057 config.alphaToOneConfig.dynamicValue = false;
9059 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "null_multisample_state", config));
9063 TestConfig config(baseConfig);
9064 config.depthTestEnableConfig.staticValue = true;
9065 config.depthTestEnableConfig.dynamicValue = false;
9066 config.depthWriteEnableConfig.staticValue = true;
9067 config.depthWriteEnableConfig.dynamicValue = false;
9068 config.depthCompareOpConfig.staticValue = vk::VK_COMPARE_OP_NEVER;
9069 config.depthCompareOpConfig.dynamicValue = vk::VK_COMPARE_OP_ALWAYS;
9070 config.depthBoundsTestEnableConfig.staticValue = true;
9071 config.depthBoundsTestEnableConfig.dynamicValue = false;
9072 config.stencilTestEnableConfig.staticValue = true;
9073 config.stencilTestEnableConfig.dynamicValue = false;
9074 config.stencilOpConfig.staticValue = StencilOpVec(1u, StencilOpParams{vk::VK_STENCIL_FACE_FRONT_AND_BACK, vk::VK_STENCIL_OP_INVERT, vk::VK_STENCIL_OP_INVERT, vk::VK_STENCIL_OP_INVERT, vk::VK_COMPARE_OP_NEVER});
9075 config.stencilOpConfig.dynamicValue = StencilOpVec(1u, StencilOpParams{vk::VK_STENCIL_FACE_FRONT_AND_BACK, vk::VK_STENCIL_OP_KEEP, vk::VK_STENCIL_OP_KEEP, vk::VK_STENCIL_OP_KEEP, vk::VK_COMPARE_OP_ALWAYS});
9076 config.depthBoundsConfig.staticValue = std::make_pair(1.0f, 1.0f);
9077 config.depthBoundsConfig.dynamicValue = std::make_pair(0.0f, 0.0f);
9079 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "null_depth_stencil_state", config));
9083 TestConfig config(baseConfig);
9084 config.forceUnormColorFormat = true;
9085 config.logicOpEnableConfig.staticValue = true;
9086 config.logicOpEnableConfig.dynamicValue = false;
9087 config.logicOpConfig.staticValue = vk::VK_LOGIC_OP_CLEAR;
9088 config.logicOpConfig.dynamicValue = vk::VK_LOGIC_OP_COPY;
9089 config.colorBlendEnableConfig.staticValue = true;
9090 config.colorBlendEnableConfig.dynamicValue = false;
9091 config.colorBlendEquationConfig.staticValue = ColorBlendEq();
9092 config.colorBlendEquationConfig.dynamicValue = ColorBlendEq(vk::VK_BLEND_FACTOR_ONE, vk::VK_BLEND_FACTOR_ONE, vk::VK_BLEND_OP_ADD, vk::VK_BLEND_FACTOR_ONE, vk::VK_BLEND_FACTOR_ONE, vk::VK_BLEND_OP_ADD);
9093 config.colorWriteMaskConfig.staticValue = 0u;
9094 config.colorWriteMaskConfig.dynamicValue = (CR | CG | CB | CA);
9095 config.blendConstantsConfig.staticValue = BlendConstArray{1.0f, 1.0f, 1.0f, 1.0f};
9096 config.blendConstantsConfig.dynamicValue = BlendConstArray{0.0f, 0.0f, 0.0f, 0.0f};
9098 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "null_color_blend_state", config));
9103 TestConfig config(pipelineConstructionType, kOrdering, kUseMeshShaders);
9104 config.sampleShadingEnable = true;
9105 config.minSampleShading = 1.0f;
9106 config.forceAtomicCounters = true;
9107 config.oversizedTriangle = true;
9108 config.rasterizationSamplesConfig.staticValue = kSingleSampleCount;
9109 config.rasterizationSamplesConfig.dynamicValue = kMultiSampleCount;
9111 orderingGroup->addChild(new ExtendedDynamicStateTest(testCtx, "sample_shading_sample_count", config));