summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2013-06-17 21:06:11 -0400
committerZack Rusin <[email protected]>2013-06-17 21:43:10 -0400
commit9542131b273d01d2c3403e6791172347cb792e34 (patch)
tree8dad771a75c40ae6c051a81c4e31636e54e1cc85 /src/gallium/auxiliary
parent8975dc798d6b7790de7a788c8263b636cfd02184 (diff)
Revert "draw: clear the draw buffers in draw"
This reverts commit 41966fdb3b71c0b70aeb095e0eb3c5626c144a3a. While it's a lot cleaner it causes regressions because the draw interface is always called from the draw functions of the drivers (because the buffers need to be mapped) which means that the stream output buffers endup being cleared on every draw rather than on setting. Signed-off-by: Zack Rusin <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c25
-rw-r--r--src/gallium/auxiliary/draw/draw_context.h3
2 files changed, 3 insertions, 25 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index 201c62d945c..4a08765c94f 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -807,36 +807,15 @@ draw_get_rasterizer_no_cull( struct draw_context *draw,
return draw->rasterizer_no_cull[scissor][flatshade];
}
-/**
- * Sets the mapped so targets.
- *
- * The append bitmask specifies which of the buffers are in
- * the append mode. The append mode means that the buffer
- * should be appended to, rather than written to from the start.
- * i.e. the outputs should be written starting from the last
- * location to which the previous
- * pass of stream output wrote to in this buffer.
- * If the buffer is not in an append mode (which is more common)
- * the writing begins from the start of the buffer.
- *
- */
void
draw_set_mapped_so_targets(struct draw_context *draw,
int num_targets,
- struct draw_so_target *targets[PIPE_MAX_SO_BUFFERS],
- unsigned append_bitmask)
+ struct draw_so_target *targets[PIPE_MAX_SO_BUFFERS])
{
int i;
- for (i = 0; i < num_targets; i++) {
+ for (i = 0; i < num_targets; i++)
draw->so.targets[i] = targets[i];
- /* if we're not appending then lets reset the internal
- data of our so target */
- if (!(append_bitmask & (1 << i)) && draw->so.targets[i]) {
- draw->so.targets[i]->internal_offset = 0;
- draw->so.targets[i]->emitted_vertices = 0;
- }
- }
for (i = num_targets; i < PIPE_MAX_SO_BUFFERS; i++)
draw->so.targets[i] = NULL;
diff --git a/src/gallium/auxiliary/draw/draw_context.h b/src/gallium/auxiliary/draw/draw_context.h
index ae6306811f9..4a1b27ee414 100644
--- a/src/gallium/auxiliary/draw/draw_context.h
+++ b/src/gallium/auxiliary/draw/draw_context.h
@@ -231,8 +231,7 @@ draw_set_mapped_constant_buffer(struct draw_context *draw,
void
draw_set_mapped_so_targets(struct draw_context *draw,
int num_targets,
- struct draw_so_target *targets[PIPE_MAX_SO_BUFFERS],
- unsigned append_bitmask);
+ struct draw_so_target *targets[PIPE_MAX_SO_BUFFERS]);
/***********************************************************************