Commit Graph

1555 Commits

Author SHA1 Message Date
Sebastian Lackner 7fbdb54ee4 wined3d: Trigger frontbuffer update in surface_cpu_blt.
Fixes a regression introduced in ee17d7ba1b.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-19 19:20:06 +02:00
Sebastian Lackner a77d957da8 wined3d: Fix memory leaks in blitter_destroy callbacks.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-19 09:48:24 +02:00
Henri Verbeet e091c6e81c wined3d: Only translate coordinates for swapchain surfaces in surface_translate_drawable_coords().
This fixes a regression introduced by commit
dbd8c89ea8. When using ORM_BACKBUFFER,
off-screen surfaces may be loaded into WINED3D_LOCATION_DRAWABLE. They
shouldn't be flipped in that case.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-22 13:45:08 +02:00
Henri Verbeet d371468858 wined3d: Allow (some) blits with fixups in the arbfp and ffp blitters with ORM_BACKBUFFER.
When using ORM_BACKBUFFER, formats with fixups may need to be loaded into
WINED3D_LOCATION_DRAWABLE. Before commit
cad4badbcf, surface_load_drawable() would always
use the device blitter, without checking whether the blitter actually supports
the blit. The FBO blitter would be able to handle these blits, but is
unavailable when using ORM_BACKBUFFER.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-22 13:45:08 +02:00
Matteo Bruni 1ed54d6ce3 wined3d: Release context on CPU blit failure.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-08 10:10:40 -05:00
Henri Verbeet 2f0b945235 wined3d: Use the CPU blitter for clearing depth/stencil textures that are current in the map binding.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-02 15:38:48 +02:00
Henri Verbeet aa199aca5c wined3d: Print a FIXME if the view format doesn't match the resource format in surface_cpu_blt_colour_fill().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-02 15:38:48 +02:00
Henri Verbeet 5ff2fdc452 wined3d: Make blits asynchronous by default.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-25 08:44:54 +02:00
Henri Verbeet 62ca4f3826 wined3d: Introduce context functions to map/unmap a wined3d_bo_address.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-21 10:53:53 +02:00
Henri Verbeet da321cebf7 wined3d: Use wined3d_texture_get_memory() in surface_cpu_blt_colour_fill().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-20 09:51:30 +02:00
Henri Verbeet ee17d7ba1b wined3d: Use wined3d_texture_get_memory() in surface_cpu_blt().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-20 09:51:28 +02:00
Henri Verbeet b7140a212d wined3d: Use the CPU blitter for clearing textures that are current in the map binding.
In order to avoid bouncing them between the CPU and GPU. This fixes a
regression instroduced by commit 381cd03eb3.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-20 09:51:22 +02:00
Henri Verbeet 5a9a2b4cce wined3d: Use wined3d_texture_get_memory() in surface_convert_format().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-13 09:09:14 +02:00
Henri Verbeet b7146d81f2 wined3d: Do not add wined3d internal resources to the device resource list.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-13 09:09:01 +02:00
Henri Verbeet ecbc1cb623 wined3d: Use the "arbfp" blitter for P8 and YUV blits.
This fixes a regression introduced by commit
cad4badbcf. In particular, before that commit,
surface_load_drawable() would always use the device blitter, without checking
whether that blitter claims to support the blit in question. As it turns out,
the FBO blitter claims to support them, and the arbfp blitter claims not to
support them.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-13 09:08:57 +02:00
Henri Verbeet 1b034f7fdb wined3d: The source texture is always non-NULL in surface_cpu_blt().
Since fills no longer go through the blitter.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-12 09:46:32 +02:00
Henri Verbeet 3e36857557 wined3d: The destination width and height are always valid in surface_cpu_blt().
Since they have been validated by the caller.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-12 09:46:29 +02:00
Henri Verbeet 2310378042 wined3d: Require a valid source rectangle in surface_upload_from_surface().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-11 14:58:58 +02:00
Henri Verbeet f243302ed5 wined3d: Require a valid destination point in surface_upload_from_surface().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-11 14:58:56 +02:00
Henri Verbeet c1ebab1a4b wined3d: Unify the 2D and 3D paths in wined3d_device_update_texture().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-11 14:58:52 +02:00
Henri Verbeet 26d7f99125 wined3d: Assume identical source and destination formats in surface_upload_from_surface().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-07 11:37:38 +02:00
Henri Verbeet c2c1ffe416 wined3d: Handle formats with conversions outside surface_upload_from_surface().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-07 11:37:30 +02:00
Henri Verbeet ecf1bbd525 wined3d: Get rid of surface_get_rect().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-06 19:00:26 +02:00
Józef Kucia 26b7baa0dd wined3d: Store render target info instead of surfaces in "blit_targets".
In preparation for extending render target views support.

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-04-06 12:43:19 +02:00
Henri Verbeet b98ece0d38 wined3d: Use the blitter interface in wined3d_cs_exec_clear().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-04 09:42:30 +02:00
Henri Verbeet 52979b6b29 wined3d: Pass the draw rectangle to wined3d_blitter_ops.blitter_clear().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-04 09:42:28 +02:00
Henri Verbeet d8f9b6b7f7 wined3d: Pass a wined3d_fb_state structure to wined3d_blitter_ops.blitter_clear().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-04 09:42:26 +02:00
Henri Verbeet ce5b25b8bc wined3d: Reduce indentation in the colour blit case in wined3d_surface_blt().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-04 09:42:23 +02:00
Henri Verbeet cad4badbcf wined3d: Get rid of wined3d_select_blitter().
Instead, chain the blitters themselves. This also fixes the issue that
currently only a single blitter can store extra data in the "blit_priv" field
of struct wined3d_device.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-04 09:42:21 +02:00
Henri Verbeet f2459e5527 wined3d: Implement cpu_blit_blit_surface().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-03 12:00:05 +02:00
Henri Verbeet 5e40695310 wined3d: Use resource.map_binding as destination location for blits to WINED3D_POOL_SYSTEM_MEM textures.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-03 12:00:04 +02:00
Henri Verbeet 03e85bf991 wined3d: Merge wined3d_blitter_ops.color_fill() and wined3d_blitter_ops.depth_fill().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-03 12:00:04 +02:00
Henri Verbeet 4b4091fa62 wined3d: Make the FBO blitter a proper blitter.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-31 08:51:29 +02:00
Henri Verbeet 493502b54b wined3d: Pass a wined3d_rendertarget_view to surface_cpu_blt_colour_fill().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-30 09:02:04 +02:00
Henri Verbeet e19e15d317 wined3d: Remove WINED3D_BLT_DEPTH_FILL support from wined3d_texture_blit().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-30 09:02:02 +02:00
Henri Verbeet aec8015c3b wined3d: Remove WINED3D_BLT_COLOR_FILL support from wined3d_texture_blit().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-30 09:01:59 +02:00
Henri Verbeet 4bb1565a54 wined3d: Introduce a separate function for doing colour fills in the CPU blitter.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-29 08:46:30 +02:00
Henri Verbeet a6862f9170 wined3d: Rename struct blit_shader to struct wined3d_blitter_ops.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-27 10:58:01 +02:00
Henri Verbeet df6b402026 wined3d: Get rid of blit_shader.set_shader() and blit_shader.unset_shader().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-27 10:57:59 +02:00
Henri Verbeet dbd8c89ea8 wined3d: Pass the destination location to blit_shader.blit_surface().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-23 17:08:00 +01:00
Henri Verbeet bedb40e5af wined3d: Properly handle back-buffers in surface_translate_drawable_coords().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-23 17:07:59 +01:00
Henri Verbeet 5ab99b1643 wined3d: Merge surface_blt_to_drawable() into surface_load_drawable().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-21 20:52:04 +01:00
Henri Verbeet cbede20ae8 wined3d: Use blit_shader.blit_surface() in surface_blt_to_drawable().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-21 20:52:01 +01:00
Henri Verbeet 8c9990157d wined3d: Get rid of the (now) redundant "alpha_test" parameter to surface_blt_to_drawable().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-21 20:51:48 +01:00
Henri Verbeet 07a6637d7e wined3d: Inline surface_blt_to_drawable() into ffp_blit_blit_surface().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-21 20:51:46 +01:00
Henri Verbeet d85d977a35 wined3d: Modify resource locations in wined3d_surface_blt() instead of the blitters.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-17 14:42:38 +01:00
Henri Verbeet 717225bf9b wined3d: Pass a context to blit_shader.blit_surface().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-17 14:42:34 +01:00
Henri Verbeet ad46b67674 wined3d: Create and destroy surface DCs through the CS.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-17 14:42:25 +01:00
Henri Verbeet 54c3f5c0bc wined3d: Validate blit parameters in wined3d_texture_blt().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-07 09:00:54 +01:00
Henri Verbeet aaa431d8a8 wined3d: Use wined3d_texture_blt() in surface_upload_from_surface().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-07 09:00:52 +01:00