Commit Graph

381 Commits

Author SHA1 Message Date
Zebediah Figura 8c4061a778 wined3d: Pass a wined3d_device_context to wined3d_device_copy_sub_resource_region().
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>
2021-04-07 15:48:31 +02:00
Zebediah Figura e516e5e936 ddraw: Use wined3d_device_context methods.
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>
2021-04-06 22:46:12 +02:00
Paul Gofman 06255e6991 ddraw: Do not require specific texture location for blits.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-12 18:08:30 +01:00
Paul Gofman 2f938ef3ec ddraw: Track location for surfaces with the second texture.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-12 18:08:26 +01:00
Paul Gofman d2d9f713df ddraw: Create the second texture for system memory bindable surfaces.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-12 18:08:08 +01:00
Paul Gofman fb6b5ce72e ddraw: Store hardware_device flag in struct d3d_device.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-12 18:08:00 +01:00
Zhiyi Zhang 9288f31015 dxgi: Update swapchain containing output after Alt+Enter was used to exit fullscreen.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 16:21:33 +02:00
Paul Gofman 3acc26dc22 ddraw: Check surface flags when marking surface as lost.
Fixes a regression triggered by 530a3d94de.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48923
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-17 19:40:04 +02:00
Paul Gofman e1a79d4d7c ddraw: Convert BOOL flags to bitfields in ddraw_surface.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-17 19:40:01 +02:00
Paul Gofman d0ff5e66a7 ddraw: Reserve extra space for video memory surfaces in compatibility mode.
Some old apps write surface data past the end of locked space. That
used to work on early ddraw hardware as locked surface provided
direct access to video memory mapped to CPU address space and such
access could often go without issues. Currently ddraw on Windows
allocates bigger buffers for video memory surfaces when 8 or 16 bit
display mode is requested.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48788
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 15:53:54 +02:00
Matteo Bruni 140186b0c3 ddraw: Store primary stateblock state pointer in the device.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-18 16:53:00 +01:00
Zhiyi Zhang a0dbb1e469 wined3d: Refactor wined3d_enum_adapter_modes() to wined3d_output_get_mode().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 19:49:33 +01:00
Zebediah Figura 0774e76802 ddraw: Retrieve transform state from the primary stateblock.
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>
2020-02-28 16:39:01 +01:00
Zebediah Figura 7b3419375d ddraw: Retrieve textures from the primary stateblock.
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>
2020-02-27 23:34:51 +01:00
Zebediah Figura db9db753c3 ddraw: Track the primary stateblock state locally.
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-10-23 21:03:49 +02:00
Zebediah Figura 7360e7d488 wined3d: Return a wined3d_stateblock from wined3d_device_begin_stateblock().
And hold it locally in d3d[789].

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-09-26 21:00:13 +02:00
Alexandre Julliard 0d48c2e796 ddraw: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-02 10:00:29 +02:00
Paul Gofman 166a1d462c ddraw: Store _TEXTUREMAPBLEND state instead of guessing it from wined3d states.
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-06-21 08:04:58 +02:00
Paul Gofman 83ca9a95de ddraw: Increase maximum active light count.
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-06-11 23:24:51 +02:00
Paul Gofman d864cece53 ddraw: Do not limit inactive light count in viewport.
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-06-11 23:24:45 +02:00
Paul Gofman 87a0edafbb ddraw: Factor out viewport_alloc_active_light_index() function.
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-06-11 23:24:42 +02:00
Paul Gofman 8bc7139b6f ddraw: Fix setting current viewport for ddraw1.
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-16 20:54:23 +02:00
Zebediah Figura f9b9004f81 ddraw: Return D3DERR_INBEGINSTATEBLOCK when BeginStateBlock() is called while recording.
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-04-05 22:16:31 +02:00
Paul Gofman addc611b2a ddraw: Fix ddraw[1-4] light activation / deactivation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42572
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-04-01 23:25:49 +02:00
Stefan Dösinger 347efb985c ddraw: Don't operate on stored invalid clippers.
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>
2019-03-22 20:31:54 +01:00
Henri Verbeet 0a2b0d4a95 ddraw: Return the correct swapchain surface in ddraw7_GetGDISurface().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 16:35:38 +01:00
Józef Kucia f4865564ec ddraw: Do not return unset viewport from GetViewport().
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-12 16:44:20 +01:00
Michael Stefaniuc 962b31c80b include: Add a generic available ARRAY_SIZE().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-04 10:39:15 +02:00
Henri Verbeet a362daeaf5 ddraw: Copy the entire front-buffer surface after a buffer swap.
wined3d_swapchain_present() will invalidate everything except
WINED3D_LOCATION_DRAWABLE, which means a partial blit to the front-buffer
afterwards might need to read the drawable contents back to the texture. For
P8 front-buffers that's problematic, because the original palette indices are
lost. We may want to improve the wined3d side of this to avoid reading back
the drawable, but copying the entire surface in ddraw in this situation seems
like a good idea regardless.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-30 16:52:05 +02:00
Henri Verbeet 034e88e038 ddraw: Take the flip interval into account in ddraw_surface7_Flip().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-27 16:13:18 +02:00
Henri Verbeet 72c31c146b ddraw: Explicitly translate resource map flags.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-16 14:24:58 +01:00
Henri Verbeet 9cc7c6e99f ddraw: Use the global memory allocation helpers.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-13 20:23:26 +01:00
Józef Kucia a7186d79d9 ddraw: Store all 32 user clip planes.
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-05 20:30:06 +01:00
Henri Verbeet 381cd03eb3 ddraw: Implement depth/colour fills on top of wined3d_device_clear_rendertarget_view().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-30 09:01:57 +02:00
Francois Gouget b7d0b4d8a6 ddraw: Make ddraw_surface_release_iface() static.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-24 20:51:15 +01:00
Francois Gouget d2aa533b9c ddraw: Make ddraw_destroy_swapchain() static.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-17 15:54:08 +01:00
Józef Kucia c7f3308db7 wined3d: Add support for seamless cube map filtering.
Seamless cube map filtering should always be enabled in 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>
2017-03-08 16:37:35 +01:00
Matteo Bruni 68709850f1 ddraw: Get rid of multiple interfaces from vertex buffer objects.
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-02-27 09:56:25 +01:00
Józef Kucia 2bef0eafd0 ddraw: Relax "dwSize" validation in ddraw_surface*_Lock().
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-01-25 15:52:35 +01:00
Henri Verbeet c7c0415689 ddraw: Keep an explicit reference to the wined3d device in surfaces.
Version 1 and version 2 surfaces don't keep references to the ddraw interface
that created them, so such surfaces may get destroyed after the corresponding
ddraw object was destroyed. Wined3d requires that the device is destroyed
after all its resources are destroyed. In principle this issue always existed,
but it was probably made worse by changes in the texture cleanup code.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-04 11:11:09 +01:00
Józef Kucia ffcea8af77 wined3d: Implement primitive restart.
Based on a patch by Andrew Wesie.

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>
2016-12-08 13:54:06 +01:00
Stefan Dösinger 15fc10a728 ddraw: Avoid redundant src vertex buffer discards.
Signed-off-by: Stefan Dösinger <stefandoesinger@gmx.at>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-15 13:46:14 -06:00
Stefan Dösinger 72eab6f214 ddraw: Avoid redundant index buffer discards.
Signed-off-by: Stefan Dösinger <stefandoesinger@gmx.at>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-15 13:46:12 -06:00
Stefan Dösinger 0d91d86bba ddraw: Use wined3d_device_process_vertices for execute buffers.
Signed-off-by: Stefan Dösinger <stefandoesinger@gmx.at>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-15 13:46:06 -06:00
Stefan Dösinger b7c9d14e8e ddraw: Use d3d buffers for executebuffer data.
Signed-off-by: Stefan Dösinger <stefandoesinger@gmx.at>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-31 15:40:46 +01:00
Henri Verbeet 6e7d370209 ddraw: Rename "wineD3DVertexDeclaration" to "wined3d_declaration".
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-26 23:23:46 +09:00
Henri Verbeet d2b782f4e4 ddraw: Rename "wineD3DVertexBuffer" to "wined3d_buffer".
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-26 23:23:45 +09:00
Henri Verbeet db42c500e2 ddraw: Rename "wineD3DPalette" to "wined3d_palette".
For consistency with other D3D libraries.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-26 23:23:45 +09:00
Nikolay Sivov a4fabd283d ddraw: Fix its vs it's typos.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-02 06:08:44 -05:00
Józef Kucia e47a735f76 wined3d: Add wined3d creation flag for selecting unbound resource color.
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>
2016-05-23 19:23:45 +09:00