Rebase against af4a757ad2cacbd238486632d0f7bd6f0a94483f.

[d3dx9_36-Uninitialized_Memory]
Removed patch to initialize animation variable before
D3DXCreateAnimationController test (fixed upstream).
This commit is contained in:
Sebastian Lackner 2016-01-20 19:20:49 +01:00
parent a5541ec2e1
commit 7fb8937fd3
3 changed files with 36 additions and 99 deletions

View File

@ -1,47 +0,0 @@
From 8a6a57c05ad79d3f2f9b059eae4a2d4a663bb8c0 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 19 Jan 2016 16:28:40 +0100
Subject: d3dx9_36/tests: Initialize animation variable before
D3DXCreateAnimationController test.
---
dlls/d3dx9_36/tests/mesh.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
index 7c86190..52b109c 100644
--- a/dlls/d3dx9_36/tests/mesh.c
+++ b/dlls/d3dx9_36/tests/mesh.c
@@ -11109,21 +11109,25 @@ static void D3DXCreateAnimationControllerTest(void)
hr = D3DXCreateAnimationController(0, 0, 0, 0, NULL);
ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr);
+ animation = (void *)0xdeadbeef;
hr = D3DXCreateAnimationController(0, 1, 1, 1, &animation);
ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr);
- ok(!animation, "Got unexpected animation %p.\n", animation);
+ ok(animation == (void *)0xdeadbeef, "Got unexpected animation %p.\n", animation);
+ animation = (void *)0xdeadbeef;
hr = D3DXCreateAnimationController(1, 0, 1, 1, &animation);
ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr);
- ok(!animation, "Got unexpected animation %p.\n", animation);
+ ok(animation == (void *)0xdeadbeef, "Got unexpected animation %p.\n", animation);
+ animation = (void *)0xdeadbeef;
hr = D3DXCreateAnimationController(1, 1, 0, 1, &animation);
ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr);
- ok(!animation, "Got unexpected animation %p.\n", animation);
+ ok(animation == (void *)0xdeadbeef, "Got unexpected animation %p.\n", animation);
+ animation = (void *)0xdeadbeef;
hr = D3DXCreateAnimationController(1, 1, 1, 0, &animation);
ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr);
- ok(!animation, "Got unexpected animation %p.\n", animation);
+ ok(animation == (void *)0xdeadbeef, "Got unexpected animation %p.\n", animation);
hr = D3DXCreateAnimationController(1, 1, 1, 1, &animation);
ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr);
--
2.6.4

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "d1841f496b423afa0e29cd7da87cfd297e5e8054"
echo "af4a757ad2cacbd238486632d0f7bd6f0a94483f"
}
# Show version information
@ -118,7 +118,6 @@ patch_enable_all ()
enable_d3dx9_36_GetShaderSemantics="$1"
enable_d3dx9_36_Optimize_Inplace="$1"
enable_d3dx9_36_Texture_Align="$1"
enable_d3dx9_36_Uninitialized_Memory="$1"
enable_d3dx9_36_UpdateSkinnedMesh="$1"
enable_dbghelp_Debug_Symbols="$1"
enable_ddraw_EnumSurfaces="$1"
@ -488,9 +487,6 @@ patch_enable ()
d3dx9_36-Texture_Align)
enable_d3dx9_36_Texture_Align="$2"
;;
d3dx9_36-Uninitialized_Memory)
enable_d3dx9_36_Uninitialized_Memory="$2"
;;
d3dx9_36-UpdateSkinnedMesh)
enable_d3dx9_36_UpdateSkinnedMesh="$2"
;;
@ -3055,18 +3051,6 @@ if test "$enable_d3dx9_36_Texture_Align" -eq 1; then
) >> "$patchlist"
fi
# Patchset d3dx9_36-Uninitialized_Memory
# |
# | Modified files:
# | * dlls/d3dx9_36/tests/mesh.c
# |
if test "$enable_d3dx9_36_Uninitialized_Memory" -eq 1; then
patch_apply d3dx9_36-Uninitialized_Memory/0001-d3dx9_36-tests-Initialize-animation-variable-before-.patch
(
echo '+ { "Sebastian Lackner", "d3dx9_36/tests: Initialize animation variable before D3DXCreateAnimationController test.", 1 },';
) >> "$patchlist"
fi
# Patchset d3dx9_36-UpdateSkinnedMesh
# |
# | This patchset fixes the following Wine bugs:

View File

@ -3147,7 +3147,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
@@ -4058,9 +4510,47 @@
@@ -4059,9 +4511,47 @@
box->left, box->top, box->front, box->right, box->bottom, box->back);
return;
}
@ -3195,7 +3195,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
@@ -4091,8 +4581,14 @@
@@ -4092,8 +4582,14 @@
rect = &r;
}
@ -3210,7 +3210,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,
@@ -4106,6 +4602,7 @@
@@ -4107,6 +4603,7 @@
return NULL;
}
@ -3218,7 +3218,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return device->state.fb.render_targets[view_idx];
}
@@ -4121,6 +4618,22 @@
@@ -4122,6 +4619,22 @@
{
struct wined3d_rendertarget_view *prev;
struct wined3d_fb_state *fb = &device->state.fb;
@ -3241,7 +3241,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);
@@ -4160,6 +4673,7 @@
@@ -4161,6 +4674,7 @@
}
@ -3249,7 +3249,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;
@@ -4167,6 +4681,15 @@
@@ -4168,6 +4682,15 @@
if (view)
wined3d_rendertarget_view_incref(view);
fb->render_targets[view_idx] = view;
@ -3265,7 +3265,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. */
@@ -4178,6 +4701,7 @@
@@ -4179,6 +4702,7 @@
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
{
@ -3273,7 +3273,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;
@@ -4195,6 +4719,66 @@
@@ -4196,6 +4720,66 @@
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
if (prev)
wined3d_rendertarget_view_decref(prev);
@ -3340,7 +3340,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device,
@@ -4215,6 +4799,14 @@
@@ -4216,6 +4800,14 @@
cursor_image = surface_from_resource(sub_resource);
@ -3355,7 +3355,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",
@@ -4242,6 +4834,13 @@
@@ -4243,6 +4835,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. */
@ -3369,7 +3369,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (cursor_image->resource.width == 32 && cursor_image->resource.height == 32)
{
@@ -4346,6 +4945,12 @@
@@ -4347,6 +4946,12 @@
else
SetCursor(NULL);
}
@ -3382,7 +3382,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return oldVisible;
}
@@ -4356,8 +4961,10 @@
@@ -4357,8 +4962,10 @@
TRACE("device %p.\n", device);
@ -3393,7 +3393,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);
@@ -4365,6 +4972,7 @@
@@ -4366,6 +4973,7 @@
if (resource->pool == WINED3D_POOL_MANAGED && !resource->map_count)
{
TRACE("Evicting %p.\n", resource);
@ -3401,7 +3401,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
wined3d_cs_emit_evict_resource(device->cs, resource);
}
}
@@ -4383,6 +4991,37 @@
@@ -4384,6 +4992,37 @@
context = context_acquire(device, NULL);
gl_info = context->gl_info;
@ -3439,7 +3439,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (device->depth_blt_texture)
{
@@ -4404,6 +5043,7 @@
@@ -4405,6 +5044,7 @@
HeapFree(GetProcessHeap(), 0, swapchain->context);
swapchain->context = NULL;
@ -3447,7 +3447,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
swapchain->num_contexts = 0;
}
@@ -4423,6 +5063,14 @@
@@ -4424,6 +5064,14 @@
static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
{
@ -3462,7 +3462,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,
@@ -4439,6 +5087,7 @@
@@ -4440,6 +5088,7 @@
return hr;
}
@ -3470,7 +3470,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))
{
@@ -4449,6 +5098,35 @@
@@ -4450,6 +5099,35 @@
}
wined3d_cs_emit_create_dummy_textures(device->cs);
@ -3506,7 +3506,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return WINED3D_OK;
}
@@ -4467,9 +5145,11 @@
@@ -4468,9 +5146,11 @@
TRACE("device %p, swapchain_desc %p, mode %p, callback %p, reset_state %#x.\n",
device, swapchain_desc, mode, callback, reset_state);
@ -3518,7 +3518,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");
@@ -4484,9 +5164,21 @@
@@ -4485,9 +5165,21 @@
wined3d_texture_decref(device->logo_texture);
device->logo_texture = NULL;
}
@ -3540,7 +3540,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
{
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@@ -4495,6 +5187,7 @@
@@ -4496,6 +5188,7 @@
}
wined3d_device_set_depth_stencil_view(device, NULL);
@ -3548,7 +3548,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (reset_state)
{
state_unbind_resources(&device->state);
@@ -4504,6 +5197,12 @@
@@ -4505,6 +5198,12 @@
{
wined3d_texture_decref(device->cs->onscreen_depth_stencil->container);
device->cs->onscreen_depth_stencil = NULL;
@ -3561,7 +3561,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
if (reset_state)
@@ -4516,6 +5215,7 @@
@@ -4517,6 +5216,7 @@
}
}
@ -3569,7 +3569,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
@@ -4537,6 +5237,7 @@
@@ -4538,6 +5238,7 @@
}
device->cs->ops->finish(device->cs);
@ -3577,7 +3577,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);
@@ -4663,6 +5364,13 @@
@@ -4664,6 +5365,13 @@
swapchain_desc->multisample_type, swapchain_desc->multisample_quality)))
return hr;
@ -3591,7 +3591,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;
@@ -4705,6 +5413,13 @@
@@ -4706,6 +5414,13 @@
wined3d_device_set_depth_stencil_view(device, device->auto_depth_stencil_view);
}
@ -3605,7 +3605,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)))
@@ -4725,12 +5440,20 @@
@@ -4726,12 +5441,20 @@
}
wined3d_cs_emit_reset_state(device->cs);
state_cleanup(&device->state);
@ -3626,7 +3626,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;
@@ -4739,6 +5462,7 @@
@@ -4740,6 +5463,7 @@
}
else if (device->back_buffer_view)
{
@ -3634,7 +3634,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);
@@ -4754,6 +5478,24 @@
@@ -4755,6 +5479,24 @@
state->scissor_rect.left = 0;
state->scissor_rect.right = swapchain->desc.backbuffer_width;
state->scissor_rect.bottom = swapchain->desc.backbuffer_height;
@ -3659,7 +3659,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
}
@@ -4829,6 +5571,10 @@
@@ -4830,6 +5572,10 @@
TRACE("device %p, resource %p, type %s.\n", device, resource, debug_d3dresourcetype(type));
@ -3670,7 +3670,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
switch (type)
{
case WINED3D_RTYPE_SURFACE:
@@ -4839,6 +5585,7 @@
@@ -4840,6 +5586,7 @@
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@ -3678,7 +3678,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);
@@ -4850,6 +5597,19 @@
@@ -4851,6 +5598,19 @@
{
ERR("Surface %p is still in use as depth/stencil buffer.\n", surface);
device->state.fb.depth_stencil = NULL;
@ -3698,7 +3698,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
}
break;
@@ -5012,7 +5772,11 @@
@@ -5013,7 +5773,11 @@
device->blitter = adapter->blitter;
@ -3710,7 +3710,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);
@@ -5111,6 +5875,7 @@
@@ -5112,6 +5876,7 @@
else
return CallWindowProcA(proc, window, message, wparam, lparam);
}
@ -3718,7 +3718,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,
@@ -5164,3 +5929,4 @@
@@ -5165,3 +5930,4 @@
wined3d_device_destroy_bo(device, context, bo);
}