103
108
__GLX_SINGLE_END();
113
#define CONCAT(a,b) a ## b
114
#define NAME(o) CONCAT(gl_dispatch_stub_, o)
116
void NAME(_gloffset_GetSeparableFilter)(GLenum target, GLenum format, GLenum type,
117
GLvoid *row, GLvoid *column, GLvoid *span)
119
__GLXcontext * const gc = __glXGetCurrentContext();
122
CALL_GetSeparableFilter(GET_DISPATCH(),
123
(target, format, type, row, column, span));
127
Display *const dpy = gc->currentDpy;
128
const GLuint cmdlen = __GLX_PAD(13);
131
const __GLXattribute * const state = gc->client_state_private;
132
xGLXGetSeparableFilterReply reply;
134
__glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply,
135
X_GLvop_GetSeparableFilterEXT, cmdlen);
139
(void) memcpy((void *) (pc + 0), (void *) (&target), 4);
140
(void) memcpy((void *) (pc + 4), (void *) (&format), 4);
141
(void) memcpy((void *) (pc + 8), (void *) (&type), 4);
142
*(int8_t *) (pc + 12) = state->storePack.swapEndian;
144
(void) _XReply(dpy, (xReply *) & reply, 0, False);
146
compsize = reply.length << 2;
149
const GLint width = reply.width;
150
const GLint height = reply.height;
151
const GLint widthsize =
152
__glImageSize(width, 1, 1, format, type, 0);
153
const GLint heightsize =
154
__glImageSize(height, 1, 1, format, type, 0);
155
GLubyte * const buf =
156
(GLubyte*) Xmalloc((widthsize > heightsize) ? widthsize : heightsize);
159
/* Throw data away */
160
_XEatData(dpy, compsize);
161
__glXSetError(gc, GL_OUT_OF_MEMORY);
169
extra = 4 - (widthsize & 3);
170
_XRead(dpy, (char *)buf, widthsize);
172
_XEatData(dpy, extra);
175
__glEmptyImage(gc, 1, width, 1, 1, format, type, buf,
178
extra = 4 - (heightsize & 3);
179
_XRead(dpy, (char *)buf, heightsize);
181
_XEatData(dpy, extra);
184
__glEmptyImage(gc, 1, height, 1, 1, format, type, buf,