~ubuntu-branches/ubuntu/quantal/virtualbox/quantal

« back to all changes in this revision

Viewing changes to src/VBox/HostServices/SharedOpenGL/crserverlib/server_getshaders.c

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2012-04-05 12:41:55 UTC
  • mfrom: (3.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20120405124155-i7b39tv5ddwhubbe
Tags: 4.1.12-dfsg-2
* Upstream has replaced the 4.1.12 tarball with a new one that fixes a
  crash when creating host only interfaces. (Closes: #667460)
  - Add 36-tarball-respin.patch which contains the diff between the old
    and the new tarball.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include "server_dispatch.h"
25
25
#include "server.h"
26
26
 
 
27
#include <iprt/assert.h>
 
28
 
27
29
#ifdef CR_OPENGL_VERSION_2_0
28
30
 
29
31
typedef struct _crGetActive_t
113
115
    crFree(pLocal);
114
116
}
115
117
 
 
118
AssertCompile(sizeof(GLsizei) == 4);
 
119
 
116
120
void SERVER_DISPATCH_APIENTRY crServerDispatchGetInfoLogARB(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog)
117
121
{
118
122
    GLsizei *pLocal;
128
132
    hwid = crStateGetProgramHWID(obj);
129
133
    if (!hwid) hwid = crStateGetShaderHWID(obj);
130
134
    cr_server.head_spu->dispatch_table.GetInfoLogARB(hwid, maxLength, pLocal, (char*)&pLocal[1]);
 
135
    CRASSERT((*pLocal) <= maxLength);
131
136
    crServerReturnValue(pLocal, (*pLocal)+sizeof(GLsizei));
132
137
    crFree(pLocal);
133
138
}
158
163
        crServerReturnValue(&zero, sizeof(zero));
159
164
    }
160
165
    cr_server.head_spu->dispatch_table.GetProgramInfoLog(crStateGetProgramHWID(program), bufSize, pLocal, (char*)&pLocal[1]);
 
166
    CRASSERT(pLocal[0] <= bufSize);
161
167
    crServerReturnValue(pLocal, pLocal[0]+sizeof(GLsizei));
162
168
    crFree(pLocal);
163
169
}
173
179
        crServerReturnValue(&zero, sizeof(zero));
174
180
    }
175
181
    cr_server.head_spu->dispatch_table.GetShaderSource(crStateGetShaderHWID(shader), bufSize, pLocal, (char*)&pLocal[1]);
 
182
    CRASSERT(pLocal[0] <= bufSize);
176
183
    crServerReturnValue(pLocal, pLocal[0]+sizeof(GLsizei));
177
184
    crFree(pLocal);
178
185
}