summaryrefslogtreecommitdiffstats
path: root/src/glx/x11
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2005-02-25 23:02:33 +0000
committerIan Romanick <[email protected]>2005-02-25 23:02:33 +0000
commit4e262cfb072488a0fe0ff8f4ec3ddbd25379bb1f (patch)
treefa917626d2639b9234b5956ff8b7b44884c3e412 /src/glx/x11
parent40af76bbaa9e8909d63d8eeab4689ed2dfe1e19c (diff)
Accidentally committed wrong version with the previous commit set.
Diffstat (limited to 'src/glx/x11')
-rw-r--r--src/glx/x11/indirect.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/glx/x11/indirect.c b/src/glx/x11/indirect.c
index 33fc9f9a3c7..532e31fd42c 100644
--- a/src/glx/x11/indirect.c
+++ b/src/glx/x11/indirect.c
@@ -6062,12 +6062,12 @@ void
__indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num, const GLdouble * params)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 24;
+ const GLuint cmdlen = 16 + __GLX_PAD((num * 8));
emit_header(gc->pc, X_GLrop_ProgramParameters4dvNV, cmdlen);
- (void) memcpy((void *)(gc->pc + 4), (void *)(params), 8);
- (void) memcpy((void *)(gc->pc + 12), (void *)(&target), 4);
- (void) memcpy((void *)(gc->pc + 16), (void *)(&index), 4);
- (void) memcpy((void *)(gc->pc + 20), (void *)(&num), 4);
+ (void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4);
+ (void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4);
+ (void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4);
+ (void) memcpy((void *)(gc->pc + 16), (void *)(params), (num * 8));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6531,11 +6531,11 @@ void
__indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 20;
+ const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
emit_header(gc->pc, X_GLrop_VertexAttribs2dvNV, cmdlen);
- (void) memcpy((void *)(gc->pc + 4), (void *)(v), 8);
- (void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4);
- (void) memcpy((void *)(gc->pc + 16), (void *)(&n), 4);
+ (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+ (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6545,11 +6545,11 @@ void
__indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 16;
+ const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
emit_header(gc->pc, X_GLrop_VertexAttribs2fvNV, cmdlen);
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
- (void) memcpy((void *)(gc->pc + 12), (void *)(v), 4);
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6559,11 +6559,11 @@ void
__indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 16;
+ const GLuint cmdlen = 12 + __GLX_PAD((n * 2));
emit_header(gc->pc, X_GLrop_VertexAttribs2svNV, cmdlen);
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
- (void) memcpy((void *)(gc->pc + 12), (void *)(v), 2);
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 2));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6573,11 +6573,11 @@ void
__indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 20;
+ const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
emit_header(gc->pc, X_GLrop_VertexAttribs3dvNV, cmdlen);
- (void) memcpy((void *)(gc->pc + 4), (void *)(v), 8);
- (void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4);
- (void) memcpy((void *)(gc->pc + 16), (void *)(&n), 4);
+ (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+ (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6587,11 +6587,11 @@ void
__indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 16;
+ const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
emit_header(gc->pc, X_GLrop_VertexAttribs3fvNV, cmdlen);
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
- (void) memcpy((void *)(gc->pc + 12), (void *)(v), 4);
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6601,11 +6601,11 @@ void
__indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 16;
+ const GLuint cmdlen = 12 + __GLX_PAD((n * 2));
emit_header(gc->pc, X_GLrop_VertexAttribs3svNV, cmdlen);
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
- (void) memcpy((void *)(gc->pc + 12), (void *)(v), 2);
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 2));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6615,11 +6615,11 @@ void
__indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 20;
+ const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
emit_header(gc->pc, X_GLrop_VertexAttribs4dvNV, cmdlen);
- (void) memcpy((void *)(gc->pc + 4), (void *)(v), 8);
- (void) memcpy((void *)(gc->pc + 12), (void *)(&index), 4);
- (void) memcpy((void *)(gc->pc + 16), (void *)(&n), 4);
+ (void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
+ (void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6629,11 +6629,11 @@ void
__indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 16;
+ const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
emit_header(gc->pc, X_GLrop_VertexAttribs4fvNV, cmdlen);
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
- (void) memcpy((void *)(gc->pc + 12), (void *)(v), 4);
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6643,11 +6643,11 @@ void
__indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 16;
+ const GLuint cmdlen = 12 + __GLX_PAD((n * 2));
emit_header(gc->pc, X_GLrop_VertexAttribs4svNV, cmdlen);
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
- (void) memcpy((void *)(gc->pc + 12), (void *)(v), 2);
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 2));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6657,11 +6657,11 @@ void
__indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 16;
+ const GLuint cmdlen = 12 + __GLX_PAD((n * 1));
emit_header(gc->pc, X_GLrop_VertexAttribs4ubvNV, cmdlen);
(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4);
(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4);
- (void) memcpy((void *)(gc->pc + 12), (void *)(v), 1);
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 1));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}