radeonsi: Fix off-by-one for maximum vertex element index in some cases
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 12 Mar 2013 11:34:37 +0000 (12:34 +0100)
committerMichel Dänzer <michel@daenzer.net>
Tue, 12 Mar 2013 17:25:54 +0000 (18:25 +0100)
commit4dca602521c51a4cb03855bda9c22b5ccc4829c7
tree03c37af616896e64b46f924ef3debf248b701f84
parent8aa8b0539eda00b9bafacb69774b26975db66ae4
radeonsi: Fix off-by-one for maximum vertex element index in some cases

In cases where the vertex element size is smaller than the vertex buffer
stride, the previous calculation could end up 1 too low. This would result
in the GPU using index 0 instead of the maximum index for those elements,
which would be visible as intermittent distorted triangles.

NOTE: This is a candidate for the 9.1 branch.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/radeonsi/si_state_draw.c