Home
last modified time | relevance | path

Searched refs:gl (Results 1 – 25 of 160) sorted by relevance

1234567

/hardware/google/gfxstream/host/tests/
DGLSnapshotTestStateUtils.cpp26 namespace gl { namespace
28 GLuint createBuffer(const GLESv2Dispatch* gl, GlBufferData data) { in createBuffer() argument
32 gl->glGetIntegerv(GL_ARRAY_BUFFER_BINDING, (GLint*)&currentArrayBuffer); in createBuffer()
33 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in createBuffer()
36 gl->glGenBuffers(1, &name); in createBuffer()
37 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in createBuffer()
39 gl->glBindBuffer(GL_ARRAY_BUFFER, name); in createBuffer()
40 gl->glBufferData(GL_ARRAY_BUFFER, data.size, data.bytes, data.usage); in createBuffer()
43 gl->glBindBuffer(GL_ARRAY_BUFFER, currentArrayBuffer); in createBuffer()
44 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in createBuffer()
[all …]
DGLSnapshotFramebuffers_unittest.cpp23 namespace gl { namespace
40 EXPECT_EQ(GL_FALSE, gl->glIsFramebuffer(m_framebuffer_name)); in defaultStateCheck()
41 EXPECT_TRUE(compareGlobalGlInt(gl, GL_FRAMEBUFFER_BINDING, 0)); in defaultStateCheck()
45 EXPECT_EQ(GL_TRUE, gl->glIsFramebuffer(m_framebuffer_name)); in changedStateCheck()
46 EXPECT_TRUE(compareGlobalGlInt(gl, GL_FRAMEBUFFER_BINDING, in changedStateCheck()
51 gl->glGetIntegerv(GL_FRAMEBUFFER_BINDING, &currentBind); in changedStateCheck()
52 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in changedStateCheck()
59 gl->glBindFramebuffer(GL_FRAMEBUFFER, m_framebuffer_name); in changedStateCheck()
60 gl->glGetFramebufferAttachmentParameteriv( in changedStateCheck()
64 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in changedStateCheck()
[all …]
DHelloTriangleImp.cpp58 auto gl = getGlDispatch(); in initialize() local
60 mTransformLoc = gl->glGetUniformLocation(program, "transform"); in initialize()
62 gl->glEnableVertexAttribArray(0); in initialize()
63 gl->glEnableVertexAttribArray(1); in initialize()
71 gl->glGenBuffers(1, &mBuffer); in initialize()
72 gl->glBindBuffer(GL_ARRAY_BUFFER, mBuffer); in initialize()
73 gl->glBufferData(GL_ARRAY_BUFFER, sizeof(vertexAttrs), vertexAttrs, in initialize()
76 gl->glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, in initialize()
78 gl->glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, in initialize()
82 gl->glUseProgram(program); in initialize()
[all …]
DShaderUtils.cpp45 auto gl = gl::LazyLoadedGLESv2Dispatch::get(); in compileShader() local
47 GLuint shader = gl->glCreateShader(shaderType); in compileShader()
48 gl->glShaderSource(shader, 1, (const GLchar* const*)&src, nullptr); in compileShader()
49 gl->glCompileShader(shader); in compileShader()
52 gl->glGetShaderiv(shader, GL_COMPILE_STATUS, &compileStatus); in compileShader()
56 gl->glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLogLength); in compileShader()
58 gl->glGetShaderInfoLog(shader, infoLogLength, nullptr, &infoLog[0]); in compileShader()
66 auto gl = gl::LazyLoadedGLESv2Dispatch::get(); in compileAndLinkShaderProgram() local
71 GLuint program = gl->glCreateProgram(); in compileAndLinkShaderProgram()
72 gl->glAttachShader(program, vshader); in compileAndLinkShaderProgram()
[all …]
DTextureDraw_unittest.cpp22 namespace gl { namespace
25 void TestTextureDrawBasic(const GLESv2Dispatch* gl, GLenum internalformat, in TestTextureDrawBasic() argument
28 gl->glGetIntegerv(GL_VIEWPORT, viewport); in TestTextureDrawBasic()
39 gl->glGenTextures(1, &textureToDraw); in TestTextureDrawBasic()
40 gl->glActiveTexture(GL_TEXTURE0); in TestTextureDrawBasic()
41 gl->glBindTexture(GL_TEXTURE_2D, textureToDraw); in TestTextureDrawBasic()
43 gl->glPixelStorei(GL_PACK_ALIGNMENT, 1); in TestTextureDrawBasic()
44 gl->glPixelStorei(GL_UNPACK_ALIGNMENT, 1); in TestTextureDrawBasic()
45 gl->glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); in TestTextureDrawBasic()
58 GLenum err = gl->glGetError(); in TestTextureDrawBasic()
[all …]
DGLSnapshotPrograms_unittest.cpp24 namespace gl { namespace
88 EXPECT_EQ(GL_FALSE, gl->glIsProgram(m_program_name)); in defaultStateCheck()
89 EXPECT_TRUE(compareGlobalGlInt(gl, GL_CURRENT_PROGRAM, 0)); in defaultStateCheck()
94 EXPECT_EQ(GL_TRUE, gl->glIsProgram(m_program_name)); in changedStateCheck()
96 compareGlobalGlInt(gl, GL_CURRENT_PROGRAM, m_current_program)); in changedStateCheck()
167 m_program_name = gl->glCreateProgram(); in stateChange()
179 gl->glUseProgram(m_program_name); in useProgram()
180 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in useProgram()
187 if (GL_FALSE == gl->glIsProgram(m_program_name)) { in getProgramState()
194 gl->glGetProgramiv(m_program_name, GL_INFO_LOG_LENGTH, &logLength); in getProgramState()
[all …]
DGLSnapshotFramebufferControl_unittest.cpp20 namespace gl { namespace
26 EXPECT_TRUE(compareGlobalGlBooleanv(gl, GL_COLOR_WRITEMASK, expected)); in stateCheck()
30 gl->glColorMask(mask[0], mask[1], mask[2], mask[3]); in stateChange()
41 EXPECT_TRUE(compareGlobalGlBoolean(gl, GL_DEPTH_WRITEMASK, expected)); in stateCheck()
43 void stateChange() override { gl->glDepthMask(*m_changed_value); } in stateChange()
54 EXPECT_TRUE(compareGlobalGlInt(gl, GL_STENCIL_WRITEMASK, expected)); in stateCheck()
56 compareGlobalGlInt(gl, GL_STENCIL_BACK_WRITEMASK, expected)); in stateCheck()
58 void stateChange() override { gl->glStencilMask(*m_changed_value); } in stateChange()
64 gl->glGetIntegerv(GL_STENCIL_WRITEMASK, &defaultWriteMask); in TEST_F()
65 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in TEST_F()
[all …]
DDefaultFramebufferBlit_unittest.cpp25 using gl::GLESApi;
26 using gl::GLESApi_2;
27 using gl::GLESApi_3_0;
28 using gl::GLESApi_3_1;
29 using gl::GLESApi_3_2;
30 using gl::GLESApi_CM;
31 using gl::LazyLoadedEGLDispatch;
32 using gl::LazyLoadedGLESv2Dispatch;
73 auto gl = LazyLoadedGLESv2Dispatch::get(); in ~ClearColor() local
75 gl->glDeleteFramebuffers(1, &mFbo); in ~ClearColor()
[all …]
DGLSnapshotTextures_unittest.cpp22 namespace gl { namespace
185 EXPECT_TRUE(compareGlobalGlInt(gl, GL_ACTIVE_TEXTURE, GL_TEXTURE0)); in defaultStateCheck()
189 EXPECT_TRUE(compareGlobalGlInt(gl, GL_ACTIVE_TEXTURE, in changedStateCheck()
194 gl->glActiveTexture(GL_TEXTURE0 + m_active_texture_unit); in stateChange()
199 gl->glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, in useTextureUnit()
201 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in useTextureUnit()
227 gl->glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, in defaultStateCheck()
230 gl->glActiveTexture(GL_TEXTURE0 + i); in defaultStateCheck()
231 EXPECT_TRUE(compareGlobalGlInt(gl, GL_TEXTURE_BINDING_2D, 0)); in defaultStateCheck()
232 EXPECT_TRUE(compareGlobalGlInt(gl, GL_TEXTURE_BINDING_CUBE_MAP, 0)); in defaultStateCheck()
[all …]
DGLSnapshotPixelOperations_unittest.cpp22 namespace gl { namespace
104 EXPECT_TRUE(compareGlobalGlIntv(gl, GL_SCISSOR_BOX, expected)); in stateCheck()
107 gl->glScissor(GetParam()[0], GetParam()[1], GetParam()[2], in stateChange()
116 gl->glGetIntegerv(GL_SCISSOR_BOX, &defaultBox[0]); in TEST_P()
117 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in TEST_P()
131 EXPECT_TRUE(compareGlobalGlInt(gl, GL_STENCIL_FUNC, expected.func)); in stateCheck()
132 EXPECT_TRUE(compareGlobalGlInt(gl, GL_STENCIL_REF, expected.ref)); in stateCheck()
134 compareGlobalGlInt(gl, GL_STENCIL_VALUE_MASK, expected.mask)); in stateCheck()
136 compareGlobalGlInt(gl, GL_STENCIL_BACK_FUNC, expected.func)); in stateCheck()
137 EXPECT_TRUE(compareGlobalGlInt(gl, GL_STENCIL_BACK_REF, expected.ref)); in stateCheck()
[all …]
DGLSnapshotBuffers_unittest.cpp24 namespace gl { namespace
35 EXPECT_TRUE(compareGlobalGlInt(gl, bindTarget, 0)) in defaultStateCheck()
39 EXPECT_EQ(GL_FALSE, gl->glIsBuffer(it.first)) in defaultStateCheck()
59 EXPECT_TRUE(compareGlobalGlInt(gl, boundTarget, it.second)) in changedStateCheck()
75 GLuint name = createBuffer(gl, data); in addBuffer()
83 gl->glBindBuffer(binding, buffer); in bindBuffer()
84 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in bindBuffer()
96 EXPECT_EQ(GL_TRUE, gl->glIsBuffer(name)); in checkBufferData()
101 gl->glGetIntegerv(GL_ARRAY_BUFFER_BINDING, (GLint*)&currentArrayBuffer); in checkBufferData()
102 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in checkBufferData()
[all …]
DGLSnapshotVertexAttributes_unittest.cpp24 namespace gl { namespace
67 gl->glEnableVertexAttribArray(m_index); in stateChange()
69 gl->glDisableVertexAttribArray(m_index); in stateChange()
71 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in stateChange()
76 gl->glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxAttribs); in selectIndex()
77 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in selectIndex()
99 gl->glGetVertexAttribfv(m_index, paramName, &(values[0])); in compareFloatParameter()
100 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in compareFloatParameter()
118 gl->glGetVertexAttribiv(m_index, paramName, &(values[0])); in compareIntParameter()
119 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in compareIntParameter()
[all …]
DGLSnapshotRasterization_unittest.cpp21 namespace gl { namespace
31 gl->glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, lineWidthRange); in stateCheck()
34 gl->glGetFloatv(GL_LINE_WIDTH, &lineWidth); in stateCheck()
40 void stateChange() override { gl->glLineWidth(GetParam()); } in stateChange()
55 EXPECT_TRUE(compareGlobalGlInt(gl, GL_CULL_FACE_MODE, expected)); in stateCheck()
57 void stateChange() override { gl->glCullFace(GetParam()); } in stateChange()
72 EXPECT_TRUE(compareGlobalGlInt(gl, GL_FRONT_FACE, expected)); in stateCheck()
74 void stateChange() override { gl->glFrontFace(GetParam()); } in stateChange()
89 EXPECT_TRUE(compareGlobalGlFloat(gl, GL_POLYGON_OFFSET_FACTOR, in stateCheck()
92 compareGlobalGlFloat(gl, GL_POLYGON_OFFSET_UNITS, expected[1])); in stateCheck()
[all …]
DGLSnapshot_unittest.cpp21 namespace gl { namespace
29 EXPECT_FALSE(gl->glIsEnabled(GetParam())); in defaultStateCheck()
32 EXPECT_TRUE(gl->glIsEnabled(GetParam())); in changedStateCheck()
34 void stateChange() override { gl->glEnable(GetParam()); } in stateChange()
48 EXPECT_TRUE(gl->glIsEnabled(GetParam())); in defaultStateCheck()
51 EXPECT_FALSE(gl->glIsEnabled(GetParam())); in changedStateCheck()
53 void stateChange() override { gl->glDisable(GetParam()); } in stateChange()
67 EXPECT_TRUE(compareGlobalGlInt(gl, GL_GENERATE_MIPMAP_HINT, expected)); in stateCheck()
70 gl->glHint(GL_GENERATE_MIPMAP_HINT, *m_changed_value); in stateChange()
DGLSnapshotRenderbuffers_unittest.cpp20 namespace gl { namespace
64 EXPECT_EQ(GL_FALSE, gl->glIsRenderbuffer(m_renderbuffer_name)); in defaultStateCheck()
65 EXPECT_TRUE(compareGlobalGlInt(gl, GL_RENDERBUFFER_BINDING, 0)); in defaultStateCheck()
69 EXPECT_EQ(GL_TRUE, gl->glIsRenderbuffer(m_renderbuffer_name)); in changedStateCheck()
70 EXPECT_TRUE(compareGlobalGlInt(gl, GL_RENDERBUFFER_BINDING, in changedStateCheck()
92 gl->glGenRenderbuffers(1, &m_renderbuffer_name); in stateChange()
93 gl->glBindRenderbuffer(GL_RENDERBUFFER, m_renderbuffer_name); in stateChange()
105 gl->glGetRenderbufferParameteriv(GL_RENDERBUFFER, name, &actual); in compareParameter()
121 = reinterpret_cast<const char*>(gl->glGetString(GL_RENDERER)); in TEST_F()
137 gl->glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &maxSize); in TEST_P()
[all …]
DGLSnapshotTesting.cpp33 namespace gl { namespace
69 testing::AssertionResult compareGlobalGlBoolean(const GLESv2Dispatch* gl, in compareGlobalGlBoolean() argument
73 gl->glGetBooleanv(name, &current); in compareGlobalGlBoolean()
74 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in compareGlobalGlBoolean()
80 testing::AssertionResult compareGlobalGlInt(const GLESv2Dispatch* gl, in compareGlobalGlInt() argument
84 gl->glGetIntegerv(name, &current); in compareGlobalGlInt()
85 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in compareGlobalGlInt()
91 testing::AssertionResult compareGlobalGlInt_i(const GLESv2Dispatch* gl, in compareGlobalGlInt_i() argument
96 gl->glGetIntegeri_v(name, index, &current); in compareGlobalGlInt_i()
97 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in compareGlobalGlInt_i()
[all …]
DGLSnapshotShaders_unittest.cpp22 namespace gl { namespace
69 EXPECT_EQ(GL_FALSE, gl->glIsShader(m_shader_name)); in defaultStateCheck()
87 gl->glGetShaderSource(m_shader_name, m_shader_state.sourceLength, in changedStateCheck()
97 gl->glGetShaderInfoLog(m_shader_name, m_shader_state.infoLogLength, in changedStateCheck()
107 m_shader_name = gl->glCreateShader(m_shader_state.type); in stateChange()
111 gl->glGetShaderiv(m_shader_name, GL_INFO_LOG_LENGTH, in stateChange()
114 gl->glGetShaderInfoLog(m_shader_name, m_shader_state.infoLogLength, in stateChange()
120 gl->glGetBooleanv(GL_SHADER_COMPILER, &compiler); in loadSource()
121 EXPECT_EQ(GL_NO_ERROR, gl->glGetError()); in loadSource()
138 gl->glShaderSource(m_shader_name, 1, sources, &len); in loadSource()
[all …]
/hardware/google/gfxstream/host/gl/glestranslator/GLES_CM/
DCoreProfileEngine.cpp62 GLDispatch& gl = GLEScontext::dispatcher(); in getDrawTexOESCoreState() local
64 gl.glGenVertexArrays(1, &m_drawTexOESCoreState.vao); in getDrawTexOESCoreState()
65 gl.glBindVertexArray(m_drawTexOESCoreState.vao); in getDrawTexOESCoreState()
69 gl.glGenBuffers(1, &m_drawTexOESCoreState.ibo); in getDrawTexOESCoreState()
70 gl.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_drawTexOESCoreState.ibo); in getDrawTexOESCoreState()
71 gl.glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(sDrawTexIbo), sDrawTexIbo, GL_STATIC_DRAW); in getDrawTexOESCoreState()
73 gl.glGenBuffers(1, &m_drawTexOESCoreState.vbo); in getDrawTexOESCoreState()
74 gl.glBindBuffer(GL_ARRAY_BUFFER, m_drawTexOESCoreState.vbo); in getDrawTexOESCoreState()
76 gl.glEnableVertexAttribArray(0); // pos in getDrawTexOESCoreState()
77 gl.glEnableVertexAttribArray(1); // texcoord in getDrawTexOESCoreState()
[all …]
/hardware/google/gfxstream/host/gl/glestranslator/GLcommon/
DScopedGLState.cpp28 auto& gl = GLEScontext::dispatcher(); in push() local
42 gl.glGetIntegerv(name, v.intData); in push()
45 gl.glGetFloatv(name, v.floatData); in push()
57 v.intData[0] = gl.glIsEnabled(name); in push()
96 auto& gl = GLEScontext::dispatcher(); in ~ScopedGLState() local
103 gl.glBindFramebuffer(GL_DRAW_FRAMEBUFFER, v.intData[0]); in ~ScopedGLState()
105 gl.glBindFramebuffer(GL_READ_FRAMEBUFFER, v.intData[0]); in ~ScopedGLState()
108 gl.glUseProgram(v.intData[0]); in ~ScopedGLState()
111 gl.glBindVertexArray(v.intData[0]); in ~ScopedGLState()
114 gl.glBindBuffer(GL_ARRAY_BUFFER, v.intData[0]); in ~ScopedGLState()
[all …]
DGLEScontext.cpp579 auto& gl = dispatcher(); in ~GLEScontext() local
582 gl.glDeleteProgram(m_blitState.program); in ~GLEScontext()
583 gl.glDeleteTextures(1, &m_blitState.tex); in ~GLEScontext()
584 gl.glDeleteVertexArrays(1, &m_blitState.vao); in ~GLEScontext()
585 gl.glDeleteBuffers(1, &m_blitState.vbo); in ~GLEScontext()
586 gl.glDeleteFramebuffers(1, &m_blitState.fbo); in ~GLEScontext()
590 gl.glDeleteProgram(m_textureEmulationProg); in ~GLEScontext()
591 gl.glDeleteTextures(2, m_textureEmulationTextures); in ~GLEScontext()
592 gl.glDeleteFramebuffers(1, &m_textureEmulationFBO); in ~GLEScontext()
593 gl.glDeleteVertexArrays(1, &m_textureEmulationVAO); in ~GLEScontext()
[all …]
/hardware/google/gfxstream/host/gl/gl-host-common/
DCMakeLists.txt4 if (NOT TARGET gfxstream-gl-host-common)
5 add_library(gfxstream-gl-host-common.headers INTERFACE)
7 gfxstream-gl-host-common.headers
10 gfxstream-gl-host-common.headers
19 set(gl-host-common-opengles-platform-sources
23 set(gl-host-common-opengles-platform-sources
26 set(gl-host-common-opengles-platform-sources
32 gfxstream-gl-host-common
52 ${gl-host-common-opengles-platform-sources}
55 gfxstream-gl-host-common
[all …]
/hardware/google/gfxstream/host/gl/
DBUILD.bazel18 name = "gfxstream-gl-host-common-darwin",
20 "gl-host-common/opengl/macTouchOpenGL.m",
22 hdrs = ["gl-host-common/include/host-common/opengl/macTouchOpenGL.h"],
24 includes = ["gl-host-common/include"],
26 "//hardware/google/gfxstream:gfxstream-gl-host-common-headers",
31 name = "gl-common-headers",
52 "//hardware/google/gfxstream:gfxstream-gl-host-common-headers",
100 ":gl-common-headers",
103 "//hardware/google/gfxstream:gfxstream-gl-host-common-headers",
107 "//hardware/google/gfxstream/host/gl:gfxstream-gl-host-common",
[all …]
DCMakeLists.txt1 add_subdirectory(gl-host-common)
14 add_library(gfxstream-gl-server
34 gfxstream-gl-server
38 gfxstream-gl-host-common.headers
48 gfxstream-gl-server
50 gfxstream-gl-host-common)
53 target_include_directories(gfxstream-gl-server
59 ${GFXSTREAM_REPO_ROOT}/host/gl
/hardware/google/gfxstream/host/
DBUILD.bazel14 "gl/*.h",
63 "//hardware/google/gfxstream:gfxstream-gl-host-common-headers",
118 "gl",
129 "//hardware/google/gfxstream:gfxstream-gl-host-common-headers",
132 "//hardware/google/gfxstream/host/gl:EGL_translator_static",
133 "//hardware/google/gfxstream/host/gl:OpenGLESDispatch",
134 "//hardware/google/gfxstream/host/gl:gfxstream-gl-host-common",
135 "//hardware/google/gfxstream/host/gl:gfxstream-gl-server",
136 "//hardware/google/gfxstream/host/gl:gl-common-headers",
137 "//hardware/google/gfxstream/host/gl:gl_headers",
[all …]
/hardware/google/gfxstream/scripts/
Dgenerate-apigen-sources.sh4 cp -f codegen/gles1/gles1.attrib codegen/gles1/gl.attrib
5 cp -f codegen/gles1/gles1.in codegen/gles1/gl.in
6 cp -f codegen/gles1/gles1.types codegen/gles1/gl.types
7 ./build/gfxstream-generic-apigen -i ./codegen/gles1 -D ./host/gl/gles1_dec gles1
8 ./build/gfxstream-generic-apigen -i ./codegen/gles1 -E ./guest/GLESv1_enc gl
9 rm codegen/gles1/gl.attrib
10 rm codegen/gles1/gl.in
11 rm codegen/gles1/gl.types
16 ./build/gfxstream-generic-apigen -i ./codegen/gles2 -D ./host/gl/gles2_dec gles2

1234567