[0.4.12] Avoid regression CORE-14955 "Ddraw fullscreen crashes"

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

and therefore downgrades D3D8,D3D9,DDRAW,WINED3D to 3.3 for this rls.

This is same versions as we had in 0.4.10rls (I used same revert then)

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,
 Diablo II crashed immediately,
 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
bb4c55d650
This commit is contained in:
Joachim Henze 2019-04-10 13:25:10 +02:00
parent 55ea31811b
commit be54d69f5c
45 changed files with 4701 additions and 5263 deletions

View file

@ -388,11 +388,12 @@ enum wined3d_render_state
WINED3D_RS_SRCBLENDALPHA = 207,
WINED3D_RS_DESTBLENDALPHA = 208,
WINED3D_RS_BLENDOPALPHA = 209,
WINED3D_RS_DEPTHBIASCLAMP = 210,
WINED3D_RS_COLORWRITEENABLE4 = 211,
WINED3D_RS_COLORWRITEENABLE5 = 212,
WINED3D_RS_COLORWRITEENABLE6 = 213,
WINED3D_RS_COLORWRITEENABLE7 = 214,
WINED3D_RS_DEPTHCLIP = 210,
WINED3D_RS_DEPTHBIASCLAMP = 211,
WINED3D_RS_COLORWRITEENABLE4 = 212,
WINED3D_RS_COLORWRITEENABLE5 = 213,
WINED3D_RS_COLORWRITEENABLE6 = 214,
WINED3D_RS_COLORWRITEENABLE7 = 215,
};
#define WINEHIGHEST_RENDER_STATE WINED3D_RS_COLORWRITEENABLE7
@ -530,16 +531,6 @@ enum wined3d_swap_effect
WINED3D_SWAP_EFFECT_OVERLAY,
};
enum wined3d_swap_interval
{
WINED3D_SWAP_INTERVAL_IMMEDIATE = 0,
WINED3D_SWAP_INTERVAL_ONE = 1,
WINED3D_SWAP_INTERVAL_TWO = 2,
WINED3D_SWAP_INTERVAL_THREE = 3,
WINED3D_SWAP_INTERVAL_FOUR = 4,
WINED3D_SWAP_INTERVAL_DEFAULT = ~0u,
};
enum wined3d_sampler_state
{
WINED3D_SAMP_ADDRESS_U = 1,
@ -599,7 +590,7 @@ enum wined3d_texture_stage_state
WINED3D_TSS_ALPHA_ARG0 = 15,
WINED3D_TSS_RESULT_ARG = 16,
WINED3D_TSS_CONSTANT = 17,
WINED3D_TSS_INVALID = ~0u,
WINED3D_TSS_INVALID = ~0U,
};
#define WINED3D_HIGHEST_TEXTURE_STATE WINED3D_TSS_CONSTANT
@ -949,6 +940,13 @@ enum wined3d_shader_byte_code_format
#define WINED3DPRESENT_RATE_DEFAULT 0x00000000
#define WINED3DPRESENT_INTERVAL_DEFAULT 0x00000000
#define WINED3DPRESENT_INTERVAL_ONE 0x00000001
#define WINED3DPRESENT_INTERVAL_TWO 0x00000002
#define WINED3DPRESENT_INTERVAL_THREE 0x00000004
#define WINED3DPRESENT_INTERVAL_FOUR 0x00000008
#define WINED3DPRESENT_INTERVAL_IMMEDIATE 0x80000000
#define WINED3DCLIPPLANE0 (1u << 0)
#define WINED3DCLIPPLANE1 (1u << 1)
#define WINED3DCLIPPLANE2 (1u << 2)
@ -1328,6 +1326,8 @@ enum wined3d_shader_byte_code_format
#define WINED3D_NO_PRIMITIVE_RESTART 0x00000800
#define WINED3D_LEGACY_CUBEMAP_FILTERING 0x00001000
#define WINED3D_NORMALIZED_DEPTH_BIAS 0x00002000
#define WINED3D_REQUEST_D3D10 0x00004000
#define WINED3D_LIMIT_VIEWPORT 0x00008000
#define WINED3D_RESZ_CODE 0x7fa05000
@ -1576,8 +1576,6 @@ enum wined3d_shader_byte_code_format
#define WINED3D_VIEW_TEXTURE_CUBE 0x00000008
#define WINED3D_VIEW_TEXTURE_ARRAY 0x00000010
#define WINED3D_MAX_VIEWPORTS 16
struct wined3d_display_mode
{
UINT width;
@ -1731,10 +1729,10 @@ struct wined3d_adapter_identifier
struct wined3d_swapchain_desc
{
unsigned int backbuffer_width;
unsigned int backbuffer_height;
UINT backbuffer_width;
UINT backbuffer_height;
enum wined3d_format_id backbuffer_format;
unsigned int backbuffer_count;
UINT backbuffer_count;
DWORD backbuffer_usage;
enum wined3d_multisample_type multisample_type;
DWORD multisample_quality;
@ -1744,7 +1742,8 @@ struct wined3d_swapchain_desc
BOOL enable_auto_depth_stencil;
enum wined3d_format_id auto_depth_stencil_format;
DWORD flags;
unsigned int refresh_rate;
UINT refresh_rate;
UINT swap_interval;
BOOL auto_restore_display_mode;
};
@ -1890,6 +1889,7 @@ typedef struct _WINED3DCAPS
DWORD Caps;
DWORD Caps2;
DWORD Caps3;
DWORD PresentationIntervals;
DWORD CursorCaps;
DWORD DevCaps;
@ -2008,7 +2008,6 @@ struct wined3d_blend_state_desc
struct wined3d_rasterizer_state_desc
{
BOOL front_ccw;
BOOL depth_clip;
};
struct wined3d_sampler_desc
@ -2139,8 +2138,11 @@ struct wined3d_device_parent_ops
void (__cdecl *wined3d_device_created)(struct wined3d_device_parent *device_parent, struct wined3d_device *device);
void (__cdecl *mode_changed)(struct wined3d_device_parent *device_parent);
void (__cdecl *activate)(struct wined3d_device_parent *device_parent, BOOL activate);
HRESULT (__cdecl *texture_sub_resource_created)(struct wined3d_device_parent *device_parent,
enum wined3d_resource_type type, struct wined3d_texture *texture, unsigned int sub_resource_idx,
HRESULT (__cdecl *surface_created)(struct wined3d_device_parent *device_parent,
struct wined3d_texture *texture, unsigned int sub_resource_idx,
void **parent, const struct wined3d_parent_ops **parent_ops);
HRESULT (__cdecl *volume_created)(struct wined3d_device_parent *device_parent,
struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx,
void **parent, const struct wined3d_parent_ops **parent_ops);
HRESULT (__cdecl *create_swapchain_texture)(struct wined3d_device_parent *device_parent, void *parent,
const struct wined3d_resource_desc *desc, DWORD texture_flags, struct wined3d_texture **texture);
@ -2237,7 +2239,7 @@ void __cdecl wined3d_device_copy_resource(struct wined3d_device *device,
HRESULT __cdecl wined3d_device_copy_sub_resource_region(struct wined3d_device *device,
struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, unsigned int dst_x,
unsigned int dst_y, unsigned int dst_z, struct wined3d_resource *src_resource,
unsigned int src_sub_resource_idx, const struct wined3d_box *src_box, unsigned int flags);
unsigned int src_sub_resource_idx, const struct wined3d_box *src_box);
void __cdecl wined3d_device_copy_uav_counter(struct wined3d_device *device,
struct wined3d_buffer *dst_buffer, unsigned int offset, struct wined3d_unordered_access_view *uav);
HRESULT __cdecl wined3d_device_create(struct wined3d *wined3d, UINT adapter_idx,
@ -2304,7 +2306,6 @@ HRESULT __cdecl wined3d_device_get_light(const struct wined3d_device *device,
UINT light_idx, struct wined3d_light *light);
HRESULT __cdecl wined3d_device_get_light_enable(const struct wined3d_device *device, UINT light_idx, BOOL *enable);
void __cdecl wined3d_device_get_material(const struct wined3d_device *device, struct wined3d_material *material);
unsigned int __cdecl wined3d_device_get_max_frame_latency(const struct wined3d_device *device);
float __cdecl wined3d_device_get_npatch_mode(const struct wined3d_device *device);
struct wined3d_shader * __cdecl wined3d_device_get_pixel_shader(const struct wined3d_device *device);
struct wined3d_query * __cdecl wined3d_device_get_predication(struct wined3d_device *device, BOOL *value);
@ -2328,8 +2329,7 @@ struct wined3d_rendertarget_view * __cdecl wined3d_device_get_rendertarget_view(
unsigned int view_idx);
DWORD __cdecl wined3d_device_get_sampler_state(const struct wined3d_device *device,
UINT sampler_idx, enum wined3d_sampler_state state);
void __cdecl wined3d_device_get_scissor_rects(const struct wined3d_device *device, unsigned int *rect_count,
RECT *rect);
void __cdecl wined3d_device_get_scissor_rect(const struct wined3d_device *device, RECT *rect);
BOOL __cdecl wined3d_device_get_software_vertex_processing(const struct wined3d_device *device);
struct wined3d_buffer * __cdecl wined3d_device_get_stream_output(struct wined3d_device *device,
UINT idx, UINT *offset);
@ -2349,8 +2349,7 @@ struct wined3d_unordered_access_view * __cdecl wined3d_device_get_unordered_acce
const struct wined3d_device *device, unsigned int idx);
struct wined3d_vertex_declaration * __cdecl wined3d_device_get_vertex_declaration(const struct wined3d_device *device);
struct wined3d_shader * __cdecl wined3d_device_get_vertex_shader(const struct wined3d_device *device);
void __cdecl wined3d_device_get_viewports(const struct wined3d_device *device, unsigned int *viewport_count,
struct wined3d_viewport *viewports);
void __cdecl wined3d_device_get_viewport(const struct wined3d_device *device, struct wined3d_viewport *viewport);
struct wined3d_buffer * __cdecl wined3d_device_get_vs_cb(const struct wined3d_device *device, UINT idx);
HRESULT __cdecl wined3d_device_get_vs_consts_b(const struct wined3d_device *device,
unsigned int start_idx, unsigned int count, BOOL *constants);
@ -2426,7 +2425,6 @@ HRESULT __cdecl wined3d_device_set_light(struct wined3d_device *device,
UINT light_idx, const struct wined3d_light *light);
HRESULT __cdecl wined3d_device_set_light_enable(struct wined3d_device *device, UINT light_idx, BOOL enable);
void __cdecl wined3d_device_set_material(struct wined3d_device *device, const struct wined3d_material *material);
void __cdecl wined3d_device_set_max_frame_latency(struct wined3d_device *device, unsigned int max_frame_latency);
void __cdecl wined3d_device_set_multithreaded(struct wined3d_device *device);
HRESULT __cdecl wined3d_device_set_npatch_mode(struct wined3d_device *device, float segments);
void __cdecl wined3d_device_set_pixel_shader(struct wined3d_device *device, struct wined3d_shader *shader);
@ -2452,8 +2450,7 @@ HRESULT __cdecl wined3d_device_set_rendertarget_view(struct wined3d_device *devi
unsigned int view_idx, struct wined3d_rendertarget_view *view, BOOL set_viewport);
void __cdecl wined3d_device_set_sampler_state(struct wined3d_device *device,
UINT sampler_idx, enum wined3d_sampler_state state, DWORD value);
void __cdecl wined3d_device_set_scissor_rects(struct wined3d_device *device,
unsigned int rect_count, const RECT *rect);
void __cdecl wined3d_device_set_scissor_rect(struct wined3d_device *device, const RECT *rect);
void __cdecl wined3d_device_set_software_vertex_processing(struct wined3d_device *device, BOOL software);
void __cdecl wined3d_device_set_stream_output(struct wined3d_device *device, UINT idx,
struct wined3d_buffer *buffer, UINT offset);
@ -2470,8 +2467,7 @@ void __cdecl wined3d_device_set_unordered_access_view(struct wined3d_device *dev
void __cdecl wined3d_device_set_vertex_declaration(struct wined3d_device *device,
struct wined3d_vertex_declaration *declaration);
void __cdecl wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader);
void __cdecl wined3d_device_set_viewports(struct wined3d_device *device, unsigned int viewport_count,
const struct wined3d_viewport *viewports);
void __cdecl wined3d_device_set_viewport(struct wined3d_device *device, const struct wined3d_viewport *viewport);
void __cdecl wined3d_device_set_vs_cb(struct wined3d_device *device, UINT idx, struct wined3d_buffer *buffer);
HRESULT __cdecl wined3d_device_set_vs_consts_b(struct wined3d_device *device,
unsigned int start_idx, unsigned int count, const BOOL *constants);
@ -2488,7 +2484,7 @@ HRESULT __cdecl wined3d_device_uninit_3d(struct wined3d_device *device);
HRESULT __cdecl wined3d_device_uninit_gdi(struct wined3d_device *device);
void __cdecl wined3d_device_update_sub_resource(struct wined3d_device *device, struct wined3d_resource *resource,
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
unsigned int depth_pitch, unsigned int flags);
unsigned int depth_pitch);
HRESULT __cdecl wined3d_device_update_texture(struct wined3d_device *device,
struct wined3d_texture *src_texture, struct wined3d_texture *dst_texture);
HRESULT __cdecl wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes);
@ -2689,8 +2685,8 @@ void __cdecl wined3d_swapchain_get_desc(const struct wined3d_swapchain *swapchai
HRESULT __cdecl wined3d_swapchain_get_raster_status(const struct wined3d_swapchain *swapchain,
struct wined3d_raster_status *raster_status);
ULONG __cdecl wined3d_swapchain_incref(struct wined3d_swapchain *swapchain);
HRESULT __cdecl wined3d_swapchain_present(struct wined3d_swapchain *swapchain, const RECT *src_rect,
const RECT *dst_rect, HWND dst_window_override, unsigned int swap_interval, DWORD flags);
HRESULT __cdecl wined3d_swapchain_present(struct wined3d_swapchain *swapchain,
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD swap_interval, DWORD flags);
HRESULT __cdecl wined3d_swapchain_resize_buffers(struct wined3d_swapchain *swapchain, unsigned int buffer_count,
unsigned int width, unsigned int height, enum wined3d_format_id format_id,
enum wined3d_multisample_type multisample_type, unsigned int multisample_quality);