Lines Matching refs:drawOp
144 void randomizeDrawOp (de::Random& rnd, DrawPrimitiveOp& drawOp, const bool alphaZeroOrOne) in randomizeDrawOp() argument
160 drawOp.type = (PrimitiveType)rnd.getInt(0, PRIMITIVETYPE_LAST-1); in randomizeDrawOp()
161 drawOp.count = rnd.getInt(minPrimitives, maxPrimitives); in randomizeDrawOp()
162 drawOp.blend = (BlendMode)rnd.getInt(0, BLENDMODE_LAST-1); in randomizeDrawOp()
163 drawOp.depth = (DepthMode)rnd.getInt(0, DEPTHMODE_LAST-1); in randomizeDrawOp()
164 drawOp.stencil = (StencilMode)rnd.getInt(0, STENCILMODE_LAST-1); in randomizeDrawOp()
165 drawOp.stencilRef = rnd.getInt(minStencilRef, maxStencilRef); in randomizeDrawOp()
167 if (drawOp.type == PRIMITIVETYPE_TRIANGLE) in randomizeDrawOp()
169 drawOp.positions.resize(drawOp.count*3); in randomizeDrawOp()
170 drawOp.colors.resize(drawOp.count*3); in randomizeDrawOp()
172 for (int triNdx = 0; triNdx < drawOp.count; triNdx++) in randomizeDrawOp()
180 tcu::Vec4& position = drawOp.positions[triNdx*3 + coordNdx]; in randomizeDrawOp()
181 tcu::Vec4& color = drawOp.colors[triNdx*3 + coordNdx]; in randomizeDrawOp()
203 tcu::Vec4& p0 = drawOp.positions[triNdx*3 + 0]; in randomizeDrawOp()
204 tcu::Vec4& p1 = drawOp.positions[triNdx*3 + 1]; in randomizeDrawOp()
205 tcu::Vec4& p2 = drawOp.positions[triNdx*3 + 2]; in randomizeDrawOp()
287 void toReferenceRenderState (rr::RenderState& state, const DrawPrimitiveOp& drawOp) in toReferenceRenderState() argument
291 if (drawOp.blend != BLENDMODE_NONE) in toReferenceRenderState()
295 switch (drawOp.blend) in toReferenceRenderState()
316 if (drawOp.depth != DEPTHMODE_NONE) in toReferenceRenderState()
320 DE_ASSERT(drawOp.depth == DEPTHMODE_LESS); in toReferenceRenderState()
324 if (drawOp.stencil != STENCILMODE_NONE) in toReferenceRenderState()
328 DE_ASSERT(drawOp.stencil == STENCILMODE_LEQUAL_INC); in toReferenceRenderState()
333 state.fragOps.stencilStates[0].ref = drawOp.stencilRef; in toReferenceRenderState()
462 …for (vector<DrawPrimitiveOp>::const_iterator drawOp = drawOps.begin(); drawOp != drawOps.end(); dr… in renderReference() local
466 toReferenceRenderState(renderState, *drawOp); in renderReference()
468 DE_ASSERT(drawOp->type == PRIMITIVETYPE_TRIANGLE); in renderReference()
470 attributes[0].pointer = &drawOp->positions[0]; in renderReference()
471 attributes[1].pointer = &drawOp->colors[0]; in renderReference()
480 rr::PrimitiveList(rr::PRIMITIVETYPE_TRIANGLES, drawOp->count * 3, 0))); in renderReference()
565 void drawGLES2 (const glw::Functions& gl, const Program& program, const DrawPrimitiveOp& drawOp) in drawGLES2() argument
569 switch (drawOp.blend) in drawGLES2()
589 switch (drawOp.depth) in drawGLES2()
603 switch (drawOp.stencil) in drawGLES2()
611 gl.stencilFunc(GL_LEQUAL, drawOp.stencilRef, ~0u); in drawGLES2()
621 …gl.vertexAttribPointer(gles2Program.getPositionLoc(), 4, GL_FLOAT, GL_FALSE, 0, &drawOp.positions[… in drawGLES2()
622 gl.vertexAttribPointer(gles2Program.getColorLoc(), 4, GL_FLOAT, GL_FALSE, 0, &drawOp.colors[0]); in drawGLES2()
624 DE_ASSERT(drawOp.type == PRIMITIVETYPE_TRIANGLE); in drawGLES2()
625 gl.drawArrays(GL_TRIANGLES, 0, drawOp.count*3); in drawGLES2()
644 … draw (const glw::Functions& gl, EGLint api, const Program& program, const DrawPrimitiveOp& drawOp) in draw() argument
648 case EGL_OPENGL_ES2_BIT: drawGLES2(gl, program, drawOp); break; in draw()
649 case EGL_OPENGL_ES3_BIT_KHR: drawGLES2(gl, program, drawOp); break; in draw()
766 for (vector<DrawPrimitiveOp>::iterator drawOp = drawOps.begin(); drawOp != drawOps.end(); ++drawOp) in executeForContexts() local
767 randomizeDrawOp(rnd, *drawOp, (pixelFmt.alphaBits == 1)); in executeForContexts()
804 …const DrawPrimitiveOp& drawOp = drawOps[iterNdx*numContexts*drawsPerCtx + ctxNdx*drawsPerCtx + dra… in executeForContexts() local
805 draw(m_gl, api, *programs[ctxNdx], drawOp); in executeForContexts()
981 for (vector<DrawPrimitiveOp>::iterator drawOp = drawOps.begin(); drawOp != drawOps.end(); ++drawOp) in executeForContexts() local
982 randomizeDrawOp(rnd, *drawOp, (pixelFmt.alphaBits == 1)); in executeForContexts()