Lines Matching refs:params

119 tcu::TestLog& operator<< (tcu::TestLog& log, const StencilParams& params)  in operator <<()  argument
121 log << TestLog::Message << " func = " << glu::getCompareFuncStr(params.function) << "\n" in operator <<()
122 << " ref = " << params.reference << "\n" in operator <<()
123 << " compare mask = " << tcu::toHex(params.compareMask) << "\n" in operator <<()
124 << " stencil fail = " << glu::getStencilOpStr(params.stencilFailOp) << "\n" in operator <<()
125 << " depth fail = " << glu::getStencilOpStr(params.depthFailOp) << "\n" in operator <<()
126 << " depth pass = " << glu::getStencilOpStr(params.depthPassOp) << "\n" in operator <<()
127 << " write mask = " << tcu::toHex(params.writeMask) << "\n" in operator <<()
132 tcu::TestLog& operator<< (tcu::TestLog& log, const DepthStencilParams& params) in operator <<() argument
134 …log << TestLog::Message << "Stencil test: " << (params.stencilTestEnabled ? "enabled" : "disabled"… in operator <<()
135 if (params.stencilTestEnabled) in operator <<()
138 log << params.stencil[rr::FACETYPE_FRONT]; in operator <<()
141 log << params.stencil[rr::FACETYPE_BACK]; in operator <<()
144 …log << TestLog::Message << "Depth test: " << (params.depthTestEnabled ? "enabled" : "disabled") <<… in operator <<()
145 if (params.depthTestEnabled) in operator <<()
147 log << TestLog::Message << " func = " << glu::getCompareFuncStr(params.depthFunc) << "\n" in operator <<()
148 " depth value = " << params.depth << "\n" in operator <<()
149 " write mask = " << (params.depthWriteMask ? "true" : "false") << "\n" in operator <<()
153 …log << TestLog::Message << "Triangles are " << (params.visibleFace == rr::FACETYPE_FRONT ? "front"… in operator <<()
188 DepthStencilParams params; member
297 renderCmd.params.visibleFace = rr::FACETYPE_FRONT; in generateBaseClearAndDepthCommands()
298 renderCmd.params.depth = depthValues[y1*numL1CellsX + x1];; in generateBaseClearAndDepthCommands()
299 renderCmd.params.depthTestEnabled = true; in generateBaseClearAndDepthCommands()
300 renderCmd.params.depthFunc = GL_ALWAYS; in generateBaseClearAndDepthCommands()
301 renderCmd.params.depthWriteMask = true; in generateBaseClearAndDepthCommands()
323 cmd.params.visibleFace = rr::FACETYPE_FRONT; in generateDepthVisualizeCommands()
327 cmd.params.depth = depthSteps[ndx]+epsilon; in generateDepthVisualizeCommands()
328 cmd.params.depthTestEnabled = true; in generateDepthVisualizeCommands()
329 cmd.params.depthFunc = GL_LESS; in generateDepthVisualizeCommands()
330 cmd.params.depthWriteMask = false; in generateDepthVisualizeCommands()
348 cmd.params.visibleFace = rr::FACETYPE_FRONT; in generateStencilVisualizeCommands()
352 cmd.params.stencilTestEnabled = true; in generateStencilVisualizeCommands()
354 cmd.params.stencil[rr::FACETYPE_FRONT].function = GL_EQUAL; in generateStencilVisualizeCommands()
355 cmd.params.stencil[rr::FACETYPE_FRONT].reference = stencilValues[ndx]; in generateStencilVisualizeCommands()
356 cmd.params.stencil[rr::FACETYPE_FRONT].compareMask = ~0u; in generateStencilVisualizeCommands()
357 cmd.params.stencil[rr::FACETYPE_FRONT].stencilFailOp = GL_KEEP; in generateStencilVisualizeCommands()
358 cmd.params.stencil[rr::FACETYPE_FRONT].depthFailOp = GL_KEEP; in generateStencilVisualizeCommands()
359 cmd.params.stencil[rr::FACETYPE_FRONT].depthPassOp = GL_KEEP; in generateStencilVisualizeCommands()
360 cmd.params.stencil[rr::FACETYPE_FRONT].writeMask = 0u; in generateStencilVisualizeCommands()
362 cmd.params.stencil[rr::FACETYPE_BACK] = cmd.params.stencil[rr::FACETYPE_FRONT]; in generateStencilVisualizeCommands()
385 bool isFrontFacing = src.params.visibleFace == rr::FACETYPE_FRONT; in translateCommand()
391 …N(dst.quad.depth), DE_ARRAY_END(dst.quad.depth), ((far-near)/2.0f) * src.params.depth + (near+far)… in translateCommand()
396 dst.state.stencilTestEnabled = hasStencil && src.params.stencilTestEnabled; in translateCommand()
397 dst.state.depthTestEnabled = hasDepth && src.params.depthTestEnabled; in translateCommand()
403 dst.state.depthFunc = sglr::rr_util::mapGLTestFunc(src.params.depthFunc); in translateCommand()
404 dst.state.depthMask = src.params.depthWriteMask; in translateCommand()
409 …translateStencilState(src.params.stencil[rr::FACETYPE_BACK], dst.state.stencilStates[rr::FACETYPE_… in translateCommand()
410 …translateStencilState(src.params.stencil[rr::FACETYPE_FRONT], dst.state.stencilStates[rr::FACETYPE… in translateCommand()
436 if (command.params.stencilTestEnabled) in render()
443 const StencilParams& sParams = command.params.stencil[face]; in render()
453 if (command.params.depthTestEnabled) in render()
456 glDepthFunc(command.params.depthFunc); in render()
457 glDepthMask(command.params.depthWriteMask ? GL_TRUE : GL_FALSE); in render()
470 bool isFrontFacing = command.params.visibleFace == rr::FACETYPE_FRONT; in render()
475 std::fill(DE_ARRAY_BEGIN(quad.depth), DE_ARRAY_END(quad.depth), command.params.depth); in render()
626 testCmd.params = m_cases[m_iterNdx]; in iterate()
724 static void randomDepthStencilState (de::Random& rnd, DepthStencilParams& params) in randomDepthStencilState() argument
755 params.visibleFace = rnd.getBool() ? rr::FACETYPE_FRONT : rr::FACETYPE_BACK; in randomDepthStencilState()
756 params.stencilTestEnabled = rnd.getFloat() < stencilTestProbability; in randomDepthStencilState()
757 params.depthTestEnabled = !params.stencilTestEnabled || (rnd.getFloat() < depthTestProbability); in randomDepthStencilState()
759 if (params.stencilTestEnabled) in randomDepthStencilState()
763params.stencil[ndx].function = rnd.choose<deUint32>(DE_ARRAY_BEGIN(compareFuncs), DE_ARRAY_END(co… in randomDepthStencilState()
764 params.stencil[ndx].reference = rnd.getInt(-2, 260); in randomDepthStencilState()
765 params.stencil[ndx].compareMask = rnd.getUint32(); in randomDepthStencilState()
766params.stencil[ndx].stencilFailOp = rnd.choose<deUint32>(DE_ARRAY_BEGIN(stencilOps), DE_ARRAY_END(… in randomDepthStencilState()
767params.stencil[ndx].depthFailOp = rnd.choose<deUint32>(DE_ARRAY_BEGIN(stencilOps), DE_ARRAY_END(s… in randomDepthStencilState()
768params.stencil[ndx].depthPassOp = rnd.choose<deUint32>(DE_ARRAY_BEGIN(stencilOps), DE_ARRAY_END(s… in randomDepthStencilState()
769 params.stencil[ndx].writeMask = rnd.getUint32(); in randomDepthStencilState()
773 if (params.depthTestEnabled) in randomDepthStencilState()
775params.depthFunc = rnd.choose<deUint32>(DE_ARRAY_BEGIN(compareFuncs), DE_ARRAY_END(compareFuncs)); in randomDepthStencilState()
776 params.depth = rnd.choose<float>(DE_ARRAY_BEGIN(depthValues), DE_ARRAY_END(depthValues)); in randomDepthStencilState()
777 params.depthWriteMask = rnd.getBool(); in randomDepthStencilState()
843 DepthStencilParams params; in init() local
858 params.depthFunc = hasDepthFunc ? compareFuncs[depthFunc].func : 0; in init()
859 params.depthTestEnabled = hasDepthFunc; in init()
860 params.depthWriteMask = true; in init()
862 params.stencilTestEnabled = hasStencilFunc; in init()
870 params.depth = functionCases[ndx].depth; in init()
871 params.visibleFace = visible; in init()
873 params.stencil[visible].function = hasStencilFunc ? compareFuncs[stencilFunc].func : 0; in init()
874 params.stencil[visible].reference = functionCases[ndx].stencilRef; in init()
875 params.stencil[visible].stencilFailOp = functionCases[ndx].sFail; in init()
876 params.stencil[visible].depthFailOp = functionCases[ndx].dFail; in init()
877 params.stencil[visible].depthPassOp = functionCases[ndx].dPass; in init()
878 params.stencil[visible].compareMask = functionCases[ndx].compareMask; in init()
879 params.stencil[visible].writeMask = functionCases[ndx].writeMask; in init()
881 params.stencil[notVisible].function = GL_ALWAYS; in init()
882 params.stencil[notVisible].reference = 0; in init()
883 params.stencil[notVisible].stencilFailOp = GL_REPLACE; in init()
884 params.stencil[notVisible].depthFailOp = GL_REPLACE; in init()
885 params.stencil[notVisible].depthPassOp = GL_REPLACE; in init()
886 params.stencil[notVisible].compareMask = 0u; in init()
887 params.stencil[notVisible].writeMask = ~0u; in init()
890 cases.push_back(params); in init()
924 DepthStencilParams params; in init() local
929 params.depthFunc = GL_LEQUAL; in init()
930 params.depth = 0.0f; in init()
931 params.depthTestEnabled = true; in init()
932 params.depthWriteMask = true; in init()
934 params.stencilTestEnabled = true; in init()
942 params.visibleFace = visible; in init()
944 params.stencil[visible].function = opCombinationCases[ndx].func; in init()
945 params.stencil[visible].reference = opCombinationCases[ndx].ref; in init()
946 params.stencil[visible].stencilFailOp = stencilOps[sFail].op; in init()
947 params.stencil[visible].depthFailOp = stencilOps[dFail].op; in init()
948 params.stencil[visible].depthPassOp = stencilOps[dPass].op; in init()
949 params.stencil[visible].compareMask = opCombinationCases[ndx].compareMask; in init()
950 params.stencil[visible].writeMask = opCombinationCases[ndx].writeMask; in init()
952 params.stencil[notVisible].function = GL_ALWAYS; in init()
953 params.stencil[notVisible].reference = 0; in init()
954 params.stencil[notVisible].stencilFailOp = GL_REPLACE; in init()
955 params.stencil[notVisible].depthFailOp = GL_REPLACE; in init()
956 params.stencil[notVisible].depthPassOp = GL_REPLACE; in init()
957 params.stencil[notVisible].compareMask = 0u; in init()
958 params.stencil[notVisible].writeMask = ~0u; in init()
961 cases.push_back(params); in init()
977 DepthStencilParams params; in init() local
979 params.depthFunc = GL_LEQUAL; in init()
980 params.depth = 0.0f; in init()
981 params.depthTestEnabled = true; in init()
982 params.stencilTestEnabled = true; in init()
984 params.stencil[rr::FACETYPE_FRONT].function = GL_NOTEQUAL; in init()
985 params.stencil[rr::FACETYPE_FRONT].reference = 1; in init()
986 params.stencil[rr::FACETYPE_FRONT].stencilFailOp = GL_INVERT; in init()
987 params.stencil[rr::FACETYPE_FRONT].depthFailOp = GL_INCR; in init()
988 params.stencil[rr::FACETYPE_FRONT].depthPassOp = GL_DECR; in init()
989 params.stencil[rr::FACETYPE_FRONT].compareMask = ~0u; in init()
990 params.stencil[rr::FACETYPE_FRONT].writeMask = ~0u; in init()
992 params.stencil[rr::FACETYPE_BACK].function = GL_ALWAYS; in init()
993 params.stencil[rr::FACETYPE_BACK].reference = 0; in init()
994 params.stencil[rr::FACETYPE_BACK].stencilFailOp = GL_REPLACE; in init()
995 params.stencil[rr::FACETYPE_BACK].depthFailOp = GL_INVERT; in init()
996 params.stencil[rr::FACETYPE_BACK].depthPassOp = GL_INCR; in init()
997 params.stencil[rr::FACETYPE_BACK].compareMask = ~0u; in init()
998 params.stencil[rr::FACETYPE_BACK].writeMask = ~0u; in init()
1003 params.visibleFace = rr::FACETYPE_FRONT; in init()
1004 params.depthWriteMask = true; in init()
1005 cases.push_back(params); in init()
1008 params.visibleFace = rr::FACETYPE_FRONT; in init()
1009 params.depthWriteMask = false; in init()
1010 cases.push_back(params); in init()
1013 params.visibleFace = rr::FACETYPE_BACK; in init()
1014 params.depthWriteMask = true; in init()
1015 cases.push_back(params); in init()
1018 params.visibleFace = rr::FACETYPE_BACK; in init()
1019 params.depthWriteMask = false; in init()
1020 cases.push_back(params); in init()
1044 DepthStencilParams params; in init() local
1046 params.depthFunc = GL_LEQUAL; in init()
1047 params.depth = 0.0f; in init()
1048 params.depthTestEnabled = true; in init()
1049 params.depthWriteMask = true; in init()
1050 params.stencilTestEnabled = true; in init()
1052 params.stencil[rr::FACETYPE_FRONT].function = GL_NOTEQUAL; in init()
1053 params.stencil[rr::FACETYPE_FRONT].reference = 1; in init()
1054 params.stencil[rr::FACETYPE_FRONT].stencilFailOp = GL_INVERT; in init()
1055 params.stencil[rr::FACETYPE_FRONT].depthFailOp = GL_INCR; in init()
1056 params.stencil[rr::FACETYPE_FRONT].depthPassOp = GL_DECR; in init()
1057 params.stencil[rr::FACETYPE_FRONT].compareMask = ~0u; in init()
1059 params.stencil[rr::FACETYPE_BACK].function = GL_ALWAYS; in init()
1060 params.stencil[rr::FACETYPE_BACK].reference = 0; in init()
1061 params.stencil[rr::FACETYPE_BACK].stencilFailOp = GL_REPLACE; in init()
1062 params.stencil[rr::FACETYPE_BACK].depthFailOp = GL_INVERT; in init()
1063 params.stencil[rr::FACETYPE_BACK].depthPassOp = GL_INCR; in init()
1064 params.stencil[rr::FACETYPE_BACK].compareMask = ~0u; in init()
1069 params.visibleFace = stencilWmaskCases[ndx].visibleFace; in init()
1070 params.stencil[rr::FACETYPE_FRONT].writeMask = stencilWmaskCases[ndx].frontWriteMask; in init()
1071 params.stencil[rr::FACETYPE_BACK].writeMask = stencilWmaskCases[ndx].backWriteMask; in init()
1072 cases.push_back(params); in init()
1102 DepthStencilParams params; in init() local
1104 params.depthFunc = GL_LEQUAL; in init()
1105 params.depth = 0.0f; in init()
1106 params.depthTestEnabled = true; in init()
1107 params.depthWriteMask = true; in init()
1108 params.stencilTestEnabled = true; in init()
1110 params.stencil[rr::FACETYPE_FRONT].function = GL_NOTEQUAL; in init()
1111 params.stencil[rr::FACETYPE_FRONT].reference = 1; in init()
1112 params.stencil[rr::FACETYPE_FRONT].stencilFailOp = GL_INVERT; in init()
1113 params.stencil[rr::FACETYPE_FRONT].depthFailOp = GL_INCR; in init()
1114 params.stencil[rr::FACETYPE_FRONT].depthPassOp = GL_DECR; in init()
1115 params.stencil[rr::FACETYPE_FRONT].compareMask = ~0u; in init()
1117 params.stencil[rr::FACETYPE_BACK].function = GL_ALWAYS; in init()
1118 params.stencil[rr::FACETYPE_BACK].reference = 0; in init()
1119 params.stencil[rr::FACETYPE_BACK].stencilFailOp = GL_REPLACE; in init()
1120 params.stencil[rr::FACETYPE_BACK].depthFailOp = GL_INVERT; in init()
1121 params.stencil[rr::FACETYPE_BACK].depthPassOp = GL_INCR; in init()
1122 params.stencil[rr::FACETYPE_BACK].compareMask = ~0u; in init()
1127 params.depthWriteMask = depthStencilWmaskCases[ndx].depthWriteMask; in init()
1128 params.visibleFace = depthStencilWmaskCases[ndx].visibleFace; in init()
1129 params.stencil[rr::FACETYPE_FRONT].writeMask = depthStencilWmaskCases[ndx].frontWriteMask; in init()
1130 params.stencil[rr::FACETYPE_BACK].writeMask = depthStencilWmaskCases[ndx].backWriteMask; in init()
1131 cases.push_back(params); in init()