Home | History | Annotate | Download | only in egl

Lines Matching refs:drawOp

136 void randomizeDrawOp (de::Random& rnd, DrawPrimitiveOp& drawOp)
152 drawOp.type = (PrimitiveType)rnd.getInt(0, PRIMITIVETYPE_LAST-1);
153 drawOp.count = rnd.getInt(minPrimitives, maxPrimitives);
154 drawOp.blend = (BlendMode)rnd.getInt(0, BLENDMODE_LAST-1);
155 drawOp.depth = (DepthMode)rnd.getInt(0, DEPTHMODE_LAST-1);
156 drawOp.stencil = (StencilMode)rnd.getInt(0, STENCILMODE_LAST-1);
157 drawOp.stencilRef = rnd.getInt(minStencilRef, maxStencilRef);
159 if (drawOp.type == PRIMITIVETYPE_TRIANGLE)
161 drawOp.positions.resize(drawOp.count*3);
162 drawOp.colors.resize(drawOp.count*3);
164 for (int triNdx = 0; triNdx < drawOp.count; triNdx++)
171 tcu::Vec4& position = drawOp.positions[triNdx*3 + coordNdx];
172 tcu::Vec4& color = drawOp.colors[triNdx*3 + coordNdx];
245 void toReferenceRenderState (rr::RenderState& state, const DrawPrimitiveOp& drawOp)
249 if (drawOp.blend != BLENDMODE_NONE)
253 switch (drawOp.blend)
274 if (drawOp.depth != DEPTHMODE_NONE)
278 DE_ASSERT(drawOp.depth == DEPTHMODE_LESS);
282 if (drawOp.stencil != STENCILMODE_NONE)
286 DE_ASSERT(drawOp.stencil == STENCILMODE_LEQUAL_INC);
291 state.fragOps.stencilStates[0].ref = drawOp.stencilRef;
389 for (vector<DrawPrimitiveOp>::const_iterator drawOp = drawOps.begin(); drawOp != drawOps.end(); drawOp++)
393 toReferenceRenderState(renderState, *drawOp);
395 DE_ASSERT(drawOp->type == PRIMITIVETYPE_TRIANGLE);
397 attributes[0].pointer = &drawOp->positions[0];
398 attributes[1].pointer = &drawOp->colors[0];
407 rr::PrimitiveList(rr::PRIMITIVETYPE_TRIANGLES, drawOp->count * 3, 0)));
545 void drawGLES2 (const Program& program, const DrawPrimitiveOp& drawOp)
549 switch (drawOp.blend)
569 switch (drawOp.depth)
583 switch (drawOp.stencil)
591 glStencilFunc(GL_LEQUAL, drawOp.stencilRef, ~0u);
599 glVertexAttribPointer(gles2Program.getPositionLoc(), 4, GL_FLOAT, GL_FALSE, 0, &drawOp.positions[0]);
600 glVertexAttribPointer(gles2Program.getColorLoc(), 4, GL_FLOAT, GL_FALSE, 0, &drawOp.colors[0]);
602 DE_ASSERT(drawOp.type == PRIMITIVETYPE_TRIANGLE);
603 glDrawArrays(GL_TRIANGLES, 0, drawOp.count*3);
626 void draw (EGLint api, const Program& program, const DrawPrimitiveOp& drawOp)
631 case EGL_OPENGL_ES2_BIT: drawGLES2(program, drawOp); break;
632 case EGL_OPENGL_ES3_BIT_KHR: drawGLES2(program, drawOp); break;
726 for (vector<DrawPrimitiveOp>::iterator drawOp = drawOps.begin(); drawOp != drawOps.end(); ++drawOp)
727 randomizeDrawOp(rnd, *drawOp);
766 const DrawPrimitiveOp& drawOp = drawOps[iterNdx*numContexts*drawsPerCtx + ctxNdx*drawsPerCtx + drawNdx];
767 draw(api, *programs[ctxNdx], drawOp);
919 for (vector<DrawPrimitiveOp>::iterator drawOp = drawOps.begin(); drawOp != drawOps.end(); ++drawOp)
920 randomizeDrawOp(rnd, *drawOp);