Lines Matching defs:context
58 void shadeFragments (rr::FragmentPacket* packets, const int numPackets, const rr::FragmentShadingContext& context) const;
97 void DepthShader::shadeFragments (rr::FragmentPacket* packets, const int numPackets, const rr::FragmentShadingContext& context) const
105 rr::writeFragmentOutput(context, packetNdx, fragNdx, 0, color);
112 DepthCase (Context& context, const char* name, const char* description);
116 virtual void render (sglr::Context& context) = DE_NULL;
119 DepthCase::DepthCase (Context& context, const char* name, const char* description)
120 : TestCase(context, name, description)
132 // Position & size for context
147 sglr::GLContext context(renderCtx, log, sglr::GLCONTEXT_LOG_CALLS, tcu::IVec4(x, y, width, height));
149 context.clearColor(clearColor.x(), clearColor.y(), clearColor.z(), clearColor.w());
150 context.clear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT);
152 render(context); // Call actual render func
153 context.readPixels(gles2Frame, 0, 0, width, height);
154 gles2Error = context.getError();
160 sglr::ReferenceContext context (sglr::ReferenceContextLimits(renderCtx), buffers.getColorbuffer(), buffers.getDepthbuffer(), buffers.getStencilbuffer());
162 context.clearColor(clearColor.x(), clearColor.y(), clearColor.z(), clearColor.w());
163 context.clear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT);
165 render(context);
166 context.readPixels(refFrame, 0, 0, width, height);
167 refError = context.getError();
197 DepthCompareCase (Context& context, const char* name, const char* description, deUint32 compareOp)
198 : DepthCase (context, name, description)
203 void render (sglr::Context& context)
208 deUint32 shaderID = context.createProgram(&shader);
214 context.clearDepthf(1.0f);
215 context.clear(GL_DEPTH_BUFFER_BIT);
218 context.enable(GL_DEPTH_TEST);
221 context.depthFunc(GL_ALWAYS);
222 shader.setColor(context, shaderID, red);
223 sglr::drawQuad(context, shaderID, Vec3(-1.0f, -1.0f, 0.2f), Vec3(0.0f, 0.0f, 0.2f));
224 context.depthFunc(m_compareOp);
225 shader.setColor(context, shaderID, green);
226 sglr::drawQuad(context, shaderID, Vec3(-1.0f, -1.0f, 0.2f), Vec3(0.0f, 0.0f, 0.2f));
229 context.depthFunc(GL_ALWAYS);
230 shader.setColor(context, shaderID, red);
231 sglr::drawQuad(context, shaderID, Vec3(-1.0f, 0.0f, -0.4f), Vec3(0.0f, 1.0f, -0.4f));
232 context.depthFunc(m_compareOp);
233 shader.setColor(context, shaderID, green);
234 sglr::drawQuad(context, shaderID, Vec3(-1.0f, 0.0f, -0.1f), Vec3(0.0f, 1.0f, -0.1f));
237 context.depthFunc(GL_ALWAYS);
238 shader.setColor(context, shaderID, red);
239 sglr::drawQuad(context, shaderID, Vec3(0.0f, -1.0f, 0.5f), Vec3(1.0f, 0.0f, 0.5f));
240 context.depthFunc(m_compareOp);
241 shader.setColor(context, shaderID, green);
242 sglr::drawQuad(context, shaderID, Vec3(0.0f, -1.0f, 0.3f), Vec3(1.0f, 0.0f, 0.3f));
245 context.depthFunc(GL_ALWAYS);
246 shader.setColor(context, shaderID, red);
247 sglr::drawQuad(context, shaderID, Vec3(0.0f, 0.0f, 0.0f), Vec3(1.0f, 1.0f, 0.0f));
248 context.depthFunc(m_compareOp);
249 shader.setColor(context, shaderID, green);
250 sglr::drawQuad(context, shaderID, Vec3(0.0f, 0.0f, -1.0f), Vec3(1.0f, 1.0f, 1.0f));
257 DepthTests::DepthTests (Context& context)
258 : TestCaseGroup(context, "depth", "Depth Tests")