Lines Matching refs:stencil
21 * \brief Depth & stencil tests.
101 StencilParams stencil[rr::FACETYPE_LAST];
124 << " stencil fail = " << glu::getStencilOpStr(params.stencilFailOp) << "\n"
134 log << TestLog::Message << "Stencil test: " << (params.stencilTestEnabled ? "enabled" : "disabled") << TestLog::EndMessage;
137 log << TestLog::Message << "Front-face stencil state: " << TestLog::EndMessage;
138 log << params.stencil[rr::FACETYPE_FRONT];
140 log << TestLog::Message << "Back-face stencil state: " << TestLog::EndMessage;
141 log << params.stencil[rr::FACETYPE_BACK];
163 int stencil;
170 , stencil (0)
181 , stencil (stencil_)
268 // Compute stencil values: numL0CellsX*numL0CellsY combinations of lowest and highest bits.
354 cmd.params.stencil[rr::FACETYPE_FRONT].function = GL_EQUAL;
355 cmd.params.stencil[rr::FACETYPE_FRONT].reference = stencilValues[ndx];
356 cmd.params.stencil[rr::FACETYPE_FRONT].compareMask = ~0u;
357 cmd.params.stencil[rr::FACETYPE_FRONT].stencilFailOp = GL_KEEP;
358 cmd.params.stencil[rr::FACETYPE_FRONT].depthFailOp = GL_KEEP;
359 cmd.params.stencil[rr::FACETYPE_FRONT].depthPassOp = GL_KEEP;
360 cmd.params.stencil[rr::FACETYPE_FRONT].writeMask = 0u;
362 cmd.params.stencil[rr::FACETYPE_BACK] = cmd.params.stencil[rr::FACETYPE_FRONT];
409 translateStencilState(src.params.stencil[rr::FACETYPE_BACK], dst.state.stencilStates[rr::FACETYPE_BACK]);
410 translateStencilState(src.params.stencil[rr::FACETYPE_FRONT], dst.state.stencilStates[rr::FACETYPE_FRONT]);
423 if (clear.buffers & GL_STENCIL_BUFFER_BIT) glClearStencil(clear.stencil);
443 const StencilParams& sParams = command.params.stencil[face];
492 int maskedVal = clear.stencil & ((1<<stencilBits)-1);
632 " GREEN: stencil values\n"
716 : TestCaseGroup(context, "depth_stencil", "Depth and Stencil Op Tests")
763 params.stencil[ndx].function = rnd.choose<deUint32>(DE_ARRAY_BEGIN(compareFuncs), DE_ARRAY_END(compareFuncs));
764 params.stencil[ndx].reference = rnd.getInt(-2, 260);
765 params.stencil[ndx].compareMask = rnd.getUint32();
766 params.stencil[ndx].stencilFailOp = rnd.choose<deUint32>(DE_ARRAY_BEGIN(stencilOps), DE_ARRAY_END(stencilOps));
767 params.stencil[ndx].depthFailOp = rnd.choose<deUint32>(DE_ARRAY_BEGIN(stencilOps), DE_ARRAY_END(stencilOps));
768 params.stencil[ndx].depthPassOp = rnd.choose<deUint32>(DE_ARRAY_BEGIN(stencilOps), DE_ARRAY_END(stencilOps));
769 params.stencil[ndx].writeMask = rnd.getUint32();
833 // All combinations of depth stencil functions.
835 tcu::TestCaseGroup* functionsGroup = new tcu::TestCaseGroup(m_testCtx, "stencil_depth_funcs", "Combinations of Depth and Stencil Functions");
873 params.stencil[visible].function = hasStencilFunc ? compareFuncs[stencilFunc].func : 0;
874 params.stencil[visible].reference = functionCases[ndx].stencilRef;
875 params.stencil[visible].stencilFailOp = functionCases[ndx].sFail;
876 params.stencil[visible].depthFailOp = functionCases[ndx].dFail;
877 params.stencil[visible].depthPassOp = functionCases[ndx].dPass;
878 params.stencil[visible].compareMask = functionCases[ndx].compareMask;
879 params.stencil[visible].writeMask = functionCases[ndx].writeMask;
881 params.stencil[notVisible].function = GL_ALWAYS;
882 params.stencil[notVisible].reference = 0;
883 params.stencil[notVisible].stencilFailOp = GL_REPLACE;
884 params.stencil[notVisible].depthFailOp = GL_REPLACE;
885 params.stencil[notVisible].depthPassOp = GL_REPLACE;
886 params.stencil[notVisible].compareMask = 0u;
887 params.stencil[notVisible].writeMask = ~0u;
913 // All combinations of stencil ops.
915 tcu::TestCaseGroup* opCombinationGroup = new tcu::TestCaseGroup(m_testCtx, "stencil_ops", "Stencil Op Combinations");
944 params.stencil[visible].function = opCombinationCases[ndx].func;
945 params.stencil[visible].reference = opCombinationCases[ndx].ref;
946 params.stencil[visible].stencilFailOp = stencilOps[sFail].op;
947 params.stencil[visible].depthFailOp = stencilOps[dFail].op;
948 params.stencil[visible].depthPassOp = stencilOps[dPass].op;
949 params.stencil[visible].compareMask = opCombinationCases[ndx].compareMask;
950 params.stencil[visible].writeMask = opCombinationCases[ndx].writeMask;
952 params.stencil[notVisible].function = GL_ALWAYS;
953 params.stencil[notVisible].reference = 0;
954 params.stencil[notVisible].stencilFailOp = GL_REPLACE;
955 params.stencil[notVisible].depthFailOp = GL_REPLACE;
956 params.stencil[notVisible].depthPassOp = GL_REPLACE;
957 params.stencil[notVisible].compareMask = 0u;
958 params.stencil[notVisible].writeMask = ~0u;
972 tcu::TestCaseGroup* writeMaskGroup = new tcu::TestCaseGroup(m_testCtx, "write_mask", "Depth and Stencil Write Masks");
984 params.stencil[rr::FACETYPE_FRONT].function = GL_NOTEQUAL;
985 params.stencil[rr::FACETYPE_FRONT].reference = 1;
986 params.stencil[rr::FACETYPE_FRONT].stencilFailOp = GL_INVERT;
987 params.stencil[rr::FACETYPE_FRONT].depthFailOp = GL_INCR;
988 params.stencil[rr::FACETYPE_FRONT].depthPassOp = GL_DECR;
989 params.stencil
990 params.stencil[rr::FACETYPE_FRONT].writeMask = ~0u;
992 params.stencil[rr::FACETYPE_BACK].function = GL_ALWAYS;
993 params.stencil[rr::FACETYPE_BACK].reference = 0;
994 params.stencil[rr::FACETYPE_BACK].stencilFailOp = GL_REPLACE;
995 params.stencil[rr::FACETYPE_BACK].depthFailOp = GL_INVERT;
996 params.stencil[rr::FACETYPE_BACK].depthPassOp = GL_INCR;
997 params.stencil[rr::FACETYPE_BACK].compareMask = ~0u;
998 params.stencil[rr::FACETYPE_BACK].writeMask = ~0u;
1025 // Stencil write masks.
1052 params.stencil[rr::FACETYPE_FRONT].function = GL_NOTEQUAL;
1053 params.stencil[rr::FACETYPE_FRONT].reference = 1;
1054 params.stencil[rr::FACETYPE_FRONT].stencilFailOp = GL_INVERT;
1055 params.stencil[rr::FACETYPE_FRONT].depthFailOp = GL_INCR;
1056 params.stencil[rr::FACETYPE_FRONT].depthPassOp = GL_DECR;
1057 params.stencil[rr::FACETYPE_FRONT].compareMask = ~0u;
1059 params.stencil[rr::FACETYPE_BACK].function = GL_ALWAYS;
1060 params.stencil[rr::FACETYPE_BACK].reference = 0;
1061 params.stencil[rr::FACETYPE_BACK].stencilFailOp = GL_REPLACE;
1062 params.stencil[rr::FACETYPE_BACK].depthFailOp = GL_INVERT;
1063 params.stencil[rr::FACETYPE_BACK].depthPassOp = GL_INCR;
1064 params.stencil[rr::FACETYPE_BACK].compareMask = ~0u;
1070 params.stencil[rr::FACETYPE_FRONT].writeMask = stencilWmaskCases[ndx].frontWriteMask;
1071 params.stencil[rr::FACETYPE_BACK].writeMask = stencilWmaskCases[ndx].backWriteMask;
1075 writeMaskGroup->addChild(new DepthStencilCase(m_context, "stencil", "Stencil Write Mask", cases));
1078 // Depth & stencil write masks.
1110 params.stencil[rr::FACETYPE_FRONT].function = GL_NOTEQUAL;
1111 params.stencil[rr::FACETYPE_FRONT].reference = 1;
1112 params.stencil[rr::FACETYPE_FRONT].stencilFailOp = GL_INVERT;
1113 params.stencil[rr::FACETYPE_FRONT].depthFailOp = GL_INCR;
1114 params.stencil[rr::FACETYPE_FRONT].depthPassOp = GL_DECR;
1115 params.stencil[rr::FACETYPE_FRONT].compareMask = ~0u;
1117 params.stencil[rr::FACETYPE_BACK].function = GL_ALWAYS;
1118 params.stencil[rr::FACETYPE_BACK].reference = 0;
1119 params.stencil[rr::FACETYPE_BACK].stencilFailOp = GL_REPLACE;
1120 params.stencil[rr::FACETYPE_BACK].depthFailOp = GL_INVERT;
1121 params.stencil[rr::FACETYPE_BACK].depthPassOp = GL_INCR;
1122 params.stencil[rr::FACETYPE_BACK].compareMask = ~0u;
1129 params.stencil[rr::FACETYPE_FRONT].writeMask = depthStencilWmaskCases[ndx].frontWriteMask;
1130 params.stencil[rr::FACETYPE_BACK].writeMask = depthStencilWmaskCases[ndx].backWriteMask;
1134 writeMaskGroup->addChild(new DepthStencilCase(m_context, "both", "Depth and Stencil Write Masks", cases));
1140 tcu::TestCaseGroup* randomGroup = new tcu::TestCaseGroup(m_testCtx, "random", "Randomized Depth and Stencil Test Cases");