Skip to content
Permalink
Browse files

[0.4.13] Avoid regressions CORE-14955 "Ddraw fullscreen crashes", COR…

…E-15652

This brings us back to before guilty commit 0.4.10-dev-55-g
7af3969

and therefore downgrades
dll/directx/wine/
D3D8,D3D9,DDRAW,D3DCOMPILER_43
to WineStaging 3.3 for this rls.
Also downgrades related header sdk/include/reactos/wine/wined3d.h
and for the first time also media/doc/README.WINE

Same versions of these dlls we had in every ros rls since 0.4.10rls.

Purpose of this revert is to fix crashes when Ddraw apps switch
into fullscreen with VBEMP and inbuilt Mesa.
I tested, before:
 DxDiag crashed when switching to fullscreen (CORE-14955),
 Diablo II crashed immediately (CORE-15652),
 Monster-Truck-Madness 2 demo crashed after main menu

Afterwards all of these apps do run.
DXTN does still work after that, even with VBEMP and inbuilt Mesa.

This will be the interim fix, which I will keep for rls at least
until someone manages to fix CORE-14955 properly in master with current Wine.

analog to 0.4.10-RC-17-g
bb4c55d
  • Loading branch information...
JoachimHenze committed Oct 1, 2019
1 parent bff758f commit 67dd70e5ef0acc09495c8a0853cf2a1161f65101
Showing with 4,684 additions and 5,256 deletions.
  1. +1 −1 dll/directx/wine/d3d8/CMakeLists.txt
  2. +1 −2 dll/directx/wine/d3d8/d3d8_private.h
  3. +45 −156 dll/directx/wine/d3d8/device.c
  4. +1 −1 dll/directx/wine/d3d8/directx.c
  5. +4 −5 dll/directx/wine/d3d8/swapchain.c
  6. +1 −1 dll/directx/wine/d3d9/CMakeLists.txt
  7. +3 −3 dll/directx/wine/d3d9/d3d9_private.h
  8. +70 −119 dll/directx/wine/d3d9/device.c
  9. +1 −7 dll/directx/wine/d3d9/directx.c
  10. +5 −29 dll/directx/wine/d3d9/swapchain.c
  11. +2 −15 dll/directx/wine/d3d9/texture.c
  12. +5 −10 dll/directx/wine/d3dcompiler_43/CMakeLists.txt
  13. +1 −1 dll/directx/wine/ddraw/CMakeLists.txt
  14. +30 −19 dll/directx/wine/ddraw/ddraw.c
  15. +3 −4 dll/directx/wine/ddraw/ddraw_private.h
  16. +34 −22 dll/directx/wine/ddraw/device.c
  17. +7 −16 dll/directx/wine/ddraw/executebuffer.c
  18. +1 −1 dll/directx/wine/ddraw/palette.c
  19. +18 −53 dll/directx/wine/ddraw/surface.c
  20. +2 −2 dll/directx/wine/ddraw/utils.c
  21. +120 −137 dll/directx/wine/ddraw/viewport.c
  22. +1 −6 dll/directx/wine/wined3d/CMakeLists.txt
  23. +161 −198 dll/directx/wine/wined3d/arb_program_shader.c
  24. +19 −18 dll/directx/wine/wined3d/ati_fragment_shader.c
  25. +6 −4 dll/directx/wine/wined3d/buffer.c
  26. +360 −990 dll/directx/wine/wined3d/context.c
  27. +96 −84 dll/directx/wine/wined3d/cs.c
  28. +199 −174 dll/directx/wine/wined3d/device.c
  29. +61 −27 dll/directx/wine/wined3d/directx.c
  30. +89 −1,070 dll/directx/wine/wined3d/glsl_shader.c
  31. +0 −3 dll/directx/wine/wined3d/nvidia_texture_shader.c
  32. +16 −9 dll/directx/wine/wined3d/resource.c
  33. +55 −175 dll/directx/wine/wined3d/shader.c
  34. +29 −50 dll/directx/wine/wined3d/shader_sm4.c
  35. +742 −146 dll/directx/wine/wined3d/state.c
  36. +11 −23 dll/directx/wine/wined3d/stateblock.c
  37. +898 −354 dll/directx/wine/wined3d/surface.c
  38. +68 −43 dll/directx/wine/wined3d/swapchain.c
  39. +1,170 −1,030 dll/directx/wine/wined3d/texture.c
  40. +116 −33 dll/directx/wine/wined3d/utils.c
  41. +13 −5 dll/directx/wine/wined3d/view.c
  42. +8 −8 dll/directx/wine/wined3d/wined3d.spec
  43. +1 −2 dll/directx/wine/wined3d/wined3d_gl.h
  44. +14 −1 dll/directx/wine/wined3d/wined3d_main.c
  45. +157 −156 dll/directx/wine/wined3d/wined3d_private.h
  46. +4 −4 media/doc/README.WINE
  47. +35 −39 sdk/include/reactos/wine/wined3d.h
@@ -19,7 +19,7 @@ list(APPEND SOURCE
volume.c
precomp.h)

add_library(d3d8 MODULE
add_library(d3d8 SHARED
${SOURCE}
guid.c
version.rc
@@ -166,11 +166,10 @@ struct d3d8_swapchain
LONG refcount;
struct wined3d_swapchain *wined3d_swapchain;
IDirect3DDevice8 *parent_device;
unsigned int swap_interval;
};

HRESULT d3d8_swapchain_create(struct d3d8_device *device, struct wined3d_swapchain_desc *desc,
unsigned int swap_interval, struct d3d8_swapchain **swapchain) DECLSPEC_HIDDEN;
struct d3d8_swapchain **swapchain) DECLSPEC_HIDDEN;

struct d3d8_surface
{

Large diffs are not rendered by default.

@@ -417,7 +417,7 @@ BOOL d3d8_init(struct d3d8 *d3d8)
DWORD flags = WINED3D_LEGACY_DEPTH_BIAS | WINED3D_VIDMEM_ACCOUNTING
| WINED3D_HANDLE_RESTORE | WINED3D_PIXEL_CENTER_INTEGER
| WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR | WINED3D_NO_PRIMITIVE_RESTART
| WINED3D_LEGACY_CUBEMAP_FILTERING;
| WINED3D_LEGACY_CUBEMAP_FILTERING | WINED3D_LIMIT_VIEWPORT;

d3d8->IDirect3D8_iface.lpVtbl = &d3d8_vtbl;
d3d8->refcount = 1;
@@ -105,7 +105,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d8_swapchain_Present(IDirect3DSwapChai

wined3d_mutex_lock();
hr = wined3d_swapchain_present(swapchain->wined3d_swapchain,
src_rect, dst_rect, dst_window_override, swapchain->swap_interval, 0);
src_rect, dst_rect, dst_window_override, 0, 0);
wined3d_mutex_unlock();

return hr;
@@ -167,13 +167,12 @@ static const struct wined3d_parent_ops d3d8_swapchain_wined3d_parent_ops =
};

static HRESULT swapchain_init(struct d3d8_swapchain *swapchain, struct d3d8_device *device,
struct wined3d_swapchain_desc *desc, unsigned int swap_interval)
struct wined3d_swapchain_desc *desc)
{
HRESULT hr;

swapchain->refcount = 1;
swapchain->IDirect3DSwapChain8_iface.lpVtbl = &d3d8_swapchain_vtbl;
swapchain->swap_interval = swap_interval;

wined3d_mutex_lock();
hr = wined3d_swapchain_create(device->wined3d_device, desc, swapchain,
@@ -193,15 +192,15 @@ static HRESULT swapchain_init(struct d3d8_swapchain *swapchain, struct d3d8_devi
}

HRESULT d3d8_swapchain_create(struct d3d8_device *device, struct wined3d_swapchain_desc *desc,
unsigned int swap_interval, struct d3d8_swapchain **swapchain)
struct d3d8_swapchain **swapchain)
{
struct d3d8_swapchain *object;
HRESULT hr;

if (!(object = heap_alloc_zero(sizeof(*object))))
return E_OUTOFMEMORY;

if (FAILED(hr = swapchain_init(object, device, desc, swap_interval)))
if (FAILED(hr = swapchain_init(object, device, desc)))
{
WARN("Failed to initialize swapchain, hr %#x.\n", hr);
heap_free(object);
@@ -21,7 +21,7 @@ list(APPEND SOURCE
volume.c
precomp.h)

add_library(d3d9 MODULE
add_library(d3d9 SHARED
${SOURCE}
guid.c
version.rc
@@ -55,7 +55,7 @@ BOOL is_gdi_compat_wined3dformat(enum wined3d_format_id format) DECLSPEC_HIDDEN;
enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format) DECLSPEC_HIDDEN;
unsigned int wined3dmapflags_from_d3dmapflags(unsigned int flags) DECLSPEC_HIDDEN;
void present_parameters_from_wined3d_swapchain_desc(D3DPRESENT_PARAMETERS *present_parameters,
const struct wined3d_swapchain_desc *swapchain_desc, DWORD presentation_interval) DECLSPEC_HIDDEN;
const struct wined3d_swapchain_desc *swapchain_desc) DECLSPEC_HIDDEN;
void d3dcaps_from_wined3dcaps(D3DCAPS9 *caps, const WINED3DCAPS *wined3d_caps) DECLSPEC_HIDDEN;

struct d3d9
@@ -99,6 +99,7 @@ struct d3d9_device
UINT index_buffer_size;
UINT index_buffer_pos;

struct d3d9_texture *textures[D3D9_MAX_TEXTURE_UNITS];
struct d3d9_surface *render_targets[D3D_MAX_SIMULTANEOUS_RENDERTARGETS];

LONG device_state;
@@ -148,11 +149,10 @@ struct d3d9_swapchain
LONG refcount;
struct wined3d_swapchain *wined3d_swapchain;
IDirect3DDevice9Ex *parent_device;
unsigned int swap_interval;
};

HRESULT d3d9_swapchain_create(struct d3d9_device *device, struct wined3d_swapchain_desc *desc,
unsigned int swap_interval, struct d3d9_swapchain **swapchain) DECLSPEC_HIDDEN;
struct d3d9_swapchain **swapchain) DECLSPEC_HIDDEN;

struct d3d9_surface
{

0 comments on commit 67dd70e

Please sign in to comment.
You can’t perform that action at this time.