~ubuntu-branches/ubuntu/edgy/xorg-server/edgy-updates

« back to all changes in this revision

Viewing changes to GL/glx/single2swap.c

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Parra Novo
  • Date: 2006-07-25 20:06:28 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060725200628-gjmmd9gxfxdc4ejs
Tags: 1:1.1.1-0ubuntu1
* New Upstream version
* Changed Build-Depends from mesa-swrast-source to mesa-swx11-source,
  following Debian package nomenclature
* Re-did 12_security_policy_in_etc.diff for 1.1.1
* Dropped 15_security_allocate_local.diff (applied upstream)
* Dropped 16_SECURITY_setuid.diff (applied upstream)
* Dropped 000_ubuntu_fix_read_kernel_mapping.patch (applied upstream)
* Dropped 002_ubuntu_fix_for_certain_intel_chipsets.patch (applied upstream)
* Updated versioned Build-Depends on mesa-swx11-source to version
  6.5.0.cvs.20060725-0ubuntu1
* Added arrayobj.c, arrayobj.h, bitset.h & rbadaptors.h to
  GL/symlink-mesa.sh (linked from mesa-swx11-source)
* Added arrayobj.c to default build target on GL/mesa/main

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
#include "glxserver.h"
43
43
#include "glxutil.h"
44
44
#include "glxext.h"
 
45
#include "indirect_dispatch.h"
45
46
#include "unpack.h"
46
 
#include "g_disptab.h"
47
 
#include "GL/glx_ansic.h"
 
47
#include "glapitable.h"
 
48
#include "glapi.h"
 
49
#include "glthread.h"
 
50
#include "dispatch.h"
48
51
 
49
52
int __glXDispSwap_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc)
50
53
{
66
69
    size = *(GLsizei *)(pc+0);
67
70
    type = *(GLenum *)(pc+4);
68
71
    if (cx->feedbackBufSize < size) {
69
 
        cx->feedbackBuf = (GLfloat *) __glXRealloc(cx->feedbackBuf,
 
72
        cx->feedbackBuf = (GLfloat *) xrealloc(cx->feedbackBuf,
70
73
                                                   (size_t) size 
71
74
                                                   * __GLX_SIZE_FLOAT32);
72
75
        if (!cx->feedbackBuf) {
75
78
        }
76
79
        cx->feedbackBufSize = size;
77
80
    }
78
 
    glFeedbackBuffer(size, type, cx->feedbackBuf);
 
81
    CALL_FeedbackBuffer( GET_DISPATCH(), (size, type, cx->feedbackBuf) );
79
82
    __GLX_NOTE_UNFLUSHED_CMDS(cx);
80
83
    return Success;
81
84
}
97
100
    __GLX_SWAP_INT(pc+0);
98
101
    size = *(GLsizei *)(pc+0);
99
102
    if (cx->selectBufSize < size) {
100
 
        cx->selectBuf = (GLuint *) __glXRealloc(cx->selectBuf,
 
103
        cx->selectBuf = (GLuint *) xrealloc(cx->selectBuf,
101
104
                                                (size_t) size 
102
105
                                                * __GLX_SIZE_CARD32);
103
106
        if (!cx->selectBuf) {
106
109
        }
107
110
        cx->selectBufSize = size;
108
111
    }
109
 
    glSelectBuffer(size, cx->selectBuf);
 
112
    CALL_SelectBuffer( GET_DISPATCH(), (size, cx->selectBuf) );
110
113
    __GLX_NOTE_UNFLUSHED_CMDS(cx);
111
114
    return Success;
112
115
}
132
135
    pc += __GLX_SINGLE_HDR_SIZE;
133
136
    __GLX_SWAP_INT(pc);
134
137
    newMode = *(GLenum*) pc;
135
 
    retval = glRenderMode(newMode);
 
138
    retval = CALL_RenderMode( GET_DISPATCH(), (newMode) );
136
139
 
137
140
    /* Check that render mode worked */
138
 
    glGetIntegerv(GL_RENDER_MODE, &newModeCheck);
 
141
    CALL_GetIntegerv( GET_DISPATCH(), (GL_RENDER_MODE, &newModeCheck) );
139
142
    if (newModeCheck != newMode) {
140
143
        /* Render mode change failed.  Bail */
141
144
        newMode = newModeCheck;
232
235
                return error;
233
236
        }
234
237
 
235
 
        glFlush();
 
238
        CALL_Flush( GET_DISPATCH(), () );
236
239
        __GLX_NOTE_FLUSHED_CMDS(cx);
237
240
        return Success;
238
241
}
251
254
    }
252
255
 
253
256
    /* Do a local glFinish */
254
 
    glFinish();
 
257
    CALL_Finish( GET_DISPATCH(), () );
255
258
    __GLX_NOTE_FLUSHED_CMDS(cx);
256
259
 
257
260
    /* Send empty reply packet to indicate finish is finished */
268
271
{
269
272
    return DoGetString(cl, pc, GL_TRUE);
270
273
}
271
 
 
272
 
int __glXDispSwap_GetClipPlane(__GLXclientState *cl, GLbyte *pc)
273
 
{
274
 
    __GLXcontext *cx;
275
 
    ClientPtr client = cl->client;
276
 
    int error;
277
 
    GLdouble answer[4];
278
 
    __GLX_DECLARE_SWAP_VARIABLES;
279
 
    __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
280
 
 
281
 
    __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag);
282
 
    cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
283
 
    if (!cx) {
284
 
        return error;
285
 
    }
286
 
    pc += __GLX_SINGLE_HDR_SIZE;
287
 
    __GLX_SWAP_INT(pc + 0);
288
 
 
289
 
    __glXClearErrorOccured();
290
 
    glGetClipPlane(*(GLenum   *)(pc + 0), answer);
291
 
    if (__glXErrorOccured()) {
292
 
        __GLX_BEGIN_REPLY(0);
293
 
        __GLX_SWAP_REPLY_HEADER();
294
 
        __GLX_SEND_HEADER();
295
 
    } else {
296
 
        __GLX_SWAP_DOUBLE_ARRAY((GLbyte *)answer, 4);
297
 
        __GLX_BEGIN_REPLY(32);
298
 
        __GLX_SWAP_REPLY_HEADER();
299
 
        __GLX_SEND_HEADER();
300
 
        __GLX_SEND_DOUBLE_ARRAY(4);
301
 
    }
302
 
    return Success;
303
 
}