Lines Matching defs:const

72 void drawQuad (const glw::Functions& gl, deUint32 program, const Vec3& p0, const Vec3& p1)
75 const float hz = (p0.z() + p1.z()) * 0.5f;
76 const float position[] =
84 const deUint16 indices[] = { 0, 1, 2, 2, 1, 3 };
86 const deInt32 posLoc = gl.getAttribLocation(program, "a_position");
98 void drawPrimitives (const glw::Functions& gl, deUint32 program, const deUint32 type, const vector<float>& vertices, const vector<deUint16>& indices)
100 const deInt32 posLoc = gl.getAttribLocation(program, "a_position");
114 void clearEdges (const tcu::PixelBufferAccess& access, const T& color, const IVec4& scissorArea)
149 const string frgSource = "${VERSION}\n"
186 ScissorCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char *name, const char* desc, const Vec4& scissorArea);
192 virtual void render (GLuint program, const IVec4& viewport) const = 0;
195 virtual bool isPoint (void) const = 0;
198 const Vec4 m_scissorArea;
201 ScissorCase::ScissorCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char *name, const char* desc, const Vec4& scissorArea)
212 const glw::Functions& gl = m_renderCtx.getFunctions();
214 const tcu::PixelFormat renderFormat = m_renderCtx.getRenderTarget().getPixelFormat();
215 const tcu::Vec4 threshold = 0.02f * UVec4(1u << de::max(0, 8 - renderFormat.redBits),
219 const glu::ShaderProgram shader (m_renderCtx, genShaders(glu::getContextTypeGLSLVersion(m_renderCtx.getType()), isPoint()));
221 const RandomViewport viewport (m_renderCtx.getRenderTarget(), 256, 256, deStringHash(getName()));
222 const IVec4 relScissorArea (int(m_scissorArea.x() * (float)viewport.width),
226 const IVec4 absScissorArea (relScissorArea.x() + viewport.x,
307 const char* name,
308 const char* desc,
309 const Vec4& scissorArea,
310 const Vec4& renderArea,
316 virtual void render (GLuint program, const IVec4& viewport) const;
317 virtual bool isPoint (void) const;
320 const Vec4 m_renderArea;
321 const PrimitiveType m_primitiveType;
322 const int m_primitiveCount;
327 const char* name,
328 const char* desc,
329 const Vec4& scissorArea,
330 const Vec4& renderArea,
340 bool ScissorPrimitiveCase::isPoint (void) const
345 void ScissorPrimitiveCase::render (GLuint program, const IVec4&) const
347 const glw::Functions& gl = m_renderCtx.getFunctions();
348 const Vec4 white (1.0f, 1.0f, 1.0f, 1.0);
349 const Vec4 primitiveArea (m_renderArea.x()*2.0f-1.0f,
354 static const float quadPositions[] =
361 static const float triPositions[] =
367 static const float linePositions[] =
372 static const float pointPosition[] =
377 const float* positionSet[] = { pointPosition, linePositions, triPositions, quadPositions };
378 const int vertexCountSet[]= { 1, 2, 3, 4 };
379 const int indexCountSet[] = { 1, 2, 3, 6 };
381 const deUint16 baseIndices[] = { 0, 1, 2, 2, 1, 3 };
382 const float* basePositions = positionSet[m_primitiveType];
383 const int vertexCount = vertexCountSet[m_primitiveType];
384 const int indexCount = indexCountSet[m_primitiveType];
386 const float scale = 1.44f/deFloatSqrt(float(m_primitiveCount)*2.0f); // Magic value to roughly fill the render area with primitives at a readable density
393 const float dx = m_primitiveCount>1 ? rng.getFloat() : 0.0f;
394 const float dy = m_primitiveCount>1 ? rng.getFloat() : 0.0f;
398 const int ndx = primNdx*4*vertexCount + vertNdx*4;
426 const char* name,
427 const char* desc,
428 const Vec4& scissorArea,
435 virtual void render (GLuint program, const IVec4& viewport) const;
436 virtual bool isPoint (void) const;
439 const deUint32 m_clearMode; //!< Combination of the flags accepted by glClear
444 const char* name,
445 const char* desc,
446 const Vec4& scissorArea,
461 bool ScissorClearCase::isPoint (void) const
466 void ScissorClearCase::render (GLuint program, const IVec4&) const
468 const glw::Functions& gl = m_renderCtx.getFunctions();
469 const Vec4 white (1.0f, 1.0f, 1.0f, 1.0);
505 FramebufferBlitCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* desc, const Vec4& scissorArea);
516 virtual void render (GLuint program, const IVec4& viewport) const;
517 virtual bool isPoint (void) const;
522 FramebufferBlitCase::FramebufferBlitCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* desc, const Vec4& scissorArea)
532 const glw::Functions& gl = m_renderCtx.getFunctions();
533 const glu::Renderbuffer colorbuf (gl);
534 const tcu::Vec4 clearColor (1.0f, 0.5, 0.125f, 1.0f);
553 bool FramebufferBlitCase::isPoint (void) const
558 void FramebufferBlitCase::render(GLuint program, const IVec4& viewport) const
560 const glw::Functions& gl = m_renderCtx.getFunctions();
562 const int width = viewport.z();
563 const int height = viewport.w();
564 const deInt32 defaultFramebuffer = m_renderCtx.getDefaultFramebuffer();
596 Color(const float f_[4]) : type(FLOAT) { f[0] = f_[0]; f[1] = f_[1]; f[2] = f_[2]; f[3] = f_[3]; }
597 Color(const deInt32 i_[4]) : type(INT) { i[0] = i_[0]; i[1] = i_[1]; i[2] = i_[2]; i[3] = i_[3]; }
598 Color(const deUint32 u_[4]) : type(UINT) { u[0] = u_[0]; u[1] = u_[1]; u[2] = u_[2]; u[3] = u_[3]; }
604 FramebufferClearCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* desc, ClearType clearType);
610 static void clearBuffers (const glw::Functions& gl, Color color, float depth, int stencil);
611 static Color getBaseColor (const BufferFmtDesc& bufferFmt);
612 static Color getMainColor (const BufferFmtDesc& bufferFmt);
615 virtual void render (GLuint program) const;
616 virtual bool isPoint (void) const;
619 const ClearType m_clearType;
622 FramebufferClearCase::FramebufferClearCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* desc, ClearType clearType)
629 void FramebufferClearCase::clearBuffers (const glw::Functions& gl, Color color, float depth, int stencil)
647 const glw::Functions& gl = m_renderCtx.getFunctions();
648 const glu::ShaderProgram shader (m_renderCtx, genShaders(glu::getContextTypeGLSLVersion(m_renderCtx.getType()), isPoint()));
650 const glu::Framebuffer fbo (gl);
651 const glu::Renderbuffer colorbuf (gl);
652 const glu::Renderbuffer depthbuf (gl);
654 const BufferFmtDesc bufferFmt = getBufferFormat(m_clearType);
655 const Color baseColor = getBaseColor(bufferFmt);
657 const int width = 64;
658 const int height = 64;
660 const IVec4 scissorArea (8, 8, 48, 48);
761 Color FramebufferClearCase::getBaseColor (const BufferFmtDesc& bufferFmt)
763 const float f[4] = {0.125f, 0.25f, 0.5f, 1.0f};
764 const deInt32 i[4] = {0, 0, 0, 0};
765 const deUint32 u[4] = {0, 0, 0, 0};
779 Color FramebufferClearCase::getMainColor (const BufferFmtDesc& bufferFmt)
781 const float f[4] = {1.0f, 1.0f, 0.5f, 1.0f};
782 const deInt32 i[4] = {127, -127, 0, 127};
783 const deUint32 u[4] = {255, 255, 0, 255};
828 void FramebufferClearCase::render (GLuint program) const
830 const glw::Functions& gl = m_renderCtx.getFunctions();
832 const BufferFmtDesc bufferFmt = getBufferFormat(m_clearType);
833 const Color clearColor = getMainColor(bufferFmt);
835 const int clearStencil = 123;
836 const float clearDepth = 0.5f;
852 const bool useDepth = (m_clearType == CLEAR_DEPTH || m_clearType == CLEAR_DEPTH_STENCIL);
853 const bool useStencil = (m_clearType == CLEAR_STENCIL || m_clearType == CLEAR_DEPTH_STENCIL);
873 bool FramebufferClearCase::isPoint (void) const
885 const char* name,
886 const char* desc,
887 const Vec4& scissorArea,
888 const Vec4& renderArea,
897 const char* name,
898 const char* desc,
899 const Vec4& scissorArea,
907 const char* name,
908 const char* desc,
916 const char* name,
917 const char* desc,
918 const Vec4& scissorArea)