summaryrefslogtreecommitdiff
path: root/src/glx/x11/indirect.c
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2005-03-06 08:55:39 +0000
committerIan Romanick <idr@us.ibm.com>2005-03-06 08:55:39 +0000
commit0bd5373d94c9b74a7b724d74e2b2bc94c8d5bd77 (patch)
tree4406c35e6d6c9b02a70bfc42728d2e49eae24aad /src/glx/x11/indirect.c
parent9d05d3dd308c4655673a710d0c10f09cac9c0d83 (diff)
Actually *use* the count_scale value associated with a parameter.
Diffstat (limited to 'src/glx/x11/indirect.c')
-rw-r--r--src/glx/x11/indirect.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/glx/x11/indirect.c b/src/glx/x11/indirect.c
index b81811cdb8..c654c93939 100644
--- a/src/glx/x11/indirect.c
+++ b/src/glx/x11/indirect.c
@@ -6062,13 +6062,13 @@ void
__indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint num, const GLdouble * params)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 16 + __GLX_PAD((num * 8));
+ const GLuint cmdlen = 16 + __GLX_PAD(((num * 4) * 8));
if (__builtin_expect(num >= 0, 1)) {
emit_header(gc->pc, X_GLrop_ProgramParameters4dvNV, cmdlen);
(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));
+ (void) memcpy((void *)(gc->pc + 16), (void *)(params), ((num * 4) * 8));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6079,13 +6079,13 @@ void
__indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint num, const GLfloat * params)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 16 + __GLX_PAD((num * 4));
+ const GLuint cmdlen = 16 + __GLX_PAD(((num * 4) * 4));
if (__builtin_expect(num >= 0, 1)) {
emit_header(gc->pc, X_GLrop_ProgramParameters4fvNV, cmdlen);
(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 * 4));
+ (void) memcpy((void *)(gc->pc + 16), (void *)(params), ((num * 4) * 4));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6533,12 +6533,12 @@ void
__indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
+ const GLuint cmdlen = 12 + __GLX_PAD(((n * 2) * 8));
if (__builtin_expect(n >= 0, 1)) {
emit_header(gc->pc, X_GLrop_VertexAttribs2dvNV, 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), (n * 8));
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 2) * 8));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6549,12 +6549,12 @@ void
__indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
+ const GLuint cmdlen = 12 + __GLX_PAD(((n * 2) * 4));
if (__builtin_expect(n >= 0, 1)) {
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), (n * 4));
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 2) * 4));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6565,12 +6565,12 @@ void
__indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 12 + __GLX_PAD((n * 2));
+ const GLuint cmdlen = 12 + __GLX_PAD(((n * 2) * 2));
if (__builtin_expect(n >= 0, 1)) {
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), (n * 2));
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 2) * 2));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6581,12 +6581,12 @@ void
__indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
+ const GLuint cmdlen = 12 + __GLX_PAD(((n * 3) * 8));
if (__builtin_expect(n >= 0, 1)) {
emit_header(gc->pc, X_GLrop_VertexAttribs3dvNV, 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), (n * 8));
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 3) * 8));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6597,12 +6597,12 @@ void
__indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
+ const GLuint cmdlen = 12 + __GLX_PAD(((n * 3) * 4));
if (__builtin_expect(n >= 0, 1)) {
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), (n * 4));
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 3) * 4));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6613,12 +6613,12 @@ void
__indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 12 + __GLX_PAD((n * 2));
+ const GLuint cmdlen = 12 + __GLX_PAD(((n * 3) * 2));
if (__builtin_expect(n >= 0, 1)) {
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), (n * 2));
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 3) * 2));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6629,12 +6629,12 @@ void
__indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 12 + __GLX_PAD((n * 8));
+ const GLuint cmdlen = 12 + __GLX_PAD(((n * 4) * 8));
if (__builtin_expect(n >= 0, 1)) {
emit_header(gc->pc, X_GLrop_VertexAttribs4dvNV, 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), (n * 8));
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 4) * 8));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6645,12 +6645,12 @@ void
__indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 12 + __GLX_PAD((n * 4));
+ const GLuint cmdlen = 12 + __GLX_PAD(((n * 4) * 4));
if (__builtin_expect(n >= 0, 1)) {
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), (n * 4));
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 4) * 4));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6661,12 +6661,12 @@ void
__indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 12 + __GLX_PAD((n * 2));
+ const GLuint cmdlen = 12 + __GLX_PAD(((n * 4) * 2));
if (__builtin_expect(n >= 0, 1)) {
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), (n * 2));
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 4) * 2));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}
@@ -6677,12 +6677,12 @@ void
__indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v)
{
__GLXcontext * const gc = __glXGetCurrentContext();
- const GLuint cmdlen = 12 + __GLX_PAD((n * 1));
+ const GLuint cmdlen = 12 + __GLX_PAD(((n * 4) * 1));
if (__builtin_expect(n >= 0, 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), (n * 1));
+ (void) memcpy((void *)(gc->pc + 12), (void *)(v), ((n * 4) * 1));
gc->pc += cmdlen;
if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }
}