diff options
author | Michel Dänzer <[email protected]> | 2012-09-12 12:59:49 +0200 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2012-09-12 13:23:09 +0200 |
commit | d67d8e24718a7ab991caa6798563e53ae343cede (patch) | |
tree | 84dee0fa72eb3430a9b0e1ee3f3b5cec395e9229 | |
parent | 9f30cbe9ee27a588cb2535cb8df7a597347c06e1 (diff) |
radeonsi: Fix calculation of number of records in buffer resource.
The value was too small by 1 in some cases (non-first of several vertex
elements interleaved in a single buffer).
Fixes intermittent incorrect geometry in many apps, e.g. piglit
spec/EXT_texture_snorm/fbo-generatemipmap-formats.
Signed-off-by: Michel Dänzer <[email protected]>
Reviewed-by: Christian König <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_draw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index c71ad43db24..0cb8b7180e4 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -455,7 +455,7 @@ static void si_vertex_buffer_update(struct r600_context *rctx) si_pm4_sh_data_add(pm4, va & 0xFFFFFFFF); si_pm4_sh_data_add(pm4, (S_008F04_BASE_ADDRESS_HI(va >> 32) | S_008F04_STRIDE(vb->stride))); - si_pm4_sh_data_add(pm4, (vb->buffer->width0 - offset) / + si_pm4_sh_data_add(pm4, (vb->buffer->width0 - vb->buffer_offset) / MAX2(vb->stride, 1)); si_pm4_sh_data_add(pm4, rctx->vertex_elements->rsrc_word3[i]); |