Lines Matching defs:context
58 void shadeFragments (rr::FragmentPacket* packets, const int numPackets, const rr::FragmentShadingContext& context) const;
94 void DepthShader::shadeFragments (rr::FragmentPacket* packets, const int numPackets, const rr::FragmentShadingContext& context) const
102 rr::writeFragmentOutput(context, packetNdx, fragNdx, 0, color);
109 DepthCase (Context& context, const char* name, const char* description);
113 virtual void render (sglr::Context& context) = DE_NULL;
116 DepthCase::DepthCase (Context& context, const char* name, const char* description)
117 : TestCase(context, name, description)
129 // Position & size for context
144 sglr::GLContext context(renderCtx, log, sglr::GLCONTEXT_LOG_CALLS, tcu::IVec4(x, y, width, height));
146 context.clearColor(clearColor.x(), clearColor.y(), clearColor.z(), clearColor.w());
147 context.clear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT);
149 render(context); // Call actual render func
150 context.readPixels(gles2Frame, 0, 0, width, height);
151 gles2Error = context.getError();
157 sglr::ReferenceContext context (sglr::ReferenceContextLimits(renderCtx), buffers.getColorbuffer(), buffers.getDepthbuffer(), buffers.getStencilbuffer());
159 context.clearColor(clearColor.x(), clearColor.y(), clearColor.z(), clearColor.w());
160 context.clear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT);
162 render(context);
163 context.readPixels(refFrame, 0, 0, width, height);
164 refError = context.getError();
194 DepthCompareCase (Context& context, const char* name, const char* description, deUint32 compareOp)
195 : DepthCase (context, name, description)
200 void render (sglr::Context& context)
205 deUint32 shaderID = context.createProgram(&shader);
211 context.clearDepthf(1.0f);
212 context.clear(GL_DEPTH_BUFFER_BIT);
215 context.enable(GL_DEPTH_TEST);
218 context.depthFunc(GL_ALWAYS);
219 shader.setColor(context, shaderID, red);
220 sglr::drawQuad(context, shaderID, Vec3(-1.0f, -1.0f, 0.2f), Vec3(0.0f, 0.0f, 0.2f));
221 context.depthFunc(m_compareOp);
222 shader.setColor(context, shaderID, green);
223 sglr::drawQuad(context, shaderID, Vec3(-1.0f, -1.0f, 0.2f), Vec3(0.0f, 0.0f, 0.2f));
226 context.depthFunc(GL_ALWAYS);
227 shader.setColor(context, shaderID, red);
228 sglr::drawQuad(context, shaderID, Vec3(-1.0f, 0.0f, -0.4f), Vec3(0.0f, 1.0f, -0.4f));
229 context.depthFunc(m_compareOp);
230 shader.setColor(context, shaderID, green);
231 sglr::drawQuad(context, shaderID, Vec3(-1.0f, 0.0f, -0.1f), Vec3(0.0f, 1.0f, -0.1f));
234 context.depthFunc(GL_ALWAYS);
235 shader.setColor(context, shaderID, red);
236 sglr::drawQuad(context, shaderID, Vec3(0.0f, -1.0f, 0.5f), Vec3(1.0f, 0.0f, 0.5f));
237 context.depthFunc(m_compareOp);
238 shader.setColor(context, shaderID, green);
239 sglr::drawQuad(context, shaderID, Vec3(0.0f, -1.0f, 0.3f), Vec3(1.0f, 0.0f, 0.3f));
242 context.depthFunc(GL_ALWAYS);
243 shader.setColor(context, shaderID, red);
244 sglr::drawQuad(context, shaderID, Vec3(0.0f, 0.0f, 0.0f), Vec3(1.0f, 1.0f, 0.0f));
245 context.depthFunc(m_compareOp);
246 shader.setColor(context, shaderID, green);
247 sglr::drawQuad(context, shaderID, Vec3(0.0f, 0.0f, -1.0f), Vec3(1.0f, 1.0f, 1.0f));
254 DepthTests::DepthTests (Context& context)
255 : TestCaseGroup(context, "depth", "Depth Tests")