mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
wined3d-CSMT_Main: Rebase against current upstream git version.
This commit is contained in:
parent
8692907421
commit
3a77266255
@ -1,4 +1,4 @@
|
||||
From b9c81476bc8d3bc8aa55fac10f0c7fc22a74dcb0 Mon Sep 17 00:00:00 2001
|
||||
From 449bdd36396ceefa6340fb06d462c26b05ee6d9d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 20 Dec 2012 13:09:17 +0100
|
||||
Subject: wined3d: Move the framebuffer into wined3d_state
|
||||
@ -20,7 +20,7 @@ Subject: wined3d: Move the framebuffer into wined3d_state
|
||||
13 files changed, 170 insertions(+), 125 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index f612099..2875fe1 100644
|
||||
index f7bea42..9f29aa4 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -706,7 +706,7 @@ static void shader_arb_load_constants_internal(struct shader_arb_priv *priv,
|
||||
@ -42,7 +42,7 @@ index f612099..2875fe1 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index cc60348..679e728 100644
|
||||
index 39f7d8c..9e2adfc 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -1448,6 +1448,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
@ -74,7 +74,7 @@ index cc60348..679e728 100644
|
||||
HeapFree(GetProcessHeap(), 0, context->draw_buffers);
|
||||
HeapFree(GetProcessHeap(), 0, context->blit_targets);
|
||||
device_context_remove(device, context);
|
||||
@@ -2306,7 +2314,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2308,7 +2316,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
DWORD rt_mask = 0, *cur_mask;
|
||||
UINT i;
|
||||
|
||||
@ -83,7 +83,7 @@ index cc60348..679e728 100644
|
||||
|| rt_count != context->gl_info->limits.buffers)
|
||||
{
|
||||
if (!context_validate_rt_config(rt_count, rts, fb->depth_stencil))
|
||||
@@ -2349,6 +2357,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2351,6 +2359,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
rt_mask = context_generate_rt_mask_no_fbo(device,
|
||||
rt_count ? wined3d_rendertarget_view_get_surface(rts[0]) : NULL);
|
||||
}
|
||||
@ -92,7 +92,7 @@ index cc60348..679e728 100644
|
||||
}
|
||||
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
|
||||
&& (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource)))
|
||||
@@ -2399,7 +2409,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2401,7 +2411,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_device *device)
|
||||
{
|
||||
const struct wined3d_state *state = &device->state;
|
||||
@ -101,7 +101,7 @@ index cc60348..679e728 100644
|
||||
struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL];
|
||||
DWORD rt_mask, rt_mask_bits;
|
||||
unsigned int i;
|
||||
@@ -2429,7 +2439,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
@@ -2431,7 +2441,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
const struct wined3d_device *device = context->swapchain->device;
|
||||
@ -110,7 +110,7 @@ index cc60348..679e728 100644
|
||||
DWORD rt_mask = find_draw_buffers_mask(context, device);
|
||||
DWORD *cur_mask;
|
||||
|
||||
@@ -2459,6 +2469,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
@@ -2461,6 +2471,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
context_apply_draw_buffers(context, rt_mask);
|
||||
*cur_mask = rt_mask;
|
||||
}
|
||||
@ -119,7 +119,7 @@ index cc60348..679e728 100644
|
||||
}
|
||||
|
||||
static void context_map_stage(struct wined3d_context *context, DWORD stage, DWORD unit)
|
||||
@@ -2960,7 +2972,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
|
||||
@@ -2962,7 +2974,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
|
||||
{
|
||||
const struct wined3d_state *state = &device->state;
|
||||
const struct StateEntry *state_table = context->state_table;
|
||||
@ -205,10 +205,10 @@ index b8a32e5..7bebe80 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
}
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 565a92c..92478d7 100644
|
||||
index 9f09736..1e4eb0f 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -851,7 +851,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
|
||||
@@ -860,7 +860,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
|
||||
BOOL ds_enable = !!swapchain->desc.enable_auto_depth_stencil;
|
||||
unsigned int i;
|
||||
|
||||
@ -217,7 +217,7 @@ index 565a92c..92478d7 100644
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -869,7 +869,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -878,7 +878,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
struct wined3d_swapchain_desc *swapchain_desc)
|
||||
{
|
||||
static const struct wined3d_color black = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
@ -225,7 +225,7 @@ index 565a92c..92478d7 100644
|
||||
struct wined3d_swapchain *swapchain = NULL;
|
||||
struct wined3d_context *context;
|
||||
DWORD clear_flags = 0;
|
||||
@@ -882,9 +881,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -891,9 +890,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
if (device->wined3d->flags & WINED3D_NO3D)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
@ -235,7 +235,7 @@ index 565a92c..92478d7 100644
|
||||
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
|
||||
device->adapter->vertex_pipe, device->adapter->fragment_pipe)))
|
||||
{
|
||||
@@ -972,7 +968,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -981,7 +977,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
return WINED3D_OK;
|
||||
|
||||
err_out:
|
||||
@ -243,7 +243,7 @@ index 565a92c..92478d7 100644
|
||||
HeapFree(GetProcessHeap(), 0, device->swapchains);
|
||||
device->swapchain_count = 0;
|
||||
if (device->back_buffer_view)
|
||||
@@ -1044,8 +1039,25 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1061,8 +1056,25 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
if (device->cursor_texture)
|
||||
wined3d_texture_decref(device->cursor_texture);
|
||||
|
||||
@ -269,7 +269,7 @@ index 565a92c..92478d7 100644
|
||||
/* Unload resources */
|
||||
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
|
||||
{
|
||||
@@ -1068,37 +1080,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1087,37 +1099,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
device->shader_backend->shader_free_private(device);
|
||||
destroy_dummy_textures(device, gl_info);
|
||||
|
||||
@ -307,7 +307,7 @@ index 565a92c..92478d7 100644
|
||||
if (device->back_buffer_view)
|
||||
{
|
||||
wined3d_rendertarget_view_decref(device->back_buffer_view);
|
||||
@@ -1118,9 +1099,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1137,9 +1118,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
device->swapchains = NULL;
|
||||
device->swapchain_count = 0;
|
||||
|
||||
@ -317,7 +317,7 @@ index 565a92c..92478d7 100644
|
||||
device->d3d_initialized = FALSE;
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -1910,7 +1888,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
@@ -1929,7 +1907,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
|| !(texture->resource.format->flags & WINED3DFMT_FLAG_DEPTH))
|
||||
return;
|
||||
surface = surface_from_resource(texture->sub_resources[0]);
|
||||
@ -326,7 +326,7 @@ index 565a92c..92478d7 100644
|
||||
return;
|
||||
|
||||
wined3d_surface_blt(surface, NULL, depth_stencil, NULL, 0, NULL, WINED3D_TEXF_POINT);
|
||||
@@ -3299,6 +3277,8 @@ HRESULT CDECL wined3d_device_present(const struct wined3d_device *device, const
|
||||
@@ -3318,6 +3296,8 @@ HRESULT CDECL wined3d_device_present(const struct wined3d_device *device, const
|
||||
HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_count,
|
||||
const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
|
||||
{
|
||||
@ -335,7 +335,7 @@ index 565a92c..92478d7 100644
|
||||
TRACE("device %p, rect_count %u, rects %p, flags %#x, color {%.8e, %.8e, %.8e, %.8e}, depth %.8e, stencil %u.\n",
|
||||
device, rect_count, rects, flags, color->r, color->g, color->b, color->a, depth, stencil);
|
||||
|
||||
@@ -3310,7 +3290,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3329,7 +3309,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
|
||||
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
|
||||
{
|
||||
@ -344,7 +344,7 @@ index 565a92c..92478d7 100644
|
||||
if (!ds)
|
||||
{
|
||||
WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
|
||||
@@ -3319,8 +3299,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3338,8 +3318,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
}
|
||||
else if (flags & WINED3DCLEAR_TARGET)
|
||||
{
|
||||
@ -355,7 +355,7 @@ index 565a92c..92478d7 100644
|
||||
{
|
||||
WARN("Silently ignoring depth and target clear with mismatching sizes\n");
|
||||
return WINED3D_OK;
|
||||
@@ -3668,8 +3648,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
@@ -3687,8 +3667,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE]
|
||||
|| state->render_states[WINED3D_RS_STENCILENABLE])
|
||||
{
|
||||
@ -366,7 +366,7 @@ index 565a92c..92478d7 100644
|
||||
|
||||
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
|
||||
{
|
||||
@@ -3895,20 +3875,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
@@ -3914,20 +3894,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -390,7 +390,7 @@ index 565a92c..92478d7 100644
|
||||
|
||||
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
|
||||
device, view_idx, view, set_viewport);
|
||||
@@ -3948,13 +3929,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -3967,13 +3948,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
}
|
||||
|
||||
|
||||
@ -406,7 +406,7 @@ index 565a92c..92478d7 100644
|
||||
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. */
|
||||
@@ -3966,18 +3947,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -3985,18 +3966,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
|
||||
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
|
||||
{
|
||||
@ -428,7 +428,7 @@ index 565a92c..92478d7 100644
|
||||
wined3d_rendertarget_view_incref(view);
|
||||
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
|
||||
if (prev)
|
||||
@@ -4350,10 +4332,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4352,10 +4334,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
wined3d_texture_decref(device->cursor_texture);
|
||||
device->cursor_texture = NULL;
|
||||
}
|
||||
@ -440,7 +440,7 @@ index 565a92c..92478d7 100644
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -4362,6 +4343,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4364,6 +4345,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
}
|
||||
wined3d_device_set_depth_stencil_view(device, NULL);
|
||||
|
||||
@ -452,7 +452,7 @@ index 565a92c..92478d7 100644
|
||||
if (device->onscreen_depth_stencil)
|
||||
{
|
||||
wined3d_surface_decref(device->onscreen_depth_stencil);
|
||||
@@ -4644,7 +4630,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4646,7 +4632,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
if (device->d3d_initialized)
|
||||
delete_opengl_contexts(device, swapchain);
|
||||
|
||||
@ -461,7 +461,7 @@ index 565a92c..92478d7 100644
|
||||
&device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT)))
|
||||
ERR("Failed to initialize device state, hr %#x.\n", hr);
|
||||
device->update_state = &device->state;
|
||||
@@ -4653,22 +4639,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4655,22 +4641,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
}
|
||||
else if (device->back_buffer_view)
|
||||
{
|
||||
@ -489,7 +489,7 @@ index 565a92c..92478d7 100644
|
||||
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
|
||||
}
|
||||
|
||||
@@ -4759,17 +4744,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
@@ -4763,17 +4748,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -511,7 +511,7 @@ index 565a92c..92478d7 100644
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -4910,7 +4895,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
@@ -4936,7 +4921,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
|
||||
device->blitter = adapter->blitter;
|
||||
|
||||
@ -577,10 +577,10 @@ index 62b7032..98261f9 100644
|
||||
|
||||
surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy);
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 0ab591f..4ef473b 100644
|
||||
index a829651..5239aa7 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -957,7 +957,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
@@ -952,7 +952,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
const struct wined3d_state *state = &shader->device->state;
|
||||
const struct ps_compile_args *ps_args = ctx_priv->cur_ps_args;
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
@ -603,7 +603,7 @@ index 6531803..cc969b8 100644
|
||||
{
|
||||
static unsigned int warned = 0;
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 700db84..20f00d6 100644
|
||||
index 3c672db..da2976d 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -106,7 +106,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
|
||||
@ -651,7 +651,7 @@ index 700db84..20f00d6 100644
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
gl_info->gl_ops.gl.p_glStencilMask(mask);
|
||||
@@ -1765,7 +1765,7 @@ static void state_depthbias(struct wined3d_context *context, const struct wined3
|
||||
@@ -1766,7 +1766,7 @@ static void state_depthbias(struct wined3d_context *context, const struct wined3
|
||||
if (state->render_states[WINED3D_RS_SLOPESCALEDEPTHBIAS]
|
||||
|| state->render_states[WINED3D_RS_DEPTHBIAS])
|
||||
{
|
||||
@ -660,7 +660,7 @@ index 700db84..20f00d6 100644
|
||||
float scale;
|
||||
|
||||
union
|
||||
@@ -4653,7 +4653,7 @@ void vertexdeclaration(struct wined3d_context *context, const struct wined3d_sta
|
||||
@@ -4772,7 +4772,7 @@ void vertexdeclaration(struct wined3d_context *context, const struct wined3d_sta
|
||||
|
||||
static void viewport_miscpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@ -669,7 +669,7 @@ index 700db84..20f00d6 100644
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
struct wined3d_viewport vp = state->viewport;
|
||||
|
||||
@@ -4833,7 +4833,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
@@ -4952,7 +4952,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -678,7 +678,7 @@ index 700db84..20f00d6 100644
|
||||
UINT height;
|
||||
UINT width;
|
||||
|
||||
@@ -4900,7 +4900,7 @@ static void psorigin(struct wined3d_context *context, const struct wined3d_state
|
||||
@@ -5019,7 +5019,7 @@ static void psorigin(struct wined3d_context *context, const struct wined3d_state
|
||||
|
||||
void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@ -788,10 +788,10 @@ index dc146fc..141e539 100644
|
||||
|
||||
if (FAILED(hr = stateblock_allocate_shader_constants(stateblock)))
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 3702866..642210d 100644
|
||||
index f7ea41f..7469a15 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -3332,9 +3332,9 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
@@ -3484,9 +3484,9 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
enum wined3d_texture_filter_type filter)
|
||||
{
|
||||
struct wined3d_device *device = dst_surface->resource.device;
|
||||
@ -829,10 +829,10 @@ index 6ce07b8..8ff4e3e 100644
|
||||
const struct wined3d_d3d_info *d3d_info = context->d3d_info;
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 43e1c21..7339ae5 100644
|
||||
index 511e924..1cf3dc7 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1088,6 +1088,36 @@ struct wined3d_timestamp_query
|
||||
@@ -1098,6 +1098,36 @@ struct wined3d_timestamp_query
|
||||
void context_alloc_timestamp_query(struct wined3d_context *context, struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
|
||||
void context_free_timestamp_query(struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
|
||||
|
||||
@ -869,7 +869,7 @@ index 43e1c21..7339ae5 100644
|
||||
struct wined3d_context
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
@@ -1102,6 +1132,7 @@ struct wined3d_context
|
||||
@@ -1112,6 +1142,7 @@ struct wined3d_context
|
||||
DWORD dirtyArray[STATE_HIGHEST + 1]; /* Won't get bigger than that, a state is never marked dirty 2 times */
|
||||
DWORD numDirtyEntries;
|
||||
DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */
|
||||
@ -877,7 +877,7 @@ index 43e1c21..7339ae5 100644
|
||||
|
||||
struct wined3d_swapchain *swapchain;
|
||||
struct wined3d_surface *current_rt;
|
||||
@@ -1201,12 +1232,6 @@ struct wined3d_context
|
||||
@@ -1211,12 +1242,6 @@ struct wined3d_context
|
||||
GLuint dummy_arbfp_prog;
|
||||
};
|
||||
|
||||
@ -890,7 +890,7 @@ index 43e1c21..7339ae5 100644
|
||||
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
|
||||
|
||||
struct StateEntry
|
||||
@@ -1881,7 +1906,7 @@ struct wined3d_stream_state
|
||||
@@ -1891,7 +1916,7 @@ struct wined3d_stream_state
|
||||
struct wined3d_state
|
||||
{
|
||||
DWORD flags;
|
||||
@ -899,15 +899,15 @@ index 43e1c21..7339ae5 100644
|
||||
|
||||
struct wined3d_vertex_declaration *vertex_declaration;
|
||||
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
|
||||
@@ -1986,7 +2011,6 @@ struct wined3d_device
|
||||
struct list shaders; /* a linked list to track shaders (pixel and vertex) */
|
||||
@@ -1997,7 +2022,6 @@ struct wined3d_device
|
||||
struct wine_rb_tree samplers;
|
||||
|
||||
/* Render Target Support */
|
||||
- struct wined3d_fb_state fb;
|
||||
struct wined3d_surface *onscreen_depth_stencil;
|
||||
struct wined3d_rendertarget_view *auto_depth_stencil_view;
|
||||
|
||||
@@ -2497,9 +2521,8 @@ struct wined3d_stateblock
|
||||
@@ -2500,9 +2524,8 @@ struct wined3d_stateblock
|
||||
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
|
||||
|
||||
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@ -919,7 +919,7 @@ index 43e1c21..7339ae5 100644
|
||||
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
|
||||
struct wined3d_cs_ops
|
||||
@@ -2512,7 +2535,6 @@ struct wined3d_cs
|
||||
@@ -2515,7 +2538,6 @@ struct wined3d_cs
|
||||
{
|
||||
const struct wined3d_cs_ops *ops;
|
||||
struct wined3d_device *device;
|
||||
@ -928,5 +928,5 @@ index 43e1c21..7339ae5 100644
|
||||
|
||||
size_t data_size;
|
||||
--
|
||||
2.1.3
|
||||
2.2.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 64d0e5c85cdd399857597ab57cfd4e2444e17226 Mon Sep 17 00:00:00 2001
|
||||
From 58db2f20f55fd78d4831475a5bdce14339c1e66f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Wed, 10 Apr 2013 19:53:44 +0200
|
||||
Subject: wined3d: Finish the cs before changing the texture lod
|
||||
@ -8,10 +8,10 @@ Subject: wined3d: Finish the cs before changing the texture lod
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 68889e5..8212c96 100644
|
||||
index 6381613..0eb191e 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -601,6 +601,13 @@ DWORD CDECL wined3d_texture_set_lod(struct wined3d_texture *texture, DWORD lod)
|
||||
@@ -510,6 +510,13 @@ DWORD CDECL wined3d_texture_set_lod(struct wined3d_texture *texture, DWORD lod)
|
||||
|
||||
if (texture->lod != lod)
|
||||
{
|
||||
@ -24,7 +24,7 @@ index 68889e5..8212c96 100644
|
||||
+
|
||||
texture->lod = lod;
|
||||
|
||||
texture->texture_rgb.states[WINED3DTEXSTA_MAXMIPLEVEL] = ~0U;
|
||||
texture->texture_rgb.base_level = ~0u;
|
||||
--
|
||||
2.1.3
|
||||
2.2.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9afc54cc004880662dff5ebe6734d27b11c2e8bc Mon Sep 17 00:00:00 2001
|
||||
From 3d851db23b85050b91b68a9556fd5b3407166089 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Fri, 5 Apr 2013 14:37:44 +0200
|
||||
Subject: wined3d: Keep track of the onscreen depth stencil in the command
|
||||
@ -64,7 +64,7 @@ index 4b1ed18..236e2f2 100644
|
||||
{
|
||||
struct wined3d_cs *cs = thread_param;
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index ee8b418..dfc0619 100644
|
||||
index c3e7d33..9fe7760 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -198,22 +198,6 @@ void device_context_remove(struct wined3d_device *device, struct wined3d_context
|
||||
@ -101,7 +101,7 @@ index ee8b418..dfc0619 100644
|
||||
prepare_ds_clear(depth_stencil, context, location,
|
||||
draw_rect, rect_count, clear_rect, &ds_rect);
|
||||
}
|
||||
@@ -1043,11 +1027,12 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1060,11 +1044,12 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
/* Release the buffers (with sanity checks).
|
||||
* FIXME: Move this move into a separate patch. I think the idea
|
||||
* behind this is that those surfaces should be freed before unloading
|
||||
@ -118,7 +118,7 @@ index ee8b418..dfc0619 100644
|
||||
wined3d_surface_decref(surface);
|
||||
}
|
||||
|
||||
@@ -4400,10 +4385,10 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4402,10 +4387,10 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
state_unbind_resources(&device->state);
|
||||
}
|
||||
|
||||
@ -166,10 +166,10 @@ index e190892..fa0c241 100644
|
||||
}
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 024b55b..e4dbd9d 100644
|
||||
index 0aed164..aadb8db 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2011,14 +2011,11 @@ struct wined3d_device
|
||||
@@ -2021,15 +2021,12 @@ struct wined3d_device
|
||||
struct wined3d_rendertarget_view *back_buffer_view;
|
||||
struct wined3d_swapchain **swapchains;
|
||||
UINT swapchain_count;
|
||||
@ -177,6 +177,7 @@ index 024b55b..e4dbd9d 100644
|
||||
|
||||
struct list resources; /* a linked list to track resources created by the device */
|
||||
struct list shaders; /* a linked list to track shaders (pixel and vertex) */
|
||||
struct wine_rb_tree samplers;
|
||||
|
||||
- /* Render Target Support */
|
||||
- struct wined3d_surface *onscreen_depth_stencil;
|
||||
@ -185,7 +186,7 @@ index 024b55b..e4dbd9d 100644
|
||||
/* For rendering to a texture using glCopyTexImage */
|
||||
GLuint depth_blt_texture;
|
||||
|
||||
@@ -2060,8 +2057,6 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -2071,8 +2068,6 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN;
|
||||
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
@ -194,7 +195,7 @@ index 024b55b..e4dbd9d 100644
|
||||
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
@@ -2556,6 +2551,7 @@ struct wined3d_cs
|
||||
@@ -2559,6 +2554,7 @@ struct wined3d_cs
|
||||
struct wined3d_state state;
|
||||
HANDLE thread;
|
||||
DWORD tls_idx;
|
||||
@ -202,7 +203,7 @@ index 024b55b..e4dbd9d 100644
|
||||
|
||||
size_t data_size;
|
||||
void *data;
|
||||
@@ -2566,6 +2562,8 @@ struct wined3d_cs
|
||||
@@ -2569,6 +2565,8 @@ struct wined3d_cs
|
||||
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
@ -212,5 +213,5 @@ index 024b55b..e4dbd9d 100644
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.1.3
|
||||
2.2.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 76c15351903191f31484a66c498dbfc39e763a5a Mon Sep 17 00:00:00 2001
|
||||
From 91f2801402040e6750d2ba344189c84c1e1326cf Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 6 Oct 2013 16:20:32 +0200
|
||||
Subject: wined3d: Clean up texture resources through the cs.
|
||||
@ -70,10 +70,10 @@ index 7675214..5e4aa53 100644
|
||||
|
||||
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 3fc020e..49bd366 100644
|
||||
index 627da81..e0b6a2b 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -131,17 +131,26 @@ static void wined3d_texture_unload_gl_texture(struct wined3d_texture *texture)
|
||||
@@ -120,17 +120,26 @@ static void wined3d_texture_unload_gl_texture(struct wined3d_texture *texture)
|
||||
resource_unload(&texture->resource);
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ index 3fc020e..49bd366 100644
|
||||
}
|
||||
|
||||
for (i = 0; i < sub_count; ++i)
|
||||
@@ -152,11 +161,8 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
@@ -141,11 +150,8 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
texture->texture_ops->texture_sub_resource_cleanup(sub_resource);
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ index 3fc020e..49bd366 100644
|
||||
}
|
||||
|
||||
void wined3d_texture_set_swapchain(struct wined3d_texture *texture, struct wined3d_swapchain *swapchain)
|
||||
@@ -523,9 +529,10 @@ ULONG CDECL wined3d_texture_decref(struct wined3d_texture *texture)
|
||||
@@ -432,9 +438,10 @@ ULONG CDECL wined3d_texture_decref(struct wined3d_texture *texture)
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
@ -127,7 +127,7 @@ index 3fc020e..49bd366 100644
|
||||
}
|
||||
|
||||
return refcount;
|
||||
@@ -1092,12 +1099,14 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
@@ -999,12 +1006,14 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
@ -142,7 +142,7 @@ index 3fc020e..49bd366 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1107,12 +1116,14 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
@@ -1014,12 +1023,14 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n");
|
||||
@ -157,7 +157,7 @@ index 3fc020e..49bd366 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1133,6 +1144,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
@@ -1040,6 +1051,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
else
|
||||
{
|
||||
WARN("Attempted to create a NPOT cube texture (edge length %u) without GL support.\n", desc->width);
|
||||
@ -165,7 +165,7 @@ index 3fc020e..49bd366 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1142,6 +1154,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
@@ -1049,6 +1061,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
surface_flags, device, parent, parent_ops, &texture_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x\n", hr);
|
||||
@ -173,7 +173,7 @@ index 3fc020e..49bd366 100644
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1204,6 +1217,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
@@ -1111,6 +1124,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
@ -181,7 +181,7 @@ index 3fc020e..49bd366 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1234,6 +1248,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
@@ -1141,6 +1155,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
else
|
||||
{
|
||||
WARN("Attempted to create a mipmapped NPOT texture without unconditional NPOT support.\n");
|
||||
@ -189,7 +189,7 @@ index 3fc020e..49bd366 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1246,12 +1261,14 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
@@ -1153,12 +1168,14 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning WINED3DERR_INVALIDCALL.\n");
|
||||
@ -204,7 +204,7 @@ index 3fc020e..49bd366 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1260,6 +1277,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
@@ -1167,6 +1184,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
surface_flags, device, parent, parent_ops, &texture_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@ -212,7 +212,7 @@ index 3fc020e..49bd366 100644
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1446,12 +1464,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -1345,12 +1363,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
@ -227,7 +227,7 @@ index 3fc020e..49bd366 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1461,12 +1481,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -1360,12 +1380,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n");
|
||||
@ -242,7 +242,7 @@ index 3fc020e..49bd366 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1494,6 +1516,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -1393,6 +1415,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
{
|
||||
WARN("Attempted to create a NPOT volume texture (%u, %u, %u) without GL support.\n",
|
||||
desc->width, desc->height, desc->depth);
|
||||
@ -250,7 +250,7 @@ index 3fc020e..49bd366 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1503,6 +1526,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -1402,6 +1425,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
0, device, parent, parent_ops, &texture_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@ -258,7 +258,7 @@ index 3fc020e..49bd366 100644
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1579,7 +1603,6 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
|
||||
@@ -1478,7 +1502,6 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@ -267,18 +267,18 @@ index 3fc020e..49bd366 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 5b1a286..2f5fbf3 100644
|
||||
index af72d74..b62022f 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2307,6 +2307,7 @@ static inline struct gl_texture *wined3d_texture_get_gl_texture(struct wined3d_t
|
||||
void wined3d_texture_apply_state_changes(struct wined3d_texture *texture,
|
||||
const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1],
|
||||
const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
|
||||
@@ -2289,6 +2289,7 @@ static inline struct gl_texture *wined3d_texture_get_gl_texture(struct wined3d_t
|
||||
|
||||
void wined3d_texture_apply_sampler_desc(struct wined3d_texture *texture,
|
||||
const struct wined3d_sampler_desc *sampler_desc, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
|
||||
+void wined3d_texture_cleanup_cs(struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_bind(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
|
||||
@@ -2732,6 +2733,7 @@ void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs,
|
||||
@@ -2717,6 +2718,7 @@ void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs,
|
||||
void wined3d_cs_emit_buffer_cleanup(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_volume_cleanup(struct wined3d_cs *cs, struct wined3d_volume *volume) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_surface_cleanup(struct wined3d_cs *cs, struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
@ -287,5 +287,5 @@ index 5b1a286..2f5fbf3 100644
|
||||
/* Direct3D terminology with little modifications. We do not have an issued state
|
||||
* because only the driver knows about it, but we have a created state because d3d
|
||||
--
|
||||
1.9.1
|
||||
2.2.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a2b1d967f8c0ee199803ba6e7ebb0b07c26a65f0 Mon Sep 17 00:00:00 2001
|
||||
From 1e5a27c212131073531e6c1cf8d45b9d67d70693 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Wed, 2 Oct 2013 23:28:56 +0200
|
||||
Subject: wined3d: Unload resources through the CS in uninit_3d.
|
||||
@ -8,10 +8,10 @@ Subject: wined3d: Unload resources through the CS in uninit_3d.
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index f5cb7bd..28819af 100644
|
||||
index 29a4d33..8d896a0 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1050,9 +1050,10 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1067,9 +1067,10 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
|
||||
{
|
||||
TRACE("Unloading resource %p.\n", resource);
|
||||
@ -22,8 +22,8 @@ index f5cb7bd..28819af 100644
|
||||
+ if (wined3d_settings.cs_multithreaded)
|
||||
+ device->cs->ops->finish(device->cs);
|
||||
|
||||
/* Destroy the depth blt resources, they will be invalid after the reset. Also free shader
|
||||
* private data, it might contain opengl pointers
|
||||
wine_rb_for_each_entry(&device->samplers, device_free_sampler, device);
|
||||
|
||||
--
|
||||
2.1.3
|
||||
2.2.1
|
||||
|
||||
|
@ -1,17 +1,17 @@
|
||||
From cdfd2659beba10a60a6535bb489c976b97f28ec5 Mon Sep 17 00:00:00 2001
|
||||
From 07c7bd93784b29a1b75f701b9a358c85babfc003 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Fri, 11 Oct 2013 10:17:42 +0200
|
||||
Subject: wined3d: Delete GL contexts through the CS in uninit_3d.
|
||||
|
||||
---
|
||||
dlls/wined3d/device.c | 27 ++-------------------------
|
||||
1 file changed, 2 insertions(+), 25 deletions(-)
|
||||
dlls/wined3d/device.c | 31 ++++---------------------------
|
||||
1 file changed, 4 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index b96f20f..278bbdc 100644
|
||||
index f171df8..2d00ada 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -997,8 +997,6 @@ err_out:
|
||||
@@ -1014,8 +1014,6 @@ static void device_free_sampler(struct wine_rb_entry *entry, void *context)
|
||||
HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
{
|
||||
struct wined3d_resource *resource, *cursor;
|
||||
@ -20,7 +20,7 @@ index b96f20f..278bbdc 100644
|
||||
struct wined3d_surface *surface;
|
||||
UINT i;
|
||||
|
||||
@@ -1010,12 +1008,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1027,12 +1025,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
if (wined3d_settings.cs_multithreaded)
|
||||
device->cs->ops->finish(device->cs);
|
||||
|
||||
@ -33,13 +33,15 @@ index b96f20f..278bbdc 100644
|
||||
if (device->logo_texture)
|
||||
wined3d_texture_decref(device->logo_texture);
|
||||
|
||||
@@ -1045,22 +1037,8 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1062,24 +1054,8 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
TRACE("Unloading resource %p.\n", resource);
|
||||
wined3d_cs_emit_evict_resource(device->cs, resource);
|
||||
}
|
||||
- if (wined3d_settings.cs_multithreaded)
|
||||
- device->cs->ops->finish(device->cs);
|
||||
-
|
||||
- wine_rb_for_each_entry(&device->samplers, device_free_sampler, device);
|
||||
-
|
||||
- /* Destroy the depth blt resources, they will be invalid after the reset. Also free shader
|
||||
- * private data, it might contain opengl pointers
|
||||
- */
|
||||
@ -57,7 +59,7 @@ index b96f20f..278bbdc 100644
|
||||
|
||||
if (device->back_buffer_view)
|
||||
{
|
||||
@@ -1068,8 +1046,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1087,8 +1063,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
device->back_buffer_view = NULL;
|
||||
}
|
||||
|
||||
@ -66,7 +68,16 @@ index b96f20f..278bbdc 100644
|
||||
for (i = 0; i < device->swapchain_count; ++i)
|
||||
{
|
||||
TRACE("Releasing the implicit swapchain %u.\n", i);
|
||||
@@ -4175,6 +4151,7 @@ void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wine
|
||||
@@ -4166,6 +4140,8 @@ void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wine
|
||||
context = context_acquire(device, NULL);
|
||||
gl_info = context->gl_info;
|
||||
|
||||
+ wine_rb_for_each_entry(&device->samplers, device_free_sampler, device);
|
||||
+
|
||||
if (device->depth_blt_texture)
|
||||
{
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->depth_blt_texture);
|
||||
@@ -4185,6 +4161,7 @@ void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wine
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, swapchain->context);
|
||||
swapchain->context = NULL;
|
||||
@ -75,5 +86,5 @@ index b96f20f..278bbdc 100644
|
||||
|
||||
static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
--
|
||||
2.1.3
|
||||
2.2.1
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user