Commit Graph

732 Commits

Author SHA1 Message Date
Zebediah Figura 1124edd281 d3d11: Fail OMSetRenderTargets() if any of the views have the wrong binding flags.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:21:44 +02:00
Zebediah Figura 9fdc3fd8bb wined3d: Introduce a wined3d_bound_range() helper.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 18:14:35 +02:00
Zebediah Figura ea5041c68a wined3d: Pass a wined3d_device_context to wined3d_device_set_primitive_type().
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-21 21:20:55 +02:00
Zebediah Figura a313daea70 wined3d: Pass a wined3d_device_context to wined3d_device_get_depth_stencil_view().
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-20 22:57:10 +02:00
Zebediah Figura 40e1072117 wined3d: Pass a wined3d_device_context to wined3d_device_get_rendertarget_view().
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-20 22:57:10 +02:00
Zebediah Figura 9a8c5259bb wined3d: Pass a wined3d_device_context to wined3d_device_get_scissor_rects().
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-16 22:39:46 +02:00
Zebediah Figura cdcc2ade6e wined3d: Pass a wined3d_device_context to wined3d_device_get_viewports().
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-16 22:39:46 +02:00
Zebediah Figura 5c7057d229 wined3d: Pass a wined3d_device_context to wined3d_device_resolve_sub_resource().
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:43 +02:00
Zebediah Figura 86dcbadffb wined3d: Pass a wined3d_device_context to wined3d_texture_blt().
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:35 +02:00
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 19d5e7cae2 d3d8: 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
Zebediah Figura 1c810a64b7 wined3d: Check for a valid index buffer in d3d[89]_device_DrawIndexedPrimitive().
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-01 18:18:31 +02:00
Zhiyi Zhang d3e088cc00 wined3d: Specify a wined3d output for swapchain creation.
As tests showed, DirectDraw, Direct3D 8 and 9 always use the adapter
specified in the device creation parameters regardless of the device
window position when creating a swapchain. Whereas DXGI uses the device
window position to determine which DXGI output to use.

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-05-13 22:07:32 +02:00
Zhiyi Zhang 97fce0b3af d3d8: Store a struct d3d8 in struct d3d8_device.
So that d3d_parent->wined3d_outputs can be directly accessed in device.

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-05-13 22:07:32 +02:00
Chip Davis 42e932e63f wined3d: Remove WINED3D_RS_EDGEANTIALIAS.
Handle this render state similarly to D3DRS_ZFUNC, by mapping it in the
client DLLs.

As far as I can tell, save for the fact that it's only supposed to apply
to lines forming a convex outline, it's roughly equivalent to
D3DRS_ANTIALIASEDLINEENABLE. We definitely handled it the same way.

Curiously, even though we supported the render state, we didn't set the
corresponding capability bit. Do that now.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-17 19:40:26 +02:00
Chip Davis 36cd136a6b d3d8: Explicitly cast FourCC formats in d3dformat_from_wined3dformat() and wined3dformat_from_d3dformat().
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:42 +02:00
Chip Davis 3b5ae3c5fa d3d8: Introduce a helper to convert d3d8 primitive types to wined3d types.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 17:25:34 +02:00
Chip Davis 37e8cf5d45 d3d8: Introduce a helper to convert d3d8 render states to wined3d states.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 17:25:32 +02:00
Chip Davis 20a7056db1 d3d8: Introduce a helper to convert d3d8 transform states to wined3d states.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 17:25:28 +02:00
Chip Davis 9937a26b1a d3d8: Introduce a helper to convert d3d8 device types to wined3d types.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 17:25:26 +02:00
Chip Davis 43104e37ad d3d8: Introduce helpers to convert between d3d8 and wined3d multisample types.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 17:25:24 +02:00
Zhiyi Zhang 49bf4a8707 wined3d: Move cursor size check against display mode out of wined3d_device_set_cursor_properties().
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-31 17:24:16 +02:00
Zhiyi Zhang c8889fb9fb d3d8: Report d3d8 adapter ordinal in d3d8_device_GetCreationParameters().
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-23 21:30:27 +01:00
Zhiyi Zhang 2e6dc57f31 d3d8: Report d3d8 adapter ordinal in device caps.
d3d8 adapters are actually outputs in wined3d.

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-16 21:31:07 +01:00
Zhiyi Zhang e6368b9c10 wined3d: Pass a struct wined3d_adapter pointer to wined3d_get_device_caps().
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-16 21:30:58 +01:00
Zhiyi Zhang a8072e0841 wined3d: Pass a struct wined3d_adapter pointer to wined3d_device_create().
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-11 15:55:00 +01:00
Matteo Bruni 9d764892ee d3d8: Range-check GetPixelShaderConstant() indices to the d3d8 limit.
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-06 17:53:04 +01:00
Matteo Bruni 417c36ccb7 d3d8: 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-06 17:53:00 +01:00
Henri Verbeet 7622d97f78 d3d8: Avoid checking the stage index in d3d8_device_GetTextureStageState() (Coverity).
The correct limit for d3d8 would be WINED3D_MAX_TEXTURES, since that's the
size of the "texture_states" array. However, the original code didn't check
the stage index at all, so simply remove it.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 20:01:40 +01:00
Matteo Bruni 565f7b4494 d3d8: Fix texture stage index checks.
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-02-27 23:34:51 +01:00
Zebediah Figura 6384f4c4e7 d3d8: Stop setting the device state in d3d8_device_SetLight() and d3d8_device_LightEnable().
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-26 22:33:11 +01:00
Zebediah Figura f7d744e9c5 d3d8: Retrieve light 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-26 22:33:08 +01:00
Zebediah Figura 7e0e1859d1 d3d8: Stop setting the device state in d3d8_device_SetViewport().
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-26 22:33:05 +01:00
Zebediah Figura 3fa7bd141a d3d8: Retrieve the viewport 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-26 22:33:02 +01:00
Zebediah Figura 6c0c191a31 d3d8: Stop setting the device state in d3d8_device_SetMaterial().
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-25 23:43:18 +01:00
Zebediah Figura b0b8fb9949 d3d8: Retrieve the material 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-25 23:43:18 +01:00
Zebediah Figura a0ba270ec8 d3d8: Stop setting the device state in d3d8_device_SetClipPlane().
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-25 23:43:18 +01:00
Zebediah Figura 7b20951ed4 d3d8: Retrieve clip planes 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-25 23:43:18 +01:00
Zebediah Figura bc414af57e d3d8: Stop setting the device state in d3d8_device_SetTransform() and d3d8_device_MultiplyTransform().
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-25 23:43:18 +01:00
Zebediah Figura cc7d556212 d3d8: Retrieve transform states 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-25 23:43:18 +01:00
Zebediah Figura c4ebd986b8 d3d8: Stop setting the device state in d3d8_device_SetTextureStageState().
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-24 10:11:12 +01:00
Zebediah Figura 942e210037 d3d8: Retrieve texture states 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-24 10:11:10 +01:00
Zebediah Figura 27e8a5dd63 d3d8: Stop setting the device state in d3d8_device_SetTexture().
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-24 10:11:06 +01:00
Zebediah Figura 19e5693c91 d3d8: 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-24 10:11:03 +01:00
Zebediah Figura 84f9bc1716 d3d8: Stop setting the device state in d3d8_device_SetPixelShaderConstant().
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-24 10:10:59 +01:00
Zebediah Figura a7afb912d9 d3d8: Retrieve pixel shader constants 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-24 10:10:56 +01:00
Zebediah Figura 2f25af095d d3d8: Stop setting the device state in d3d8_device_SetPixelShader().
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-21 18:20:53 +01:00
Zebediah Figura 7cffddc993 d3d8: Retrieve the pixel shader 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-21 18:20:50 +01:00
Zebediah Figura b58a5a55ba d3d8: Stop setting the device state in d3d8_device_SetVertexShaderConstant().
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-21 18:20:48 +01:00
Zebediah Figura ffb8cc3623 d3d8: Retrieve vertex shader constants 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-21 18:20:45 +01:00