summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2014-05-11 20:19:59 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2014-05-11 20:24:22 +0100
commitc5d4c907b62328f0b74d4a1437ea61c6b743f44b (patch)
tree472354db780bc2f732f147ca5eea51c7d589702e
parenta846e97c00763977d15e2785eeca1a73f66d3df3 (diff)
Since the applegl libGL is now built by linking libappleglx into libGL, rather than a standalone libGL with picked files, remove duplicate code in apple/glxreply.c and apple/apple_glx.c. This makes apple/glxreply.c empty, so remove it. glapi_gentable.c should be included in shared glapi as well
-rw-r--r--src/glx/apple/Makefile.am3
-rw-r--r--src/glx/apple/apple_glapi.c2
-rw-r--r--src/glx/apple/apple_glx.c2
-rw-r--r--src/glx/apple/glxreply.c135
-rw-r--r--src/mapi/glapi/Makefile.am2
5 files changed, 3 insertions, 141 deletions
diff --git a/src/glx/apple/Makefile.am b/src/glx/apple/Makefile.am
index 669bce6216..2839bae198 100644
--- a/src/glx/apple/Makefile.am
+++ b/src/glx/apple/Makefile.am
@@ -26,7 +26,6 @@ libappleglx_la_SOURCES = \
apple_xgl_api_stereo.c \
apple_xgl_api_viewport.c \
appledri.c \
- glx_empty.c \
- glxreply.c
+ glx_empty.c
libappleglx_la_LDFLAGS = -lXplugin -framework ApplicationServices -framework CoreFoundation
diff --git a/src/glx/apple/apple_glapi.c b/src/glx/apple/apple_glapi.c
index 4d19f7f6a3..dda805dbb0 100644
--- a/src/glx/apple/apple_glapi.c
+++ b/src/glx/apple/apple_glapi.c
@@ -65,7 +65,7 @@ static void _apple_glapi_create_table(void) {
SET_CopyPixels(__applegl_api, __applegl_glCopyPixels);
SET_CopyColorTable(__applegl_api, __applegl_glCopyColorTable);
SET_DrawBuffer(__applegl_api, __applegl_glDrawBuffer);
- SET_DrawBuffers(__applegl_api, __applegl_glDrawBuffers);
+// SET_DrawBuffers(__applegl_api, __applegl_glDrawBuffers);
SET_Viewport(__applegl_api, __applegl_glViewport);
}
diff --git a/src/glx/apple/apple_glx.c b/src/glx/apple/apple_glx.c
index 4e2aa33e59..3b57088257 100644
--- a/src/glx/apple/apple_glx.c
+++ b/src/glx/apple/apple_glx.c
@@ -43,8 +43,6 @@
static bool initialized = false;
static int dri_event_base = 0;
-const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
-
int
apple_get_dri_event_base(void)
{
diff --git a/src/glx/apple/glxreply.c b/src/glx/apple/glxreply.c
deleted file mode 100644
index c9ac046161..0000000000
--- a/src/glx/apple/glxreply.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * (C) Copyright Apple Inc. 2008
- * (C) Copyright IBM Corporation 2004, 2005
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sub license,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * IBM,
- * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include <GL/gl.h>
-#include "glxclient.h"
-#include <GL/glxproto.h>
-#include "indirect.h"
-
-CARD32
-__glXReadReply(Display * dpy, size_t size, void *dest,
- GLboolean reply_is_always_array)
-{
- xGLXSingleReply reply;
-
- (void) _XReply(dpy, (xReply *) & reply, 0, False);
- if (size != 0) {
- if ((reply.length > 0) || reply_is_always_array) {
- const GLint bytes = (reply_is_always_array)
- ? (4 * reply.length) : (reply.size * size);
- const GLint extra = 4 - (bytes & 3);
-
- _XRead(dpy, dest, bytes);
- if (extra < 4) {
- _XEatData(dpy, extra);
- }
- }
- else {
- (void) memcpy(dest, &(reply.pad3), size);
- }
- }
-
- return reply.retval;
-}
-
-void
-__glXReadPixelReply(Display * dpy, struct glx_context * gc, unsigned max_dim,
- GLint width, GLint height, GLint depth, GLenum format,
- GLenum type, void *dest, GLboolean dimensions_in_reply)
-{
- xGLXSingleReply reply;
- GLint size;
-
- (void) _XReply(dpy, (xReply *) & reply, 0, False);
-
- if (dimensions_in_reply) {
- width = reply.pad3;
- height = reply.pad4;
- depth = reply.pad5;
-
- if ((height == 0) || (max_dim < 2)) {
- height = 1;
- }
- if ((depth == 0) || (max_dim < 3)) {
- depth = 1;
- }
- }
-
- size = reply.length * 4;
- if (size != 0) {
- void *buf = malloc(size);
-
- if (buf == NULL) {
- _XEatData(dpy, size);
- __glXSetError(gc, GL_OUT_OF_MEMORY);
- }
- else {
- const GLint extra = 4 - (size & 3);
-
- _XRead(dpy, buf, size);
- if (extra < 4) {
- _XEatData(dpy, extra);
- }
-
- __glEmptyImage(gc, 3, width, height, depth, format, type, buf, dest);
- free(buf);
- }
- }
-}
-
-#if 0
-GLubyte *
-__glXSetupSingleRequest(struct glx_context * gc, GLint sop, GLint cmdlen)
-{
- xGLXSingleReq *req;
- Display *const dpy = gc->currentDpy;
-
- (void) __glXFlushRenderBuffer(gc, gc->pc);
- LockDisplay(dpy);
- GetReqExtra(GLXSingle, cmdlen, req);
- req->reqType = gc->majorOpcode;
- req->contextTag = gc->currentContextTag;
- req->glxCode = sop;
- return (GLubyte *) (req) + sz_xGLXSingleReq;
-}
-#endif
-
-GLubyte *
-__glXSetupVendorRequest(struct glx_context * gc, GLint code, GLint vop,
- GLint cmdlen)
-{
- xGLXVendorPrivateReq *req;
- Display *const dpy = gc->currentDpy;
-
- (void) __glXFlushRenderBuffer(gc, gc->pc);
- LockDisplay(dpy);
- GetReqExtra(GLXVendorPrivate, cmdlen, req);
- req->reqType = gc->majorOpcode;
- req->glxCode = code;
- req->vendorCode = vop;
- req->contextTag = gc->currentContextTag;
- return (GLubyte *) (req) + sz_xGLXVendorPrivateReq;
-}
diff --git a/src/mapi/glapi/Makefile.am b/src/mapi/glapi/Makefile.am
index e425baceac..be12ce7fcd 100644
--- a/src/mapi/glapi/Makefile.am
+++ b/src/mapi/glapi/Makefile.am
@@ -48,7 +48,7 @@ if HAVE_SHARED_GLAPI
AM_CPPFLAGS += \
-DMAPI_MODE_BRIDGE \
-DMAPI_ABI_HEADER=\"glapi/glapi_mapi_tmp.h\"
-glapi_GLAPI_sources =
+glapi_GLAPI_sources = glapi_gentable.c
glapi_ASM_sources =
glapi_MAPI_sources = $(MAPI_BRIDGE_FILES)
else