-
Józef Kucia authored
Based on a patch by Andrew Wesie. In Direct3D, SV_VertexID generally starts from zero. In OpenGL, gl_VertexID starts from "first" parameter passed to glDrawArrays(), or from "baseVertex" parameter for indexed draw calls. The GL_ARB_shader_draw_parameters extension doesn't help us much because gl_BaseVertexARB is zero for non-indexed draw calls [1]. If gl_BaseVertexARB would be equal to "first" for non-indexed draw calls, we could simply use gl_VertexID - gl_BaseVertexARB. After this commit, SV_VertexID is still wrong for indirect draw calls because we cannot easily access the "first" field from struct DrawArraysIndirectCommand in a vertex shader. [1] - The ARB_shader_draw_parameters spec says that "In the case where the command has no <baseVertex> parameter, the value of <gl_BaseVertexARB> is zero." Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
60d9211f
Name |
Last commit
|
Last update |
---|---|---|
dlls | ||
documentation | ||
fonts | ||
include | ||
libs | ||
loader | ||
po | ||
programs | ||
server | ||
tools | ||
.mailmap | ||
ANNOUNCE | ||
AUTHORS | ||
COPYING.LIB | ||
LICENSE | ||
LICENSE.OLD | ||
MAINTAINERS | ||
Makefile.in | ||
README | ||
VERSION | ||
aclocal.m4 | ||
configure | ||
configure.ac |