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 26094c5634b1f12d3f156a90a3e228513675cd63.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 2e5a98194b938b677a8049cfd59cee18c31417ed Mon Sep 17 00:00:00 2001
|
||||
From b306273dc9e8ef9cdc53affc64098399bad4e65c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 3 Oct 2013 19:23:24 +0200
|
||||
Subject: wined3d: Remove software cursor support.
|
||||
@@ -14,7 +14,7 @@ FIXME: Make sure wined3d_device_show_cursor returns the correct value if a softw
|
||||
3 files changed, 86 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 3e3d4a7..6b87c20 100644
|
||||
index b44d304..e8871b2 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1039,8 +1039,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -26,7 +26,7 @@ index 3e3d4a7..6b87c20 100644
|
||||
|
||||
/* Release the buffers (with sanity checks).
|
||||
* FIXME: Move this move into a separate patch. I think the idea
|
||||
@@ -4157,48 +4155,6 @@ void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device,
|
||||
@@ -4144,48 +4142,6 @@ void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device,
|
||||
wined3d_rendertarget_view_decref(prev);
|
||||
}
|
||||
|
||||
@@ -73,11 +73,11 @@ index 3e3d4a7..6b87c20 100644
|
||||
-}
|
||||
-
|
||||
HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device,
|
||||
UINT x_hotspot, UINT y_hotspot, struct wined3d_surface *cursor_image)
|
||||
UINT x_hotspot, UINT y_hotspot, struct wined3d_texture *texture, unsigned int sub_resource_idx)
|
||||
{
|
||||
@@ -4209,12 +4165,6 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
|
||||
TRACE("device %p, x_hotspot %u, y_hotspot %u, cursor_image %p.\n",
|
||||
device, x_hotspot, y_hotspot, cursor_image);
|
||||
@@ -4204,12 +4160,6 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
|
||||
|
||||
cursor_image = surface_from_resource(sub_resource);
|
||||
|
||||
- if (device->cursor_texture)
|
||||
- {
|
||||
@@ -88,7 +88,7 @@ index 3e3d4a7..6b87c20 100644
|
||||
if (cursor_image->resource.format->id != WINED3DFMT_B8G8R8A8_UNORM)
|
||||
{
|
||||
WARN("Surface %p has an invalid format %s.\n",
|
||||
@@ -4242,11 +4192,6 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
|
||||
@@ -4237,11 +4187,6 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
|
||||
* 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. */
|
||||
@@ -100,7 +100,7 @@ index 3e3d4a7..6b87c20 100644
|
||||
|
||||
if (cursor_image->resource.width == 32 && cursor_image->resource.height == 32)
|
||||
{
|
||||
@@ -4351,10 +4296,6 @@ BOOL CDECL wined3d_device_show_cursor(struct wined3d_device *device, BOOL show)
|
||||
@@ -4346,10 +4291,6 @@ BOOL CDECL wined3d_device_show_cursor(struct wined3d_device *device, BOOL show)
|
||||
else
|
||||
SetCursor(NULL);
|
||||
}
|
||||
@@ -111,7 +111,7 @@ index 3e3d4a7..6b87c20 100644
|
||||
|
||||
return oldVisible;
|
||||
}
|
||||
@@ -4509,11 +4450,6 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4504,11 +4445,6 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
wined3d_texture_decref(device->logo_texture);
|
||||
device->logo_texture = NULL;
|
||||
}
|
||||
@@ -124,10 +124,10 @@ index 3e3d4a7..6b87c20 100644
|
||||
|
||||
if (device->state.fb.render_targets)
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index 560d1b9..a248292 100644
|
||||
index 5ded5d0..94ca18f 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -449,27 +449,6 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
@@ -455,27 +455,6 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
NULL, WINED3D_TEXF_POINT);
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ index 560d1b9..a248292 100644
|
||||
|
||||
render_to_fbo = swapchain->render_to_fbo;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 4171809..8ea2946 100644
|
||||
index 5f29243..f51a6d4 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2137,7 +2137,6 @@ struct wined3d_device
|
||||
|
||||
@@ -4,7 +4,7 @@ Subject: Autogenerated #ifdef patch for wined3d-CSMT_Main.
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -314,7 +314,11 @@
|
||||
@@ -320,7 +320,11 @@
|
||||
if (backbuffer->resource.multisample_type)
|
||||
{
|
||||
location = WINED3D_LOCATION_RB_RESOLVED;
|
||||
@@ -16,7 +16,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
}
|
||||
|
||||
context_apply_fbo_state_blit(context, GL_READ_FRAMEBUFFER, backbuffer, NULL, location);
|
||||
@@ -422,11 +426,19 @@
|
||||
@@ -428,11 +432,19 @@
|
||||
}
|
||||
|
||||
static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT *src_rect_in,
|
||||
@@ -36,7 +36,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
struct wined3d_context *context;
|
||||
struct wined3d_surface *front;
|
||||
@@ -454,6 +466,29 @@
|
||||
@@ -460,6 +472,29 @@
|
||||
NULL, WINED3D_TEXF_POINT);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
TRACE("Presenting HDC %p.\n", context->hdc);
|
||||
|
||||
render_to_fbo = swapchain->render_to_fbo;
|
||||
@@ -495,6 +530,7 @@
|
||||
@@ -501,6 +536,7 @@
|
||||
*/
|
||||
if (!swapchain->render_to_fbo && render_to_fbo && wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
{
|
||||
@@ -74,7 +74,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
wined3d_resource_load_location(&back_buffer->resource, context, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
wined3d_resource_invalidate_location(&back_buffer->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
swapchain->render_to_fbo = TRUE;
|
||||
@@ -503,6 +539,16 @@
|
||||
@@ -509,6 +545,16 @@
|
||||
else
|
||||
{
|
||||
wined3d_resource_load_location(&back_buffer->resource, context, back_buffer->container->resource.draw_binding);
|
||||
@@ -91,7 +91,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
}
|
||||
|
||||
if (swapchain->render_to_fbo)
|
||||
@@ -515,8 +561,13 @@
|
||||
@@ -521,8 +567,13 @@
|
||||
swapchain_blit(swapchain, context, &src_rect, &dst_rect);
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
|
||||
/* call wglSwapBuffers through the gl table to avoid confusing the Steam overlay */
|
||||
gl_info->gl_ops.wgl.p_wglSwapBuffers(context->hdc); /* TODO: cycle through the swapchain buffers */
|
||||
@@ -540,6 +591,7 @@
|
||||
@@ -546,6 +597,7 @@
|
||||
|
||||
front = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0));
|
||||
|
||||
@@ -113,7 +113,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
wined3d_resource_invalidate_location(&front->resource, ~WINED3D_LOCATION_DRAWABLE);
|
||||
switch (swapchain->desc.swap_effect)
|
||||
@@ -568,6 +620,31 @@
|
||||
@@ -574,6 +626,31 @@
|
||||
{
|
||||
wined3d_surface_decref(swapchain->device->cs->onscreen_depth_stencil);
|
||||
swapchain->device->cs->onscreen_depth_stencil = NULL;
|
||||
@@ -145,7 +145,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -600,7 +677,11 @@
|
||||
@@ -606,7 +683,11 @@
|
||||
|
||||
TRACE("Copying surface %p to screen.\n", front);
|
||||
|
||||
@@ -157,7 +157,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
|
||||
src_dc = front->hDC;
|
||||
window = swapchain->win_handle;
|
||||
@@ -628,8 +709,12 @@
|
||||
@@ -634,8 +715,12 @@
|
||||
}
|
||||
|
||||
static void swapchain_gdi_present(struct wined3d_swapchain *swapchain, const RECT *src_rect_in,
|
||||
@@ -170,7 +170,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
{
|
||||
struct wined3d_surface *front, *back;
|
||||
|
||||
@@ -656,9 +741,15 @@
|
||||
@@ -662,9 +747,15 @@
|
||||
{
|
||||
void *tmp;
|
||||
|
||||
@@ -186,7 +186,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
|
||||
if (front->resource.heap_memory)
|
||||
ERR("GDI Surface %p has heap memory allocated.\n", front);
|
||||
@@ -729,6 +820,7 @@
|
||||
@@ -735,6 +826,7 @@
|
||||
swapchain->render_to_fbo = TRUE;
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
HRESULT swapchain_create_context_cs(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
{
|
||||
const struct wined3d_adapter *adapter = device->adapter;
|
||||
@@ -792,6 +884,7 @@
|
||||
@@ -798,6 +890,7 @@
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3d_device *device,
|
||||
struct wined3d_swapchain_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops)
|
||||
{
|
||||
@@ -882,8 +975,13 @@
|
||||
@@ -888,8 +981,13 @@
|
||||
front_buffer = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0));
|
||||
if (!(device->wined3d->flags & WINED3D_NO3D))
|
||||
{
|
||||
@@ -216,7 +216,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
}
|
||||
|
||||
/* MSDN says we're only allowed a single fullscreen swapchain per device,
|
||||
@@ -909,9 +1007,66 @@
|
||||
@@ -915,9 +1013,66 @@
|
||||
|
||||
if (!(device->wined3d->flags & WINED3D_NO3D))
|
||||
{
|
||||
@@ -3927,7 +3927,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -3605,8 +4023,13 @@
|
||||
@@ -3592,8 +4010,13 @@
|
||||
if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE]
|
||||
|| state->render_states[WINED3D_RS_STENCILENABLE])
|
||||
{
|
||||
@@ -3941,7 +3941,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
|
||||
{
|
||||
@@ -3705,6 +4128,7 @@
|
||||
@@ -3692,6 +4115,7 @@
|
||||
struct wined3d_surface *src_surface, const RECT *src_rect,
|
||||
struct wined3d_surface *dst_surface, const POINT *dst_point)
|
||||
{
|
||||
@@ -3949,7 +3949,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
const struct wined3d_format *src_format = src_surface->resource.format;
|
||||
const struct wined3d_format *dst_format = dst_surface->resource.format;
|
||||
UINT update_w, update_h;
|
||||
@@ -3712,6 +4136,7 @@
|
||||
@@ -3699,6 +4123,7 @@
|
||||
RECT r, dst_rect;
|
||||
POINT p;
|
||||
|
||||
@@ -3957,7 +3957,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
TRACE("device %p, src_surface %p, src_rect %s, dst_surface %p, dst_point %s.\n",
|
||||
device, src_surface, wine_dbgstr_rect(src_rect),
|
||||
dst_surface, wine_dbgstr_point(dst_point));
|
||||
@@ -3723,6 +4148,7 @@
|
||||
@@ -3710,6 +4135,7 @@
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -3965,7 +3965,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (src_format->id != dst_format->id)
|
||||
{
|
||||
WARN("Source and destination surfaces should have the same format.\n");
|
||||
@@ -3787,6 +4213,9 @@
|
||||
@@ -3774,6 +4200,9 @@
|
||||
wined3d_cs_emit_update_surface(device->cs, src_surface, src_rect, dst_surface, dst_point);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -3975,7 +3975,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
void CDECL wined3d_device_copy_resource(struct wined3d_device *device,
|
||||
@@ -3939,7 +4368,17 @@
|
||||
@@ -3926,7 +4355,17 @@
|
||||
unsigned int depth_pitch)
|
||||
{
|
||||
struct wined3d_resource *sub_resource;
|
||||
@@ -3993,7 +3993,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);
|
||||
@@ -3956,7 +4395,14 @@
|
||||
@@ -3943,7 +4382,14 @@
|
||||
WARN("Invalid sub_resource_idx %u.\n", sub_resource_idx);
|
||||
return;
|
||||
}
|
||||
@@ -4008,7 +4008,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
|
||||
@@ -3966,9 +4412,47 @@
|
||||
@@ -3953,9 +4399,47 @@
|
||||
box->left, box->top, box->front, box->right, box->bottom, box->back);
|
||||
return;
|
||||
}
|
||||
@@ -4056,7 +4056,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
|
||||
@@ -3999,8 +4483,14 @@
|
||||
@@ -3986,8 +4470,14 @@
|
||||
rect = &r;
|
||||
}
|
||||
|
||||
@@ -4071,7 +4071,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,
|
||||
@@ -4014,6 +4504,7 @@
|
||||
@@ -4001,6 +4491,7 @@
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -4079,7 +4079,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
return device->state.fb.render_targets[view_idx];
|
||||
}
|
||||
|
||||
@@ -4029,6 +4520,22 @@
|
||||
@@ -4016,6 +4507,22 @@
|
||||
{
|
||||
struct wined3d_rendertarget_view *prev;
|
||||
struct wined3d_fb_state *fb = &device->state.fb;
|
||||
@@ -4102,7 +4102,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);
|
||||
@@ -4068,6 +4575,7 @@
|
||||
@@ -4055,6 +4562,7 @@
|
||||
}
|
||||
|
||||
|
||||
@@ -4110,7 +4110,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;
|
||||
@@ -4075,6 +4583,15 @@
|
||||
@@ -4062,6 +4570,15 @@
|
||||
if (view)
|
||||
wined3d_rendertarget_view_incref(view);
|
||||
fb->render_targets[view_idx] = view;
|
||||
@@ -4126,7 +4126,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. */
|
||||
@@ -4086,6 +4603,7 @@
|
||||
@@ -4073,6 +4590,7 @@
|
||||
|
||||
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
|
||||
{
|
||||
@@ -4134,7 +4134,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;
|
||||
|
||||
@@ -4103,6 +4621,66 @@
|
||||
@@ -4090,6 +4608,66 @@
|
||||
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
|
||||
if (prev)
|
||||
wined3d_rendertarget_view_decref(prev);
|
||||
@@ -4201,9 +4201,9 @@ 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 @@
|
||||
TRACE("device %p, x_hotspot %u, y_hotspot %u, cursor_image %p.\n",
|
||||
device, x_hotspot, y_hotspot, cursor_image);
|
||||
@@ -4110,6 +4688,14 @@
|
||||
|
||||
cursor_image = surface_from_resource(sub_resource);
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
+ if (device->cursor_texture)
|
||||
@@ -4216,7 +4216,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 @@
|
||||
@@ -4137,6 +4723,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. */
|
||||
@@ -4230,7 +4230,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 @@
|
||||
@@ -4241,6 +4834,12 @@
|
||||
else
|
||||
SetCursor(NULL);
|
||||
}
|
||||
@@ -4243,7 +4243,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
return oldVisible;
|
||||
}
|
||||
@@ -4256,8 +4855,10 @@
|
||||
@@ -4251,8 +4850,10 @@
|
||||
|
||||
TRACE("device %p.\n", device);
|
||||
|
||||
@@ -4254,7 +4254,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 @@
|
||||
@@ -4260,6 +4861,7 @@
|
||||
if (resource->pool == WINED3D_POOL_MANAGED && !resource->map_count)
|
||||
{
|
||||
TRACE("Evicting %p.\n", resource);
|
||||
@@ -4262,7 +4262,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 @@
|
||||
@@ -4278,6 +4880,37 @@
|
||||
|
||||
context = context_acquire(device, NULL);
|
||||
gl_info = context->gl_info;
|
||||
@@ -4300,7 +4300,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
if (device->depth_blt_texture)
|
||||
{
|
||||
@@ -4303,6 +4936,7 @@
|
||||
@@ -4298,6 +4931,7 @@
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, swapchain->context);
|
||||
swapchain->context = NULL;
|
||||
@@ -4308,7 +4308,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
swapchain->num_contexts = 0;
|
||||
}
|
||||
|
||||
@@ -4322,6 +4956,14 @@
|
||||
@@ -4317,6 +4951,14 @@
|
||||
|
||||
static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
{
|
||||
@@ -4323,7 +4323,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 @@
|
||||
@@ -4333,6 +4975,7 @@
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -4331,7 +4331,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 @@
|
||||
@@ -4343,6 +4986,34 @@
|
||||
}
|
||||
|
||||
wined3d_cs_emit_create_dummy_textures(device->cs);
|
||||
@@ -4366,7 +4366,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -4366,9 +5037,11 @@
|
||||
@@ -4361,9 +5032,11 @@
|
||||
TRACE("device %p, swapchain_desc %p, mode %p, callback %p, reset_state %#x.\n",
|
||||
device, swapchain_desc, mode, callback, reset_state);
|
||||
|
||||
@@ -4378,7 +4378,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 @@
|
||||
@@ -4378,9 +5051,21 @@
|
||||
wined3d_texture_decref(device->logo_texture);
|
||||
device->logo_texture = NULL;
|
||||
}
|
||||
@@ -4400,7 +4400,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 @@
|
||||
@@ -4389,6 +5074,7 @@
|
||||
}
|
||||
wined3d_device_set_depth_stencil_view(device, NULL);
|
||||
|
||||
@@ -4408,7 +4408,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 @@
|
||||
@@ -4398,6 +5084,12 @@
|
||||
{
|
||||
wined3d_surface_decref(device->cs->onscreen_depth_stencil);
|
||||
device->cs->onscreen_depth_stencil = NULL;
|
||||
@@ -4421,7 +4421,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
if (reset_state)
|
||||
@@ -4415,6 +5107,7 @@
|
||||
@@ -4410,6 +5102,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4429,7 +4429,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 @@
|
||||
@@ -4431,6 +5124,7 @@
|
||||
}
|
||||
device->cs->ops->finish(device->cs);
|
||||
|
||||
@@ -4437,7 +4437,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 @@
|
||||
@@ -4557,6 +5251,13 @@
|
||||
swapchain_desc->multisample_type, swapchain_desc->multisample_quality)))
|
||||
return hr;
|
||||
|
||||
@@ -4451,7 +4451,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 @@
|
||||
@@ -4599,6 +5300,13 @@
|
||||
wined3d_device_set_depth_stencil_view(device, device->auto_depth_stencil_view);
|
||||
}
|
||||
|
||||
@@ -4465,7 +4465,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 @@
|
||||
@@ -4619,12 +5327,20 @@
|
||||
}
|
||||
wined3d_cs_emit_reset_state(device->cs);
|
||||
state_cleanup(&device->state);
|
||||
@@ -4486,7 +4486,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 @@
|
||||
@@ -4633,6 +5349,7 @@
|
||||
}
|
||||
else if (device->back_buffer_view)
|
||||
{
|
||||
@@ -4494,7 +4494,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 @@
|
||||
@@ -4648,6 +5365,24 @@
|
||||
state->scissor_rect.left = 0;
|
||||
state->scissor_rect.right = swapchain->desc.backbuffer_width;
|
||||
state->scissor_rect.bottom = swapchain->desc.backbuffer_height;
|
||||
@@ -4519,7 +4519,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 @@
|
||||
@@ -4723,6 +5458,10 @@
|
||||
|
||||
TRACE("device %p, resource %p, type %s.\n", device, resource, debug_d3dresourcetype(type));
|
||||
|
||||
@@ -4530,7 +4530,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_RTYPE_SURFACE:
|
||||
@@ -4738,6 +5477,7 @@
|
||||
@@ -4733,6 +5472,7 @@
|
||||
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -4538,7 +4538,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 @@
|
||||
@@ -4744,6 +5484,19 @@
|
||||
{
|
||||
ERR("Surface %p is still in use as depth/stencil buffer.\n", surface);
|
||||
device->state.fb.depth_stencil = NULL;
|
||||
@@ -4558,7 +4558,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -4911,7 +5664,11 @@
|
||||
@@ -4906,7 +5659,11 @@
|
||||
|
||||
device->blitter = adapter->blitter;
|
||||
|
||||
@@ -4570,7 +4570,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 @@
|
||||
@@ -5005,6 +5762,7 @@
|
||||
else
|
||||
return CallWindowProcA(proc, window, message, wparam, lparam);
|
||||
}
|
||||
@@ -4578,7 +4578,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 @@
|
||||
@@ -5058,3 +5816,4 @@
|
||||
|
||||
wined3d_device_destroy_bo(device, context, bo);
|
||||
}
|
||||
@@ -6423,7 +6423,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1516,6 +1667,9 @@
|
||||
@@ -1540,6 +1691,9 @@
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
|
||||
Reference in New Issue
Block a user