Commit Graph

865 Commits

Author SHA1 Message Date
Henri Verbeet 45c3b125c7 wined3d: Pass a wined3d_context_gl structure to context_unload_tex_coords().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 09:46:13 +02:00
Henri Verbeet 6ffc6cd5d2 wined3d: Pass a wined3d_context_gl structure to context_end_transform_feedback().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 09:46:13 +02:00
Henri Verbeet 258f0d209d wined3d: Pass a wined3d_context_gl structure to context_enable_clip_distances().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 09:46:13 +02:00
Henri Verbeet b1c5c9b226 wined3d: Move the material tracking fields from struct wined3d_context to struct wined3d_context_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-06 15:30:28 +02:00
Henri Verbeet 899e4c7aed wined3d: Pass a wined3d_context_gl structure to context_active_texture().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 16:44:38 +02:00
Matteo Bruni 33d3821943 wined3d: Pass a wined3d_context_gl structure to context_update_stream_sources().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 20:13:59 +02:00
Henri Verbeet 3171193bcf wined3d: Move the texture unit map from struct wined3d_context to struct wined3d_context_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-13 12:45:08 +02:00
Paul Gofman a9e199e5ad wined3d: Apply stencil mask to stencil reference value.
This is consistent with the docs and confirmed by the test.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=28196
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-09 10:01:22 -05:00
Henri Verbeet 34ab198faf wined3d: Pass a wined3d_context_gl structure to context_load_tex_coords().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-08 08:30:31 -05:00
Henri Verbeet da42cf905d wined3d: Store the glEnableWINE and glDisableWINE pointers in the wined3d_gl_info structure.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-08 08:30:16 -05:00
Henri Verbeet 6de1837955 wined3d: Pass a wined3d_context_gl structure to context_bind_texture().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-07 08:46:07 -05:00
Józef Kucia 89fbb64fb8 wined3d: Pass wined3d_adapter to fragment_pipe->get_caps().
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>
2019-03-29 21:24:01 +01:00
Józef Kucia 9502b8e843 wined3d: Pass wined3d_adapter to vp_get_caps().
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>
2019-03-29 21:24:01 +01:00
Józef Kucia 6cc36f7296 wined3d: Pass context to vp_free() and free_private().
Avoid using "adapter->gl_info".

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>
2019-03-26 20:35:55 +01:00
Józef Kucia 32c54006d2 wined3d: Rename state entry structures.
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>
2019-03-04 19:34:57 +01:00
Józef Kucia 1d1511f66d wined3d: Rename StateTable.
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>
2019-03-04 19:34:55 +01:00
Józef Kucia a2954a7121 wined3d: Avoid passing gl_info to compile_state_table().
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>
2019-03-04 19:34:52 +01:00
Józef Kucia 3ef1c469bd wined3d: Avoid passing gl_info to prune_invalid_states().
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>
2019-03-04 19:34:49 +01:00
Zebediah Figura faea4679c0 wined3d: Rename MAX_FRAGMENT_SAMPLERS to WINED3D_MAX_FRAGMENT_SAMPLERS.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 12:26:27 +01:00
Zebediah Figura 0be165a7cd wined3d: Rename MAX_TEXTURES to WINED3D_MAX_TEXTURES.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 12:26:23 +01:00
Paul Gofman 225fdc3558 wined3d: Only use the LSB of the _SAMP_SRGB_TEXTURE state value.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37705
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-20 15:52:22 +01:00
Zebediah Figura bc96d2f164 wined3d: Introduce a separate structure for light state.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +01:00
Paul Gofman 6963fd0bef wined3d: Use lower 8 bits only from _ALPHAREF state.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38138
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-05 19:27:25 +01:00
Henri Verbeet 3a386645c2 wined3d: Get rid of the "colRGBA" variable in light().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 16:13:45 +01:00
Henri Verbeet 961a94ac04 wined3d: Move the "target" field from struct wined3d_texture to struct wined3d_texture_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-30 10:53:59 +01:00
Henri Verbeet 5f9740762a wined3d: Move the OpenGL textures from struct wined3d_texture to struct wined3d_texture_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-30 10:53:55 +01:00
Henri Verbeet b579afd30a wined3d: Move the "buffer_object" field from struct wined3d_buffer to struct wined3d_buffer_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-29 10:11:37 +01:00
Daniel Ansorregui 3d4dd7a06e wined3d: Store the blend factor as a struct wined3d_color.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-18 01:00:52 +02:00
Zebediah Figura 42b5d88f2e wined3d: Implement depth bias clamp.
Based on a patch by Michael Müller.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-08 20:27:00 +02:00
Zebediah Figura 19f2c4473b d3d11: Implement depth clip control.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-21 10:51:29 +02:00
Matteo Bruni 16c708c339 wined3d: Use core functions to set the stencil mask on GL 2.0+.
glStencilMask() is defined as setting both front and back stencil
masks in GL 2.0+ and we don't want to use the EXT_stencil_two_side
entry points even if they happen to be available there.
D3D doesn't support separate front / back stencil write masks anyway.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-14 16:05:14 +02:00
Matteo Bruni ede35244d7 wined3d: Don't add pixel center offset twice.
Fixes cf312011c0.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-14 16:05:09 +02:00
Nikolay Sivov cf312011c0 wined3d: Use fewer calls to set viewport data.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-27 16:33:18 +02:00
Matteo Bruni 56d4de0fde wined3d: Don't clamp viewport coordinates.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-27 16:31:53 +02:00
Nikolay Sivov 409497ee84 wined3d: Add support for setting multiple scissor rectangles.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-24 00:25:15 +02:00
Henri Verbeet 437861f1dc wined3d: Move the stream source binding code to context.c.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-19 13:29:43 +02:00
Henri Verbeet 70c5dc64fc wined3d: Get rid of the "numberedArraysLoaded" field in struct wined3d_context.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-16 21:38:15 +02:00
Nikolay Sivov 853f6538e4 wined3d: Add support for setting multiple viewports.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-16 20:42:56 +02:00
Henri Verbeet 1251fe6921 wined3d: Get rid of ARB_vertex_blend support.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-23 14:02:57 +01:00
Józef Kucia 544a7daaeb wined3d: Factor out get_viewport() function.
No attachment draw calls are always offscreen.

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-03-02 10:52:01 +01:00
Józef Kucia 7096e1e02d wined3d: Implement draw calls with no attachments.
Supported when ARB_framebuffer_no_attachments is available.

It was reported that no attachments framebuffers trigger GPU hangs
in The Witcher 3 on some system configurations with radeonsi driver.
MESA_EXTENSION_OVERRIDE=-GL_ARB_framebuffer_no_attachments can be used
as a workaround until it's fixed.

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-03-02 10:51:59 +01:00
Henri Verbeet f08342f573 wined3d: Use the global memory allocation helpers.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-14 09:06:58 +01:00
Józef Kucia 350a757e37 wined3d: Introduce blend state object.
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-02-08 21:07:12 +01:00
Józef Kucia 5d2a3ad310 wined3d: Add support for D3D10+ depth bias.
Direct3D seems to define exact depth bias scale factors per format.
In order to make depth bias work reliably across OpenGL drivers we need
to slightly adjust depth bias values passed to glPolygonOffset().

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>
2017-12-06 17:00:55 +01:00
Matteo Bruni 5fb50c9a1c wined3d: Detect depth bias scale value per format.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-06 17:00:50 +01:00
Józef Kucia 46cf12318b wined3d: Keep track of enabled clip distances.
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>
2017-12-04 11:52:12 +01:00
Józef Kucia 2fdec9a898 wined3d: Limit number of supported user clip planes to 8.
We never supported, and we should never need to support more than 8 user
clip planes in wined3d.

OpenGL drivers do not expose more than 8 clip distances. Similarly,
other APIs, D3D10, D3D11 and D3D12 provide exactly 8 clip distances.

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>
2017-12-04 11:52:05 +01:00
Józef Kucia 7f8e30bd1a wined3d: Use ARRAY_SIZE().
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>
2017-10-19 16:53:49 +02:00
Henri Verbeet 3821dcf996 wined3d: Only warn about 0 compare functions in wined3d_gl_compare_func().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-31 20:51:44 +02:00
Józef Kucia 229d4aa7bc wined3d: Trace color fixup checks in apply_format_fixups().
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>
2017-05-30 11:03:58 +02:00