diff options
author | Zack Rusin <[email protected]> | 2013-05-02 23:38:28 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2013-05-03 07:07:33 -0400 |
commit | a232afdbfbaac156e981f55b8bdeb305026cde84 (patch) | |
tree | 89708448d7c35a30ebb99628501066c7032539b5 /src/gallium/auxiliary/draw | |
parent | 8490d21cbe9cce4ceb5c1908b42672f5160fd013 (diff) |
draw/pt: adjust overflow calculations
gallium lies. buffer_size is not actually buffer_size but available
size, which is 'buffer_size - buffer_offset' so by adding buffer
offset we'd incorrectly compute overflow.
Signed-off-by: Zack Rusin <[email protected]>
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_so_emit.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_so_emit.c b/src/gallium/auxiliary/draw/draw_pt_so_emit.c index 9b557733ddd..d624a990bc6 100644 --- a/src/gallium/auxiliary/draw/draw_pt_so_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_so_emit.c @@ -131,8 +131,7 @@ static void so_emit_prim(struct pt_so_emit *so, for (i = 0; i < draw->so.num_targets; i++) { struct draw_so_target *target = draw->so.targets[i]; if (target) { - buffer_total_bytes[i] = target->internal_offset + - target->target.buffer_offset; + buffer_total_bytes[i] = target->internal_offset; } else { buffer_total_bytes[i] = 0; } |