You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 8f443077416fd820375b1bc0d1276286d23348fc.
The pulseaudio patchset is temporarily disabled in this commit because the upstream merge introduced several bugs. It will be reenabled in one of the next commits.
This commit is contained in:
@@ -3991,7 +3991,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
void CDECL wined3d_device_copy_resource(struct wined3d_device *device,
|
||||
@@ -3931,7 +4360,17 @@
|
||||
@@ -3933,7 +4362,17 @@
|
||||
unsigned int depth_pitch)
|
||||
{
|
||||
struct wined3d_resource *sub_resource;
|
||||
@@ -4009,7 +4009,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
TRACE("device %p, resource %p, sub_resource_idx %u, box %p, data %p, row_pitch %u, depth_pitch %u.\n",
|
||||
device, resource, sub_resource_idx, box, data, row_pitch, depth_pitch);
|
||||
@@ -3948,7 +4387,14 @@
|
||||
@@ -3950,7 +4389,14 @@
|
||||
WARN("Invalid sub_resource_idx %u.\n", sub_resource_idx);
|
||||
return;
|
||||
}
|
||||
@@ -4024,7 +4024,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (box)
|
||||
{
|
||||
if (box->left >= box->right || box->right > sub_resource->width
|
||||
@@ -3958,9 +4404,47 @@
|
||||
@@ -3960,9 +4406,47 @@
|
||||
box->left, box->top, box->front, box->right, box->bottom, box->back);
|
||||
return;
|
||||
}
|
||||
@@ -4072,7 +4072,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
|
||||
@@ -3991,8 +4475,14 @@
|
||||
@@ -3993,8 +4477,14 @@
|
||||
rect = &r;
|
||||
}
|
||||
|
||||
@@ -4087,7 +4087,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device,
|
||||
@@ -4006,6 +4496,7 @@
|
||||
@@ -4008,6 +4498,7 @@
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -4095,7 +4095,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
return device->state.fb.render_targets[view_idx];
|
||||
}
|
||||
|
||||
@@ -4021,6 +4512,22 @@
|
||||
@@ -4023,6 +4514,22 @@
|
||||
{
|
||||
struct wined3d_rendertarget_view *prev;
|
||||
struct wined3d_fb_state *fb = &device->state.fb;
|
||||
@@ -4118,7 +4118,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
|
||||
device, view_idx, view, set_viewport);
|
||||
@@ -4060,6 +4567,7 @@
|
||||
@@ -4062,6 +4569,7 @@
|
||||
}
|
||||
|
||||
|
||||
@@ -4126,7 +4126,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
prev = fb->render_targets[view_idx];
|
||||
if (view == prev)
|
||||
return WINED3D_OK;
|
||||
@@ -4067,6 +4575,15 @@
|
||||
@@ -4069,6 +4577,15 @@
|
||||
if (view)
|
||||
wined3d_rendertarget_view_incref(view);
|
||||
fb->render_targets[view_idx] = view;
|
||||
@@ -4142,7 +4142,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view);
|
||||
/* Release after the assignment, to prevent device_resource_released()
|
||||
* from seeing the surface as still in use. */
|
||||
@@ -4078,6 +4595,7 @@
|
||||
@@ -4080,6 +4597,7 @@
|
||||
|
||||
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
|
||||
{
|
||||
@@ -4150,7 +4150,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
struct wined3d_fb_state *fb = &device->state.fb;
|
||||
struct wined3d_rendertarget_view *prev;
|
||||
|
||||
@@ -4095,6 +4613,66 @@
|
||||
@@ -4097,6 +4615,66 @@
|
||||
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
|
||||
if (prev)
|
||||
wined3d_rendertarget_view_decref(prev);
|
||||
@@ -4217,7 +4217,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device,
|
||||
@@ -4115,6 +4693,14 @@
|
||||
@@ -4117,6 +4695,14 @@
|
||||
|
||||
cursor_image = surface_from_resource(sub_resource);
|
||||
|
||||
@@ -4232,7 +4232,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (cursor_image->resource.format->id != WINED3DFMT_B8G8R8A8_UNORM)
|
||||
{
|
||||
WARN("Surface %p has an invalid format %s.\n",
|
||||
@@ -4142,6 +4728,13 @@
|
||||
@@ -4144,6 +4730,13 @@
|
||||
* release it after setting the cursor image. Windows doesn't
|
||||
* addref the set surface, so we can't do this either without
|
||||
* creating circular refcount dependencies. */
|
||||
@@ -4246,7 +4246,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
if (cursor_image->resource.width == 32 && cursor_image->resource.height == 32)
|
||||
{
|
||||
@@ -4246,6 +4839,12 @@
|
||||
@@ -4248,6 +4841,12 @@
|
||||
else
|
||||
SetCursor(NULL);
|
||||
}
|
||||
@@ -4259,7 +4259,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
return oldVisible;
|
||||
}
|
||||
@@ -4256,8 +4855,10 @@
|
||||
@@ -4258,8 +4857,10 @@
|
||||
|
||||
TRACE("device %p.\n", device);
|
||||
|
||||
@@ -4270,7 +4270,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
|
||||
{
|
||||
TRACE("Checking resource %p for eviction.\n", resource);
|
||||
@@ -4265,6 +4866,7 @@
|
||||
@@ -4267,6 +4868,7 @@
|
||||
if (resource->pool == WINED3D_POOL_MANAGED && !resource->map_count)
|
||||
{
|
||||
TRACE("Evicting %p.\n", resource);
|
||||
@@ -4278,7 +4278,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
wined3d_cs_emit_evict_resource(device->cs, resource);
|
||||
}
|
||||
}
|
||||
@@ -4283,6 +4885,37 @@
|
||||
@@ -4285,6 +4887,37 @@
|
||||
|
||||
context = context_acquire(device, NULL);
|
||||
gl_info = context->gl_info;
|
||||
@@ -4316,7 +4316,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
if (device->depth_blt_texture)
|
||||
{
|
||||
@@ -4303,6 +4936,7 @@
|
||||
@@ -4305,6 +4938,7 @@
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, swapchain->context);
|
||||
swapchain->context = NULL;
|
||||
@@ -4324,7 +4324,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
swapchain->num_contexts = 0;
|
||||
}
|
||||
|
||||
@@ -4322,6 +4956,14 @@
|
||||
@@ -4324,6 +4958,14 @@
|
||||
|
||||
static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
{
|
||||
@@ -4339,7 +4339,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
HRESULT hr;
|
||||
|
||||
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
|
||||
@@ -4338,6 +4980,7 @@
|
||||
@@ -4340,6 +4982,7 @@
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -4347,7 +4347,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
hr = wined3d_cs_emit_create_swapchain_context(device->cs, swapchain);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
@@ -4348,6 +4991,34 @@
|
||||
@@ -4350,6 +4993,34 @@
|
||||
}
|
||||
|
||||
wined3d_cs_emit_create_dummy_textures(device->cs);
|
||||
@@ -4382,7 +4382,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -4366,9 +5037,11 @@
|
||||
@@ -4368,9 +5039,11 @@
|
||||
TRACE("device %p, swapchain_desc %p, mode %p, callback %p, reset_state %#x.\n",
|
||||
device, swapchain_desc, mode, callback, reset_state);
|
||||
|
||||
@@ -4394,7 +4394,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (!(swapchain = wined3d_device_get_swapchain(device, 0)))
|
||||
{
|
||||
ERR("Failed to get the first implicit swapchain.\n");
|
||||
@@ -4383,9 +5056,21 @@
|
||||
@@ -4385,9 +5058,21 @@
|
||||
wined3d_texture_decref(device->logo_texture);
|
||||
device->logo_texture = NULL;
|
||||
}
|
||||
@@ -4416,7 +4416,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -4394,6 +5079,7 @@
|
||||
@@ -4396,6 +5081,7 @@
|
||||
}
|
||||
wined3d_device_set_depth_stencil_view(device, NULL);
|
||||
|
||||
@@ -4424,7 +4424,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (reset_state)
|
||||
{
|
||||
state_unbind_resources(&device->state);
|
||||
@@ -4403,6 +5089,12 @@
|
||||
@@ -4405,6 +5091,12 @@
|
||||
{
|
||||
wined3d_surface_decref(device->cs->onscreen_depth_stencil);
|
||||
device->cs->onscreen_depth_stencil = NULL;
|
||||
@@ -4437,7 +4437,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
if (reset_state)
|
||||
@@ -4415,6 +5107,7 @@
|
||||
@@ -4417,6 +5109,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4445,7 +4445,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
/* Free implicit resources and wait for the command stream before modifying
|
||||
* swapchain parameters. After modifying the swapchain parameters a new GL
|
||||
* context may be acquired by the worker thread. This causes problems in the
|
||||
@@ -4436,6 +5129,7 @@
|
||||
@@ -4438,6 +5131,7 @@
|
||||
}
|
||||
device->cs->ops->finish(device->cs);
|
||||
|
||||
@@ -4453,7 +4453,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
TRACE("New params:\n");
|
||||
TRACE("backbuffer_width %u\n", swapchain_desc->backbuffer_width);
|
||||
TRACE("backbuffer_height %u\n", swapchain_desc->backbuffer_height);
|
||||
@@ -4562,6 +5256,13 @@
|
||||
@@ -4564,6 +5258,13 @@
|
||||
swapchain_desc->multisample_type, swapchain_desc->multisample_quality)))
|
||||
return hr;
|
||||
|
||||
@@ -4467,7 +4467,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (swapchain->desc.enable_auto_depth_stencil)
|
||||
{
|
||||
struct wined3d_resource_desc texture_desc;
|
||||
@@ -4604,6 +5305,13 @@
|
||||
@@ -4606,6 +5307,13 @@
|
||||
wined3d_device_set_depth_stencil_view(device, device->auto_depth_stencil_view);
|
||||
}
|
||||
|
||||
@@ -4481,7 +4481,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (swapchain->desc.backbuffer_count && FAILED(hr = wined3d_rendertarget_view_create_from_surface(
|
||||
surface_from_resource(wined3d_texture_get_sub_resource(swapchain->back_buffers[0], 0)),
|
||||
NULL, &wined3d_null_parent_ops, &device->back_buffer_view)))
|
||||
@@ -4624,12 +5332,20 @@
|
||||
@@ -4626,12 +5334,20 @@
|
||||
}
|
||||
wined3d_cs_emit_reset_state(device->cs);
|
||||
state_cleanup(&device->state);
|
||||
@@ -4502,7 +4502,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
&device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT)))
|
||||
ERR("Failed to initialize device state, hr %#x.\n", hr);
|
||||
device->update_state = &device->state;
|
||||
@@ -4638,6 +5354,7 @@
|
||||
@@ -4640,6 +5356,7 @@
|
||||
}
|
||||
else if (device->back_buffer_view)
|
||||
{
|
||||
@@ -4510,7 +4510,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
struct wined3d_state *state = &device->state;
|
||||
|
||||
wined3d_device_set_rendertarget_view(device, 0, device->back_buffer_view, FALSE);
|
||||
@@ -4653,6 +5370,24 @@
|
||||
@@ -4655,6 +5372,24 @@
|
||||
state->scissor_rect.left = 0;
|
||||
state->scissor_rect.right = swapchain->desc.backbuffer_width;
|
||||
state->scissor_rect.bottom = swapchain->desc.backbuffer_height;
|
||||
@@ -4535,7 +4535,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
|
||||
}
|
||||
|
||||
@@ -4728,6 +5463,10 @@
|
||||
@@ -4730,6 +5465,10 @@
|
||||
|
||||
TRACE("device %p, resource %p, type %s.\n", device, resource, debug_d3dresourcetype(type));
|
||||
|
||||
@@ -4546,7 +4546,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_RTYPE_SURFACE:
|
||||
@@ -4738,6 +5477,7 @@
|
||||
@@ -4740,6 +5479,7 @@
|
||||
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -4554,7 +4554,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (wined3d_rendertarget_view_get_surface(device->state.fb.render_targets[i]) == surface)
|
||||
{
|
||||
ERR("Surface %p is still in use as render target %u.\n", surface, i);
|
||||
@@ -4749,6 +5489,19 @@
|
||||
@@ -4751,6 +5491,19 @@
|
||||
{
|
||||
ERR("Surface %p is still in use as depth/stencil buffer.\n", surface);
|
||||
device->state.fb.depth_stencil = NULL;
|
||||
@@ -4574,7 +4574,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -4911,7 +5664,11 @@
|
||||
@@ -4913,7 +5666,11 @@
|
||||
|
||||
device->blitter = adapter->blitter;
|
||||
|
||||
@@ -4586,7 +4586,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
&adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT)))
|
||||
{
|
||||
ERR("Failed to initialize device state, hr %#x.\n", hr);
|
||||
@@ -5010,6 +5767,7 @@
|
||||
@@ -5012,6 +5769,7 @@
|
||||
else
|
||||
return CallWindowProcA(proc, window, message, wparam, lparam);
|
||||
}
|
||||
@@ -4594,7 +4594,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
/* Context activation is done by the caller */
|
||||
struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT size, GLenum gl_usage,
|
||||
@@ -5063,3 +5821,4 @@
|
||||
@@ -5065,3 +5823,4 @@
|
||||
|
||||
wined3d_device_destroy_bo(device, context, bo);
|
||||
}
|
||||
@@ -9733,7 +9733,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
|
||||
--- a/dlls/wined3d/directx.c
|
||||
+++ b/dlls/wined3d/directx.c
|
||||
@@ -5546,9 +5546,15 @@
|
||||
@@ -5548,9 +5548,15 @@
|
||||
DebugBreak();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user