[Mesa-dev] [PATCH] draw/pt: adjust overflow calculations
Zack Rusin
zackr at vmware.com
Thu May 2 20:40:58 PDT 2013
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 <zackr at vmware.com>
---
src/gallium/auxiliary/draw/draw_pt_so_emit.c | 3 +--
1 file changed, 1 insertion(+), 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 9b55773..d624a99 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;
}
--
1.7.10.4
More information about the mesa-dev
mailing list