OSDN Git Service

i965: Fix gl_VertexID when there are no other vertex inputs.
authorPaul Berry <stereotype441@gmail.com>
Mon, 17 Dec 2012 17:55:48 +0000 (09:55 -0800)
committerPaul Berry <stereotype441@gmail.com>
Tue, 18 Dec 2012 17:02:53 +0000 (09:02 -0800)
commit1b37fc40fc1d443e7ab9f930f78af9a32525698a
treebac86839dc84ed051f7081e9bad0b2ce09828522
parent5b7099c74d7774dc59895536bad53bd1196e398c
i965: Fix gl_VertexID when there are no other vertex inputs.

brw_emit_vertices contains special case logic to handle the case where
a vertex shader doesn't read any inputs.  This special case logic was
incorrectly activating in the case were the only vertex input is
gl_VertexID.  As a result, if a shader used gl_VertexID but used no
other inputs, then all vertices got a gl_VertexID of zero.

Fixes oglconform test "ubo-usage advanced.transform_feedback".

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_draw_upload.c