Zebediah Figura
5ec0b75993
wined3d: Fix the spelling of a comment.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-06 21:40:22 +01:00
Paul Gofman
cf2bd824e2
wined3d: Support stretching compressed format surfaces in surface_cpu_blt().
...
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-12-02 22:02:56 +01:00
Paul Gofman
a73a892f46
wined3d: Use software decompression for converting from compressed format.
...
The motivation under this is not just supporting conversion between
compressed formats. Currently fallback CPU blitter cannot convert
from DXTn formats at all, this patch allows for that if software
decompression function is available.
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-11-11 20:01:40 +01:00
Henri Verbeet
810ae882f0
wined3d: Handle typeless formats in surface_cpu_blt().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-24 17:32:13 +02:00
Henri Verbeet
c2f0ae50b4
wined3d: Use explicit flushing in wined3d_context_gl_unmap_bo_address().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:17 +02:00
Henri Verbeet
2bc6941ab0
wined3d: Derive the GL bind point for buffer object maps from the bind flags.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:17 +02:00
Alex Henrie
6c40c2dab2
wined3d: Avoid dead assignment (scan-build).
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-20 15:31:23 +02:00
Henri Verbeet
af8401ba0c
wined3d: Introduce WINED3D_TEXTURE_DOWNLOADABLE.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 14:12:49 +02:00
Henri Verbeet
400a0dcc8b
wined3d: Map/unmap bo addresses through the adapter.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-16 10:09:04 +02:00
Henri Verbeet
3de4515c18
wined3d: Implement 3D texture clears in surface_cpu_blt_colour_fill().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-15 20:17:09 +02:00
Henri Verbeet
0a0ab960fb
wined3d: Set WINED3D_BLT_RAW for raw blits in cpu_blitter_blit().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-15 20:17:07 +02:00
Matteo Bruni
493f4098c6
wined3d: Allow cross-swapchain blits in the supported cases.
...
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-08-14 14:30:48 +02:00
Matteo Bruni
cdacbd9850
wined3d: Get rid of surface_blt_special() fallback in wined3d_surface_blt().
...
It turns out it was actually dead code. The last remaining caller was
the cross-swapchain blit case but surface_blt_special() actually
rejected those (or any swapchain to swapchain blit).
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-08-14 14:30:43 +02:00
Matteo Bruni
b3bf2c4f26
wined3d: Clean up fallback paths in wined3d_surface_blt().
...
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-08-14 14:30:39 +02:00
Henri Verbeet
74b9ef2c1d
wined3d: Move the "gl_info" field 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-08-07 19:56:16 +02:00
Henri Verbeet
bed677e343
wined3d: Move the "desc" field from struct wined3d_swapchain to struct wined3d_swapchain_state.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 08:30:11 +02:00
Henri Verbeet
96a0a54c52
wined3d: Acquire front-buffer contexts when blitting to the drawable in texture2d_blt_fbo().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 08:29:29 +02:00
Henri Verbeet
1f8a3b04b9
wined3d: Move texture2d_load_renderbuffer() to texture.c.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-25 08:27:21 +02:00
Henri Verbeet
7fae37c0e1
wined3d: Move texture2d_load_drawable() to texture.c.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 10:08:27 +02:00
Henri Verbeet
f89a303bcb
wined3d: Pass a wined3d_context_gl structure to context_draw_textured_quad().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-20 08:47:29 +02:00
Henri Verbeet
c4ba02aac4
wined3d: Use texture2d_load_texture() in texture1d_load_location().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-19 10:26:16 +02:00
Henri Verbeet
410cf7d24c
wined3d: Use texture2d_load_sysmem() in texture1d_load_location().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-17 20:47:46 +02:00
Henri Verbeet
2d36c1c253
wined3d: Upload texture data through the texture ops in surface_convert_format().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-12 16:11:38 +02:00
Henri Verbeet
ed9a6a2d67
wined3d: Pass a wined3d_context_gl structure to wined3d_texture_prepare_texture().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-12 16:11:30 +02:00
Henri Verbeet
e3d28cd45d
wined3d: Pass a wined3d_context_gl structure to context_unmap_bo_address().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-12 16:11:28 +02:00
Henri Verbeet
fd29561e97
wined3d: Pass a wined3d_context_gl structure to context_map_bo_address().
...
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
e0d9bc3a87
wined3d: Move the "valid" field 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:33 +02:00
Henri Verbeet
6937b98700
wined3d: Make the adapter responsible for acquiring and releasing contexts.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 16:44:45 +02:00
Henri Verbeet
de035b71ab
wined3d: Move the WGL 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-03 22:33:30 +02:00
Henri Verbeet
916bd0e4c2
wined3d: Use wined3d_texture_get_level_box() in texture2d_load_texture().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-20 12:20:43 +02:00
Henri Verbeet
74ed5d722f
wined3d: Pass a wined3d_context_gl structure to context_get_offscreen_gl_buffer().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-20 12:20:36 +02:00
Henri Verbeet
9cb572cb70
wined3d: Pass a wined3d_context_gl structure to context_set_draw_buffer().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 19:26:25 +02:00
Henri Verbeet
49889f72d7
wined3d: Pass a wined3d_context_gl structure to context_check_fbo_status().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 19:26:22 +02:00
Henri Verbeet
907b2a3333
wined3d: Pass a wined3d_context_gl structure to context_apply_fbo_state_blit().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 19:26:20 +02:00
Henri Verbeet
77bc74c637
wined3d: Pass a wined3d_context_gl structure to wined3d_texture_gl_bind_and_dirtify().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-09 10:01:53 -05:00
Henri Verbeet
d29f0545b2
wined3d: Pass a wined3d_context_gl structure to context_apply_ffp_blit_state().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-09 10:01:48 -05:00
Henri Verbeet
54945f04de
wined3d: Pass a wined3d_context_gl structure to context_apply_blit_state().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-09 10:01:44 -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
Henri Verbeet
a5279a5fba
wined3d: Also update the "src_texture_gl" pointer when using a staging texture in the blitter.
...
Astutely spotted by Józef Kucia.
This fixes a regression introduced by commit
961a94ac04
.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-27 22:09:04 +01:00
Henri Verbeet
7551f01bd0
wined3d: Do not take "draw_rect" into account when comparing attachment sizes in ffp_blitter_clear().
...
The scissor rectangle and viewport shouldn't affect whether attachment sizes
are equal. The Intel i965 driver will do a fast clear when the scissor
rectangle overlaps the intersection of the attachments, and that behaviour is
allowed by the OpenGL spec. This commit fixes failures in the d3d8 and d3d9
depth_buffer_test() tests on the Intel i965 driver.
See also commit 0530f33cc1
.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-27 22:09:02 +01:00
Józef Kucia
5fc64a3057
wined3d: Remove unnecessary src_format NULL check from ffp_blit_supported().
...
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-02-12 23:02:28 +01:00
Józef Kucia
e37b9c74f0
wined3d: Avoid potential out-of-bounds memory access in surface_cpu_blt_colour_fill().
...
Draw rects are derived from the current viewport. It is possible to produce a
clear operation with a draw rect which lies completely outside of one of render
targets in D3D9.
It seems that we never use the CPU blitter for D3D9 render target clears, so it
might not be a problem in practice.
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-01-17 16:14:05 +01:00
Józef Kucia
8a2583c7d9
wined3d: Limit surface_cpu_blt_colour_fill() to dimensions of render target view.
...
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-01-10 12:33:09 -06:00
Józef Kucia
0530f33cc1
wined3d: Split clears for different size resources in ffp_blitter_clear().
...
We cannot reliably clear attachments of different sizes using a single glClear()
command. The OpenGL spec says:
"If the attachment sizes are not all identical, the results of rendering are
defined only within the largest area that can fit in all of the attachments.
This area is defined as the intersection of rectangles having a lower left of
(0, 0) and an upper right of (width, height) for each attachment. Contents of
attachments outside this area are undefined after execution of a rendering
command (as defined in section 2.4)."
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46067
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-01-10 12:33:03 -06:00
Józef Kucia
cd3c3e56b1
wined3d: Use accurate rt_count in ffp_blitter_clear().
...
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-01-10 12:32:58 -06: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
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
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