summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-02-16 19:50:48 +0000
committerKeith Whitwell <keithw@vmware.com>2009-02-16 19:50:48 +0000
commit59d54334c96f44ed1d8bf660dc96221362a77d04 (patch)
treee9ab34e568256bcdc2a88602c47072ab769211e8 /src/gallium/auxiliary/draw
parent7c8836e9ef49d938aa55a1c385b95c6371c301f1 (diff)
parentc5c383596ddb26cd75e4b355918ad16915283b59 (diff)
Merge branch 'master' into gallium-texture-transfer
Conflicts: src/mesa/state_tracker/st_cb_accum.c src/mesa/state_tracker/st_cb_drawpixels.c
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_pstipple.c2
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_vbuf.c5
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_aos.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
index 41910c6165..e68c824c86 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
@@ -256,7 +256,7 @@ pstip_transform_inst(struct tgsi_transform_context *ctx,
struct tgsi_full_immediate immed;
uint size = 4;
immed = tgsi_default_full_immediate();
- immed.Immediate.Size = 1 + size; /* one for the token itself */
+ immed.Immediate.NrTokens = 1 + size; /* one for the token itself */
immed.u.Pointer = (void *) value;
ctx->emit_immediate(ctx, &immed);
}
diff --git a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
index 5ead25efff..9153bc2f86 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
@@ -394,13 +394,14 @@ vbuf_alloc_vertices( struct vbuf_stage *vbuf )
/* even number */
vbuf->max_vertices = vbuf->max_vertices & ~1;
+ if(vbuf->max_vertices >= UNDEFINED_VERTEX_ID)
+ vbuf->max_vertices = UNDEFINED_VERTEX_ID - 1;
+
/* Must always succeed -- driver gives us a
* 'max_vertex_buffer_bytes' which it guarantees it can allocate,
* and it will flush itself if necessary to do so. If this does
* fail, we are basically without usable hardware.
*/
- assert(vbuf->max_vertices < UNDEFINED_VERTEX_ID);
-
vbuf->vertices = (uint *) vbuf->render->allocate_vertices(vbuf->render,
(ushort) vbuf->vertex_size,
(ushort) vbuf->max_vertices);
diff --git a/src/gallium/auxiliary/draw/draw_vs_aos.c b/src/gallium/auxiliary/draw/draw_vs_aos.c
index 6817f29c2a..0c693a4a65 100644
--- a/src/gallium/auxiliary/draw/draw_vs_aos.c
+++ b/src/gallium/auxiliary/draw/draw_vs_aos.c
@@ -1870,7 +1870,7 @@ static boolean note_immediate( struct aos_compilation *cp,
unsigned pos = cp->num_immediates++;
unsigned j;
- for (j = 0; j < imm->Immediate.Size; j++) {
+ for (j = 0; j < imm->Immediate.NrTokens - 1; j++) {
cp->vaos->machine->immediate[pos][j] = imm->u.ImmediateFloat32[j].Float;
}