From 6b5105e74d12cac89bad384443dcccc1685b5a10 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Sun, 17 Nov 2024 22:50:15 -0500 Subject: [PATCH] Remove OpenGL Occlusion Functions --- media-layer/gles/src/passthrough.cpp | 20 -------- media-layer/include/GLES/gl.h | 8 ---- media-layer/trampoline/src/GLESv1_CM.cpp | 58 ------------------------ 3 files changed, 86 deletions(-) diff --git a/media-layer/gles/src/passthrough.cpp b/media-layer/gles/src/passthrough.cpp index c9935bf83a..eede57cc03 100644 --- a/media-layer/gles/src/passthrough.cpp +++ b/media-layer/gles/src/passthrough.cpp @@ -246,26 +246,6 @@ GL_FUNC(glLightModelfv, void, (GLenum pname, const GLfloat *params)) void media_glLightModelfv(const GLenum pname, const GLfloat *params) { real_glLightModelfv()(pname, params); } -GL_FUNC(glGenQueries, void, (GLsizei n, GLuint *ids)) -void media_glGenQueries(const GLsizei n, GLuint *ids) { - real_glGenQueries()(n, ids); -} -GL_FUNC(glDeleteQueries, void, (GLsizei n, const GLuint *ids)) -void media_glDeleteQueries(const GLsizei n, const GLuint *ids) { - real_glDeleteQueries()(n, ids); -} -GL_FUNC(glBeginQuery, void, (GLenum target, GLuint id)) -void media_glBeginQuery(const GLenum target, const GLuint id) { - real_glBeginQuery()(target, id); -} -GL_FUNC(glEndQuery, void, (GLenum target)) -void media_glEndQuery(const GLenum target) { - real_glEndQuery()(target); -} -GL_FUNC(glGetQueryObjectuiv, void, (GLuint id, GLenum pname, GLuint *params)) -void media_glGetQueryObjectuiv(const GLuint id, const GLenum pname, GLuint *params) { - real_glGetQueryObjectuiv()(id, pname, params); -} // GL_EXT_multi_draw_arrays GL_FUNC(glMultiDrawArraysEXT, void, (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount)) diff --git a/media-layer/include/GLES/gl.h b/media-layer/include/GLES/gl.h index c90ac886bf..aa192f3f20 100644 --- a/media-layer/include/GLES/gl.h +++ b/media-layer/include/GLES/gl.h @@ -100,9 +100,6 @@ extern "C" { #define GL_AMBIENT_AND_DIFFUSE 0x1602 #define GL_LIGHT_MODEL_AMBIENT 0xb53 #define GL_STREAM_DRAW 0x88e0 -#define GL_SAMPLES_PASSED 0x8914 -#define GL_QUERY_RESULT_AVAILABLE 0x8867 -#define GL_QUERY_RESULT 0x8866 typedef float GLfloat; typedef float GLclampf; @@ -179,11 +176,6 @@ void media_glNormalPointer(GLenum type, GLsizei stride, const void *pointer); void media_glLightfv(GLenum light, GLenum pname, const GLfloat *params); void media_glColorMaterial(GLenum face, GLenum mode); void media_glLightModelfv(GLenum pname, const GLfloat *params); -void media_glGenQueries(GLsizei n, GLuint *ids); -void media_glDeleteQueries(GLsizei n, const GLuint *ids); -void media_glBeginQuery(GLenum target, GLuint id); -void media_glEndQuery(GLenum target); -void media_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params); extern unsigned int media_context_id; diff --git a/media-layer/trampoline/src/GLESv1_CM.cpp b/media-layer/trampoline/src/GLESv1_CM.cpp index 9245c6b2d1..8af084ec18 100644 --- a/media-layer/trampoline/src/GLESv1_CM.cpp +++ b/media-layer/trampoline/src/GLESv1_CM.cpp @@ -847,62 +847,4 @@ CALL(75, media_glLightModelfv, void, (GLenum pname, const GLfloat *params)) func(pname, params); return 0; #endif -} - -CALL(78, media_glGenQueries, void, (GLsizei n, GLuint *ids)) -#ifdef MEDIA_LAYER_TRAMPOLINE_GUEST - trampoline(false, n, uint32_t(ids)); -#else - GLsizei n = args.next(); - GLuint *ids = new GLuint[n]; - func(n, ids); - writer(args.next(), ids, n * sizeof(GLuint)); - delete[] ids; - return 0; -#endif -} - -CALL(79, media_glDeleteQueries, void, (GLsizei n, const GLuint *ids)) -#ifdef MEDIA_LAYER_TRAMPOLINE_GUEST - trampoline(true, copy_array(n, ids)); -#else - uint32_t n; - const GLuint *ids = args.next_arr(&n); - func(GLsizei(n), ids); - return 0; -#endif -} - -CALL(80, media_glBeginQuery, void, (GLenum target, GLuint id)) -#ifdef MEDIA_LAYER_TRAMPOLINE_GUEST - trampoline(true, target, id); -#else - GLenum target = args.next(); - GLuint id = args.next(); - func(target, id); - return 0; -#endif -} - -CALL(81, media_glEndQuery, void, (GLenum target)) -#ifdef MEDIA_LAYER_TRAMPOLINE_GUEST - trampoline(true, target); -#else - GLenum target = args.next(); - func(target); - return 0; -#endif -} - -CALL(82, media_glGetQueryObjectuiv, void, (const GLuint id, GLenum pname, GLuint *params)) -#ifdef MEDIA_LAYER_TRAMPOLINE_GUEST - trampoline(false, id, pname, uint32_t(params)); -#else - GLuint id = args.next(); - GLenum pname = args.next(); - GLuint out; - func(id, pname, &out); - writer(args.next(), &out, sizeof(GLuint)); - return 0; -#endif } \ No newline at end of file