Sweden-Number/dlls/wined3d
Józef Kucia 60d9211f0f wined3d: Fix mapping of SV_VertexID to gl_VertexID.
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>
2018-11-23 20:17:45 +01:00
..
Makefile.in wined3d: Move OpenGL initialisation code to adapter_gl.c. 2018-08-17 18:47:00 +02:00
adapter_gl.c wined3d: Get rid of vram_bytes from struct wined3d_adapter. 2018-11-21 17:06:03 +01:00
arb_program_shader.c wined3d: Pass correct bind flags to texture creation functions. 2018-10-31 16:17:36 +01:00
ati_fragment_shader.c wined3d: Get rid of the dst_arg enum. 2018-03-23 14:02:53 +01:00
buffer.c wined3d: Pass bind flags to wined3d_get_format(). 2018-10-31 16:17:36 +01:00
context.c wined3d: Do not crash when trying to draw to buffer render target. 2018-11-23 20:17:44 +01:00
cs.c wined3d: Fix mapping of SV_VertexID to gl_VertexID. 2018-11-23 20:17:45 +01:00
device.c wined3d: Get rid of vram_bytes from struct wined3d_adapter. 2018-11-21 17:06:03 +01:00
directx.c wined3d: Report system shared memory for adapters. 2018-11-21 17:06:05 +01:00
gl_compat.c
glsl_shader.c wined3d: Fix mapping of SV_VertexID to gl_VertexID. 2018-11-23 20:17:45 +01:00
nvidia_texture_shader.c wined3d: Move the "target" field from struct wined3d_texture to struct wined3d_texture_gl. 2018-10-30 10:53:59 +01:00
palette.c wined3d: Use the global memory allocation helpers. 2018-02-14 09:06:58 +01:00
query.c wined3d: Implement WINED3D_QUERY_TYPE_SO_STATISTICS. 2018-11-21 17:06:42 +01:00
resource.c wined3d: Disallow dynamic rendertarget and depth/stencil resources. 2018-11-19 22:42:41 +01:00
sampler.c wined3d: Move the "target" field from struct wined3d_texture to struct wined3d_texture_gl. 2018-10-30 10:53:59 +01:00
shader.c wined3d: Move the "target" field from struct wined3d_texture to struct wined3d_texture_gl. 2018-10-30 10:53:59 +01:00
shader_sm1.c wined3d: Use the global memory allocation helpers. 2018-02-14 09:06:58 +01:00
shader_sm4.c wined3d: Accept full DXBC. 2018-10-05 11:25:53 -05:00
state.c wined3d: Move the "target" field from struct wined3d_texture to struct wined3d_texture_gl. 2018-10-30 10:53:59 +01:00
stateblock.c wined3d: Store the blend factor as a struct wined3d_color. 2018-10-18 01:00:52 +02:00
surface.c wined3d: Get rid of the redundant WINED3D_TEXTURE_CREATE_MAPPABLE flag in surface_convert_format(). 2018-11-23 20:17:44 +01:00
swapchain.c wined3d: Propagate HRESULTs in wined3d_swapchain_resize_target(). 2018-11-23 20:17:44 +01:00
texture.c wined3d: Require exclusive GPU access for rendertarget and depth/stencil resources. 2018-11-19 22:42:41 +01:00
utils.c wined3d: Make "driver private" formats always mappable. 2018-11-19 22:42:41 +01:00
version.rc
vertexdeclaration.c wined3d: Introduce WINED3DFMT_FLAG_VERTEX_ATTRIBUTE. 2018-09-14 12:48:31 +02:00
view.c wined3d: Introduce a separate structure for OpenGL shader resource view information. 2018-11-13 20:54:28 +01:00
wined3d.spec wined3d: Pass bind flags to wined3d_check_device_format(). 2018-10-31 16:17:36 +01:00
wined3d_gl.h wined3d: Implement depth bias clamp. 2018-10-08 20:27:00 +02:00
wined3d_main.c wined3d: Also default to OpenGL core contexts on NVIDIA GPUs. 2018-10-08 20:26:53 +02:00
wined3d_private.h wined3d: Fix mapping of SV_VertexID to gl_VertexID. 2018-11-23 20:17:45 +01:00