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
Zebediah Figura
9f85d5dab0
wined3d: Use wined3d_state_get_light() in wined3d_state_record_lights().
...
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-12-03 22:27:05 +01:00
Józef Kucia
6dddb88ebe
wined3d: Lock wined3d mutex in wined3d_get_adapter_identifier().
...
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-12-03 22:27:05 +01:00
Józef Kucia
9042fbe1e4
wined3d: Lock wined3d mutex in wined3d_swapchain_present().
...
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-12-03 22:27:05 +01:00
Józef Kucia
f44e09b182
wined3d: Use wined3d_cs_finish() in swapchain_cleanup().
...
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-30 19:36:51 +01:00
Józef Kucia
1f08817355
wined3d: Introduce wined3d_cs_require_space() helper.
...
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-30 19:36:51 +01:00
Józef Kucia
4eed2416d6
wined3d: Introduce wined3d_cs_submit() helper.
...
Mainly for consistency.
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-30 19:36:51 +01:00
Józef Kucia
57110d5bc2
wined3d: Introduce wined3d_cs_finish() helper.
...
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-29 17:48:34 +01:00
Józef Kucia
662e645257
wined3d: Lock wined3d mutex in wined3d_swapchain_create().
...
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-29 17:48:34 +01:00
Józef Kucia
56d2db81b3
wined3d: Lock wined3d mutex in wined3d_swapchain_decref().
...
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-29 17:48:34 +01:00
Józef Kucia
0896decb18
wined3d: Lock wined3d mutex in wined3d_swapchain_resize_target().
...
Fixes a deadlock. It can also be seen as a small step towards more
fine-grained locking in wined3d.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45431
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-29 17:48:34 +01:00
Daniel Ansorregui
5a961e8de7
wined3d: Simplify "glsl_generate_ffp" texture projection.
...
This is to simplify the code before adding the FETCH4
modifications. No change is intended in the shader generation.
Signed-off-by: Daniel Ansorregui <mailszeros@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-26 20:24:58 +01:00
Henri Verbeet
74931f9217
wined3d: Do not set WINED3D_TEXTURE_CREATE_MAPPABLE on the cursor texture.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-26 20:24:54 +01:00
Henri Verbeet
e5a6861d3a
wined3d: Do not set WINED3D_TEXTURE_CREATE_MAPPABLE on the logo texture.
...
We never map it.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-26 20:24:52 +01:00
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
Józef Kucia
ceef4e77cf
wined3d: Set base vertex index also for non-indexed draws.
...
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:44 +01:00
Józef Kucia
13c9fda28f
wined3d: Set base vertex index in CS state.
...
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:44 +01:00
Henri Verbeet
926c554d94
wined3d: Get rid of the redundant WINED3D_TEXTURE_CREATE_MAPPABLE flag in surface_convert_format().
...
We already set WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-23 20:17:44 +01:00
Józef Kucia
74351205ac
wined3d: Propagate HRESULTs in wined3d_swapchain_resize_target().
...
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:44 +01:00
Józef Kucia
8890ece54c
wined3d: Do not crash when trying to draw to buffer render target.
...
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:44 +01:00
Józef Kucia
85d4482ccb
wined3d: Implement WINED3D_QUERY_TYPE_SO_STATISTICS.
...
The WINED3D_QUERY_TYPE_SO_STATISTICS query type is just
WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM0, but it is supported on feature
level 10.
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-21 17:06:42 +01:00
Józef Kucia
efe867a2f6
wined3d: Add fallback for WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM0.
...
Use non-indexed queries when ARB_transform_feedback3 is not available.
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-21 17:06:40 +01:00
Józef Kucia
b0b27730e6
wined3d: Report system shared memory for adapters.
...
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-21 17:06:05 +01:00
Józef Kucia
f17544a77c
wined3d: Get rid of vram_bytes from struct wined3d_adapter.
...
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-21 17:06:03 +01:00
Józef Kucia
3e0148cab0
wined3d: Rename DeviceName to device_name.
...
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-21 17:06:01 +01:00
Paul Gofman
4aecfe2e05
wined3d: Don't pull _ACCESS_GPU textures to system memory in texture2d_blt().
...
The change introduced by commit 54a9e84952
had
side effect of ultimately selecting detsination texture location as
dst_texture->resource.map_binding, which is not the case in the default texture2d_blt()
code path.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46068
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-20 16:26:09 +01:00
Henri Verbeet
9bac6f159c
wined3d: Disallow dynamic rendertarget and depth/stencil resources.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-19 22:42:41 +01:00
Henri Verbeet
0bae2bed43
wined3d: Require exclusive GPU access for rendertarget and depth/stencil resources.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-19 22:42:41 +01:00
Henri Verbeet
826be9ee10
wined3d: Make "driver private" formats always mappable.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-19 22:42:41 +01:00
Henri Verbeet
54d63891f3
wined3d: Allow binding scratch textures.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-19 22:42:41 +01:00
Henri Verbeet
87871e75e4
wined3d: Validate that the view resource has depth/stencil bind flags in wined3d_device_set_depth_stencil_view().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-19 22:42:41 +01:00
Józef Kucia
a586d4e880
wined3d: Fix downloading data for 1D array textures.
...
glGetTexImage() downloads data for all layers.
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-16 18:41:14 +01:00
Józef Kucia
4bca8dbe0a
wined3d: Add support for WINED3DFMT_R10G10B10A2_UINT.
...
Unfortunately, GL_RGB10_A2UI is not supported for buffer textures.
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-16 18:41:12 +01:00
Henri Verbeet
c098173670
wined3d: Introduce a separate structure for OpenGL shader resource view information.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-13 20:54:28 +01:00
Henri Verbeet
cf6b3f28d7
wined3d: Introduce a separate structure for OpenGL unordered access view information.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-13 20:54:28 +01:00
Henri Verbeet
0799c3babd
wined3d: Introduce a separate structure for OpenGL rendertarget view information.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-13 20:54:28 +01:00
Henri Verbeet
cdfdfc382b
wined3d: Respect WINED3D_SWAPCHAIN_LOCKABLE_BACKBUFFER.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-08 19:03:26 +01:00
Henri Verbeet
04b675223d
wined3d: Update the swapchain flags on wined3d_device_reset().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-07 16:54:55 +01:00
Henri Verbeet
ca87bd95c2
wined3d: Do not set WINED3D_TEXTURE_CREATE_GET_DC on the implicit depth/stencil texture.
...
It doesn't make a lot of sense for depth formats.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-07 16:54:53 +01:00
Henri Verbeet
03c1422a71
wined3d: Get rid of WINED3DUSAGE_TEXTURE.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-06 11:14:36 +01:00
Henri Verbeet
a0d6ef5bb4
wined3d: Get rid of WINED3DUSAGE_DEPTHSTENCIL.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-06 11:14:34 +01:00
Henri Verbeet
3adf4b8415
wined3d: Get rid of WINED3DUSAGE_RENDERTARGET.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-05 19:12:12 +01:00
Henri Verbeet
b93cfc18fa
wined3d: Prefer bind flags over usage flags in wined3d_device_set_rendertarget_view().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-05 19:12:12 +01:00
Henri Verbeet
21f44e8fa6
wined3d: Prefer bind flags over usage flags in texture2d_load_sysmem().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-02 15:18:02 +01:00
Henri Verbeet
eed05ad890
wined3d: Prefer bind flags over usage flags in texture2d_load_drawable().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-02 15:18:02 +01:00
Henri Verbeet
49af0e73f7
wined3d: Prefer bind flags over usage flags in texture2d_load_texture().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-02 15:18:02 +01:00
Henri Verbeet
43e7568666
wined3d: Prefer bind flags over usage flags in texture2d_load_renderbuffer().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-02 15:18:02 +01:00
Henri Verbeet
58b681e920
wined3d: Prefer bind flags over usage flags in ffp_blitter_clear().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-02 15:18:02 +01:00
Henri Verbeet
ae0f03bac5
wined3d: Prefer bind flags over usage flags in ffp_blit_supported().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-01 09:17:02 +01:00
Henri Verbeet
12d7bd5607
wined3d: Prefer bind flags over usage flags in fbo_blitter_supported().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-01 09:17:01 +01:00
Henri Verbeet
220c078ed9
wined3d: Prefer bind flags over usage flags in wined3d_texture_prepare_texture().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-01 09:16:59 +01:00
Henri Verbeet
6435bd743b
wined3d: Prefer bind flags over usage flags in wined3d_texture_upload_data().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-01 09:16:57 +01:00
Henri Verbeet
14434751dd
wined3d: Prefer bind flags over usage flags in wined3d_texture_init().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-01 09:16:54 +01:00
Henri Verbeet
00275acca8
wined3d: Validate format capabilities against the bind flags instead of the usage flags in resource_init().
...
Note that buffer resources don't have an inherent format, so validating bind
flags against WINED3DFMT_UNKNOWN doesn't make a lot of sense. This wasn't an
issue previously because d3d11 doesn't set the usage flags corresponding to
the bind flags for buffer resources, and earlier versions of D3D didn't allow
buffers to be used as e.g. shader resources.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 16:17:36 +01:00
Henri Verbeet
7d83ebeed2
wined3d: Pass bind flags to wined3d_get_format().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 16:17:36 +01:00
Henri Verbeet
ae6553bd0b
wined3d: Pass bind flags to wined3d_check_device_format().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 16:17:36 +01:00
Henri Verbeet
543605ca9d
wined3d: Pass correct bind flags to swapchain creation functions.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 16:17:36 +01:00
Henri Verbeet
7cba915710
wined3d: Pass correct bind flags to texture creation functions.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 16:17:36 +01:00
Henri Verbeet
45bf95278d
wined3d: Store resource bind flags in the wined3d_resource structure.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-30 10:54:06 +01:00
Henri Verbeet
22b3a4f044
wined3d: Get rid of the "desc" field in struct wined3d_buffer.
...
Most of the information in "desc" is already stored in the wined3d_resource
structure.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-30 10:54:04 +01:00
Henri Verbeet
f8ba91ac75
wined3d: Validate required OpenGL extensions in wined3d_texture_gl_init() instead of wined3d_texture_init().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-30 10:54:02 +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
e12d97e50d
wined3d: Move the multisample renderbuffers 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-29 10:11:42 +01:00
Henri Verbeet
0649adc31f
wined3d: Move the depth renderbuffers 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-29 10:11:40 +01:00
Henri Verbeet
81f577e119
wined3d: Introduce a separate structure for OpenGL texture information.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-29 10:11:39 +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
Henri Verbeet
c130a028fc
wined3d: Don't bother trying to blit from discarded textures.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-29 10:11:32 +01:00
Henri Verbeet
fc9c8e4758
wined3d: Move the "buffer_object_usage" 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-26 21:18:27 +02:00
Henri Verbeet
12b5c91485
wined3d: Move the "buffer_type_hint" 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-26 21:18:27 +02:00
Henri Verbeet
15962381e2
wined3d: Introduce a separate structure for OpenGL buffer information.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-26 21:18:27 +02:00
Henri Verbeet
09c4e23ed5
wined3d: Introduce a separate structure for OpenGL device information.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-26 21:18:27 +02:00
Henri Verbeet
32e46a9805
wined3d: Get rid of the "device" parameter to context_bind_dummy_textures().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-26 21:18:27 +02:00
Matteo Bruni
a27dbb2d5c
wined3d: Invalidate shader resource bindings when blitting.
...
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-10-24 16:58:08 +02:00
Henri Verbeet
944e92ba06
wined3d: Pass the wined3d_buffer_desc structure directly to buffer_init().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-23 13:55:37 +02:00
Henri Verbeet
1ae45f47cd
wined3d: Get rid of the "format_id" parameter to buffer_init().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-23 13:55:35 +02:00
Henri Verbeet
ee7c6c2a93
wined3d: Store the "buffer_object" in struct wined3d_bo_address as an UINT_PTR.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-23 13:55:33 +02:00
Henri Verbeet
c390f41558
wined3d: Introduce debug helpers for wined3d_bo_address structures.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-23 13:55:29 +02:00
Henri Verbeet
718f7fd4fd
wined3d: Validate the initial texture data before initialising the texture.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-23 13:55:27 +02:00
Andrew Wesie
b3b91ea51d
wined3d: Implement D3D11_STANDARD_MULTISAMPLE_PATTERN.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45197
Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-22 22:36:43 +02:00
Józef Kucia
94f499335a
wined3d: Call wined3d_cs_emit_update_sub_resource() directly in wined3d_texture_create().
...
Fixes a regression introduced by commit
490c6d548a
.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45996
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-10-18 19:48:21 +02: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
Henri Verbeet
a4104c7c60
wined3d: Avoid accessing the device after deactivation some more.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-16 22:26:07 +02:00
Andrew Wesie
6f5b8265ab
wined3d: Add sync object after query buffer issue.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45932
Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-15 20:13:51 +02:00
Stefan Dösinger
7a36efc3bc
wined3d: Avoid accessing the device after minimize in ddraw.
...
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-15 20:13:51 +02:00
Stefan Dösinger
222d30754e
wined3d: Deactivate the device before minimizing the window.
...
This fixes tabbing out of Deus Ex Game of the Year edition.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-15 20:13:51 +02:00
Matteo Bruni
985b96b09e
wined3d: Avoid using GL_MAX_VARYING_FLOATS_ARB in core profile contexts.
...
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-10-13 00:30:57 +02:00
Matteo Bruni
b34a21740f
wined3d: Add fallback to EXT_polygon_offset_clamp.
...
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-10-13 00:30:56 +02:00
Matteo Bruni
237136d2f7
wined3d: Invalidate shader resource bindings after binding texture view.
...
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-10-13 00:30:55 +02:00
Matteo Bruni
c7568a5706
wined3d: Dump view descriptor contents.
...
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-10-13 00:30:53 +02:00
Matteo Bruni
097c4b135b
wined3d: Dump buffer descriptor in wined3d_buffer_create().
...
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-10-13 00:30:51 +02:00
Józef Kucia
ecea7a94c9
wined3d: Set texture swizzle for texture views.
...
Fixes A8_UNORM views.
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>
2018-10-10 21:08:48 +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
Henri Verbeet
55d4f63164
wined3d: Add GPU information for NVIDIA GeForce GT 720.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-08 20:26:57 +02:00
Henri Verbeet
8fa5f1d8c6
wined3d: Also default to OpenGL core contexts on NVIDIA GPUs.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-08 20:26:53 +02:00
Józef Kucia
d0798a7458
wined3d: Drop support for pre-parsed shader DXBC chunks.
...
Accept only full DXBC.
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-10-05 11:26:00 -05:00
Józef Kucia
72ea1419d5
wined3d: Accept full DXBC.
...
In order to make it easier to add shader backends based on external
libraries, e.g. vkd3d-shader. Additionally, allows us to easily parse
additional DXBC chunks in wined3d.
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-10-05 11:25:53 -05:00
Andrew Wesie
54a9e84952
wined3d: Add fast-path for texture download blit.
...
Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-04 09:10:20 -05:00
Andrew Wesie
843ccd2d5b
wined3d: Unify the texture download functions.
...
Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-03 16:25:33 -05:00
Józef Kucia
0e35782fe8
wined3d: Validate byte code pointer in shader_init().
...
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-10-03 16:23:17 -05:00
Józef Kucia
7c90361833
wined3d: Use version from byte code for pass-through geometry shaders.
...
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-10-03 16:23:15 -05:00
Józef Kucia
272414177f
wined3d: Allow stream output with domain shaders.
...
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-10-03 16:23:12 -05:00
Józef Kucia
10ede9332a
wined3d: Get rid of shader_get_shader_type().
...
Use the shader frontend to get the shader type.
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-10-03 16:23:09 -05:00
Józef Kucia
137f8f308c
wined3d: Call shader_set_function() separately from shader_init().
...
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-10-03 16:23:07 -05:00
Józef Kucia
ce427251de
wined3d: Pass device to shader_set_function().
...
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-10-03 16:23:04 -05:00
Józef Kucia
11fc530ac9
wined3d: Set load_local_constsF in shader_set_function().
...
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-10-03 16:23:02 -05:00
Józef Kucia
4c7d5642e5
wined3d: Factor out shader_copy_signatures_from_shader_desc().
...
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-10-03 16:22:59 -05:00
Andrew Wesie
b86716ebed
wined3d: Use PBO for read-only staging textures.
...
Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-02 19:37:56 -07:00
Józef Kucia
b4b55bbbb6
wined3d: Add core context support for A8_UNORM render targets.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44655
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-10-01 19:12:33 -07:00
Józef Kucia
dcc608168a
wined3d: Expose viewport array index capability in wined3d_caps.
...
For viewport array indices in shader stages other than geometry.
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-10-01 19:12:31 -07:00
Andrew Wesie
580ea44bc6
wined3d: Use query buffer objects for occlusion queries.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45723
Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-28 20:30:42 +02:00
Francois Gouget
a659194ebd
wined3d: Modernize the macOS spelling.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-28 18:53:31 +02:00
Andrew Wesie
504380a2b3
wined3d: Remove extraneous flush from EndScene.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45724
Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-28 01:12:10 +02:00
Henri Verbeet
fbcdf8c698
ddraw: Only do asynchronous clears when the application asked for them.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-28 01:12:04 +02:00
Henri Verbeet
a6d640e866
wined3d: Do not create DCs for all textures on WINED3D_NO3D adapters.
...
WINED3DFMT_D16_UNORM for example doesn't have a corresponding ddi_format.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-28 01:12:02 +02:00
Henri Verbeet
a470045506
wined3d: Move "texture_size" from struct wined3d_gl_limits to struct wined3d_d3d_limits.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-26 16:50:43 +02:00
Henri Verbeet
8aa30cd793
wined3d: Get rid of the "pointsize_min" and "pointsize_max" fields from struct wined3d_gl_limits.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-26 16:50:41 +02:00
Henri Verbeet
b04220a21d
wined3d: Set a feature level for NO3D adapters.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-26 16:50:39 +02:00
Henri Verbeet
c4ae8973b1
wined3d: Support NPOT textures on NO3D adapters.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-26 16:50:37 +02:00
Józef Kucia
dbaaee8e4d
wined3d: Add GL_ARB_shader_viewport_layer_array extension.
...
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-09-25 21:45:04 +02:00
Józef Kucia
937f4897fd
wined3d: Derive allowed shader versions from the current feature level.
...
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-09-25 21:45:04 +02:00
Józef Kucia
c83a47004a
wined3d: Cleanup fallback cards list.
...
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-09-25 21:45:04 +02:00
Henri Verbeet
b1d6d47c0c
wined3d: Store the wined3d creation flags for NO3D adapters as well.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-25 12:29:08 +02:00
Henri Verbeet
9efa178ee6
wined3d: Do not report WINEDDSCAPS_VIDEOMEMORY for WINED3D_NO3D adapters.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-25 12:29:04 +02:00
Józef Kucia
29533a6cba
wined3d: Introduce wined3d_device_get_feature_level().
...
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-09-24 22:41:30 +02:00
Józef Kucia
7b2ff90404
wined3d: Pass feature levels to wined3d_device_create().
...
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-09-24 22:41:30 +02:00
Józef Kucia
13ec617654
wined3d: Add remaining feature levels.
...
We still don't have proper and exhaustive checks for feature levels
capabilities.
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-09-24 22:41:30 +02:00
Józef Kucia
0fbac19e60
wined3d: Make feature level enum compatible with Direct3D enum.
...
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-09-24 22:41:30 +02:00
Henri Verbeet
1606dd39e2
wined3d: Move the OpenGL texture format to struct wined3d_format_gl.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-24 10:24:31 +02:00
Henri Verbeet
3ad933d5e6
wined3d: Introduce WINED3DFMT_FLAG_BLIT.
...
To indicate whether a particular format can be used for "off-screen plain"
surfaces.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-24 10:24:29 +02:00
Henri Verbeet
723e62ab99
wined3d: Accept "renderer" in addition to "DirectDrawRenderer".
...
Even though the "gdi" renderer is mainly used for ddraw, wined3d itself has no
knowledge of ddraw.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-24 10:24:27 +02:00
Henri Verbeet
e6076c8def
wined3d: Move the OpenGL view class to struct wined3d_format_gl.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-21 23:58:56 +02:00
Henri Verbeet
62ef751633
wined3d: Move the OpenGL vertex format to a separate structure.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-21 23:58:56 +02:00
Józef Kucia
d3da2400e6
wined3d: Store max_clip_distances in struct d3d_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>
2018-09-20 16:37:30 +02:00
Józef Kucia
6d543d237c
wined3d: Allocate memory for formats in wined3d_adapter_init_format_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>
2018-09-20 16:37:28 +02:00
Józef Kucia
ff6d7de8ca
wined3d: Add support for variable-sized format structures.
...
In order to move GL-specific fields into their own structure.
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-09-20 16:37:27 +02:00
Józef Kucia
6a38579d0f
wined3d: Introduce separate function for OpenGL formats initialisation.
...
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-09-20 16:37:25 +02:00
Józef Kucia
a84dad34ae
wined3d: Introduce get_format_by_idx() helper function.
...
In preparation for variable-sized format 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>
2018-09-20 16:37:22 +02:00
Henri Verbeet
859c1d26ce
wined3d: Disallow creating devices without adapters in wined3d_device_create().
...
These days, we have an adapter even with WINED3D_NO3D.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-20 12:34:27 +02:00
Henri Verbeet
8f9a2165e9
wined3d: Rename "wined3d_adapter_opengl" to "wined3d_adapter_gl".
...
For consistency with the filename.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-20 12:34:24 +02:00
Józef Kucia
e1dc8a6d64
wined3d: Apply legacy format swizzles only when requested.
...
We do not want to apply legacy format swizzles for D3D10+.
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-09-18 20:59:38 +02:00
Józef Kucia
a4bcee5dcc
wined3d: Implement vCoverage register.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45848
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-09-18 20:59:38 +02:00
Henri Verbeet
07dad9b150
wined3d: Store the NPOT texture capabilities in struct wined3d_d3d_info.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-18 12:29:25 +02:00
Henri Verbeet
2e34d2e457
wined3d: Reorder the formats in debug_d3dformat() to match the enum order.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-18 12:29:23 +02:00
Henri Verbeet
14cda07a9f
wined3d: Properly initialise the driver info in wined3d_adapter_no3d_init().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-18 12:29:21 +02:00
Henri Verbeet
d76c027ef7
wined3d: Get rid of the "format_count" field from struct wined3d_adapter.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-18 12:29:19 +02:00
Henri Verbeet
db5f14e411
wined3d: Make the resource parameter to wined3d_resource_get_decompress_format() const.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-17 15:40:08 +02:00
Józef Kucia
f9d14d6713
wined3d: Cleanup get_flexible_vertex_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>
2018-09-17 15:39:13 +02:00
Józef Kucia
51db33ca07
wined3d: Move get_flexible_vertex_size() to device.c.
...
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-09-17 15:39:12 +02:00
Józef Kucia
454f87980a
wined3d: Initialise typeless formats after all formats properties are initialised.
...
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-09-17 15:39:10 +02:00
Józef Kucia
34b7e19cdb
wined3d: Initialise typeless_id for typeless formats early.
...
Allows us to use wined3d_format_is_typeless() while initialising
formats.
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-09-17 15:39:08 +02:00
Józef Kucia
15e594ae47
wined3d: Store additional flags directly in wined3d_format_block_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>
2018-09-17 15:39:07 +02:00
Józef Kucia
e1c59f12c5
wined3d: Add missing formats to debug_d3dformat().
...
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-09-17 15:39:05 +02:00
Józef Kucia
62d1b64333
wined3d: Use get_format_internal() to get WINED3DFMT_UNKNOWN.
...
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-09-17 15:39:03 +02:00
Józef Kucia
ea8a88047c
wined3d: Set WINED3DFMT_FLAG_COMPRESSED based on format block 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>
2018-09-14 19:09:50 +02:00
Józef Kucia
2b56410081
wined3d: Use >= for shader model checks in feature_level_from_caps().
...
Spotted by Matteo Bruni.
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-09-14 19:09:47 +02:00
Henri Verbeet
a220669f33
wined3d: Introduce WINED3DFMT_FLAG_VERTEX_ATTRIBUTE.
...
To indicate a format can be used for vertex attributes.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-14 12:48:31 +02:00
Henri Verbeet
39e19d2d21
wined3d: Use a table for colour fixups in apply_format_fixups().
...
This ends up being slightly more code, but I think the table is much more
readable.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-13 19:17:12 +02:00
Henri Verbeet
cff217f9fc
wined3d: Handle lack of ARB_half_float_vertex in format_vertex_info[].
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-13 19:17:11 +02:00
Henri Verbeet
05792f6476
wined3d: Move ARB_vertex_array_bgra handling to init_format_vertex_info().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-13 19:17:09 +02:00
Józef Kucia
453e47d910
wined3d: Add support for 1D UAVs in shaders.
...
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-09-11 16:15:10 +02:00
Henri Verbeet
19a532ca0a
wined3d: Derive format component counts from the component info.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-10 12:31:43 +02:00
Henri Verbeet
9781ef76fa
wined3d: Introduce WINED3DFMT_FLAG_NORMALISED.
...
Derived from the component info.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-10 12:31:42 +02:00
Henri Verbeet
8ad9f777b8
wined3d: Add component info for R10G10B10X2_SNORM and R10G10B10X2_UINT.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-10 12:31:40 +02:00
Henri Verbeet
ccbee769a4
wined3d: Get rid of the "attribute_size" field in struct wined3d_format.
...
Note that "byte_count" is 4 for R10G10B10X2_UINT/R10G10B10X2_SNORM, while
"attribute_size" is 6. I think 4 is correct.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-10 12:31:38 +02:00
Józef Kucia
b457352f0c
wined3d: Add support for A8_UNORM render targets.
...
Not supported in core contexts yet.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44655
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-09-07 18:18:57 +02:00
Józef Kucia
eec2f1db5d
wined3d: Try to avoid allocating sysmem for GPU buffers with initial data.
...
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-09-07 18:18:55 +02:00
Józef Kucia
3cd28caf17
wined3d: Fix initial data for non-GPU buffers.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44655
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-09-07 18:18:51 +02:00
Józef Kucia
490c6d548a
wined3d: Allow wined3d_device_update_sub_resource() only on GPU accessible resources.
...
wined3d_device_update_sub_resource() should work only on
D3D11_USAGE_DEFAULT resources.
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-09-07 18:18:48 +02:00
Andrew Wesie
c3af72019e
wined3d: Use raw blit for supported depth-stencil blits.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45747
Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-03 19:43:48 +02:00
Józef Kucia
6edf38c205
wined3d: Use get_format_internal() in init_format_filter_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>
2018-08-30 20:27:13 +02:00
Józef Kucia
a301ba64d5
wined3d: Use get_format_internal() 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>
2018-08-30 20:27:11 +02:00
Józef Kucia
5080d3c1c1
wined3d: Move formats from gl_info to wined3d_adapter.
...
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-08-30 20:27:09 +02:00
Józef Kucia
25d55c4209
wined3d: Avoid accessing gl_info in vertexdeclaration_init().
...
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-08-27 17:34:45 +02:00
Józef Kucia
dfdecfc2eb
wined3d: Pass context to wined3d_texture_set_compatible_renderbuffer().
...
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-08-27 17:34:43 +02:00
Józef Kucia
619c54f49a
wined3d: Add max_rt_count field to d3d_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>
2018-08-27 17:34:40 +02:00
Józef Kucia
95a051b333
wined3d: Store max point size in d3d_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>
2018-08-23 20:12:33 +02:00
Józef Kucia
9320424105
wined3d: Pass wined3d_adapter to wined3d_get_format().
...
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-08-23 20:12:29 +02:00
Józef Kucia
4df05c37db
wined3d: Get rid of unused gl_info parameters.
...
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-08-23 20:12:25 +02:00
Henri Verbeet
f7904211a2
wined3d: Make the adapter responsible for creating GL contexts.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-22 19:44:40 +02:00
Józef Kucia
760b0de7f4
wined3d: Use local gl_info variable in wined3d_get_device_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>
2018-08-21 23:02:31 +02:00
Józef Kucia
bd398e319c
wined3d: Get gl_info from context in query_issue() functions.
...
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-08-21 23:02:31 +02:00
Józef Kucia
5546f2914a
wined3d: Get D3D and GL info from context in create_dummy_textures().
...
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-08-21 23:02:31 +02:00
Józef Kucia
aa955a80e6
wined3d: Pass context to find_arb_pshader().
...
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-08-21 23:02:31 +02:00
Józef Kucia
2f917d79be
wined3d: Simplify shader_arb_destroy().
...
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-08-21 23:02:30 +02:00
Józef Kucia
24e609735b
wined3d: Allow multisample resolve for typeless resources.
...
It may perform an undesired format conversion in rare cases.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39754
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-08-20 17:27:12 +02:00
Henri Verbeet
cf9536b6bf
wined3d: Move OpenGL initialisation code to adapter_gl.c.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-17 18:47:00 +02:00
Józef Kucia
2aa5b0011a
wined3d: Allow copying between different texture types.
...
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-08-16 13:06:09 +02:00
Józef Kucia
64be197458
wined3d: Mark vOutputControlPointID register as scalar.
...
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-08-16 13:06:09 +02:00
Józef Kucia
becec522c4
wined3d: Use snprintf() in shader_arb_request_a0() (Coverity).
...
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-08-16 13:06:09 +02:00
Józef Kucia
f51f911ae5
wined3d: Use snprintf() in init_debug_buffer() (Coverity).
...
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-08-16 13:06:09 +02:00
Józef Kucia
bdc0a99012
wined3d: Add fall through comment in texture2d_blt_fbo() (Coverity).
...
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-08-16 12:45:11 +02:00
Henri Verbeet
8e537aa709
wined3d: Set a LUID for WINED3D_NO3D adapters as well.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 11:07:37 +02:00
Henri Verbeet
b96a6771a8
wined3d: Share common code between wined3d_adapter_init() and wined3d_adapter_no3d_init().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 11:07:37 +02:00
Henri Verbeet
8a6d3b3ea2
wined3d: Rename wined3d_adapter_init_nogl() to wined3d_adapter_no3d_init().
...
Matching WINED3D_NO3D.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 11:07:37 +02:00
Henri Verbeet
7591c8b6e4
wined3d: Trace command stream opcodes.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 11:07:37 +02:00
Henri Verbeet
43fc25b1fb
wined3d: Rename build_dxtn_alpha_table() to build_bc3_alpha_table().
...
Since it's specific to BC3, as pointed out by Matteo.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 11:07:37 +02:00
Henri Verbeet
cee95b7853
wined3d: Pass a wined3d_string_buffer to shader_glsl_get_register_name().
...
Instead of hoping that 150 characters is plenty.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 20:55:09 +02:00
Henri Verbeet
c90ce7b9a3
wined3d: Get rid of the "reg_name" field in struct glsl_src_param.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 20:55:09 +02:00
Henri Verbeet
dd282d3e8c
wined3d: Make the "is_color" parameter to shader_glsl_get_register_name() optional.
...
Not all callers care.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 20:55:09 +02:00