Path: blob/main_old/src/tests/test_utils/draw_call_perf_utils.h
1693 views
//1// Copyright 2017 The ANGLE Project Authors. All rights reserved.2// Use of this source code is governed by a BSD-style license that can be3// found in the LICENSE file.4//5// draw_call_perf_utils.h:6// Common utilities for performance tests that need to do a large amount of draw calls.7//89#ifndef TESTS_TEST_UTILS_DRAW_CALL_PERF_UTILS_H_10#define TESTS_TEST_UTILS_DRAW_CALL_PERF_UTILS_H_1112#include <stddef.h>1314#include "util/gles_loader_autogen.h"1516// Returns program ID. The program is left in use, no uniforms.17GLuint SetupSimpleDrawProgram();1819// Returns program ID. Uses a 2D texture.20GLuint SetupSimpleTextureProgram();2122// Returns program ID. Uses two 2D textures.23GLuint SetupDoubleTextureProgram();2425// Returns program ID. The program is left in use and the uniforms are set to default values:26// uScale = 0.5, uOffset = -0.527GLuint SetupSimpleScaleAndOffsetProgram();2829// Returns buffer ID filled with 2-component triangle coordinates. The buffer is left as bound.30// Generates triangles like this with 2-component coordinates:31// A32// / \.33// / \.34// B-----C35GLuint Create2DTriangleBuffer(size_t numTris, GLenum usage);3637// Creates an FBO with a texture color attachment. The texture is GL_RGBA and has dimensions38// width/height. The FBO and texture ids are written to the out parameters.39void CreateColorFBO(GLsizei width, GLsizei height, GLuint *fbo, GLuint *texture);4041#endif // TESTS_TEST_UTILS_DRAW_CALL_PERF_UTILS_H_424344