Rebase against upstream changes.

This commit is contained in:
Sebastian Lackner 2015-02-20 15:57:32 +01:00
parent ea9f209292
commit eea70481fe
2 changed files with 84 additions and 84 deletions

View File

@ -1,4 +1,4 @@
From a7a0d0aca8b7d4b1972f237a19b5caf212a74fd3 Mon Sep 17 00:00:00 2001
From 795be1ce7b544a08dcdf72a128a3e3d98998ba02 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 19 Sep 2013 14:22:24 +0200
Subject: wined3d: Merge get_pitch functions.
@ -97,7 +97,7 @@ index 205f074..3375c0f 100644
+ TRACE("Returning row pitch %u, slice pitch %u.\n", *row_pitch, *slice_pitch);
+}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 9ba5906..dbbc826 100644
index 3e3cf67..c185a93 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -363,6 +363,7 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
@ -289,7 +289,7 @@ index 9ba5906..dbbc826 100644
format = *texture->resource.format;
if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE)))
@@ -4353,9 +4340,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4352,9 +4339,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
context_release(context);
return E_OUTOFMEMORY;
}
@ -301,7 +301,7 @@ index 9ba5906..dbbc826 100644
data.addr = mem;
}
else if (conversion)
@@ -4375,14 +4362,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4374,14 +4361,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
if (texture->swapchain && texture->swapchain->palette)
palette = texture->swapchain->palette;
@ -333,7 +333,7 @@ index 6b2e266..de433f6 100644
FIXME("Ignoring row/slice pitch (%u/%u).\n", data->row_pitch, data->slice_pitch);
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index 0d13dd0..472427b 100644
index 91325dc..4fbb6b0 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -40,30 +40,6 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume)
@ -367,8 +367,8 @@ index 0d13dd0..472427b 100644
/* Context activation is done by the caller. */
void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wined3d_context *context,
const struct wined3d_const_bo_address *data)
@@ -95,7 +71,7 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine
dst_row_pitch = (dst_row_pitch + alignment - 1) & ~(alignment - 1);
@@ -93,7 +69,7 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine
dst_row_pitch = width * format->conv_byte_count;
dst_slice_pitch = dst_row_pitch * height;
- wined3d_volume_get_pitch(volume, &src_row_pitch, &src_slice_pitch);
@ -376,7 +376,7 @@ index 0d13dd0..472427b 100644
converted_mem = HeapAlloc(GetProcessHeap(), 0, dst_slice_pitch * depth);
format->convert(data->addr, converted_mem, src_row_pitch, src_slice_pitch,
@@ -638,7 +614,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
@@ -636,7 +612,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
}
else
{

View File

@ -488,7 +488,7 @@ diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -99,6 +99,22 @@
@@ -97,6 +97,22 @@
HeapFree(GetProcessHeap(), 0, converted_mem);
}
@ -511,7 +511,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
/* Context activation is done by the caller. */
static void wined3d_volume_download_data(struct wined3d_volume *volume,
const struct wined3d_context *context, const struct wined3d_bo_address *data)
@@ -134,8 +150,33 @@
@@ -132,8 +148,33 @@
static void wined3d_volume_evict_sysmem(struct wined3d_volume *volume)
{
wined3d_resource_free_sysmem(&volume->resource);
@ -545,7 +545,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
}
/* Context activation is done by the caller. */
@@ -177,6 +218,7 @@
@@ -175,6 +216,7 @@
return TRUE;
}
@ -553,7 +553,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
/* Context activation is done by the caller. */
static void wined3d_volume_load_location(struct wined3d_resource *resource,
@@ -187,6 +229,22 @@
@@ -185,6 +227,22 @@
TRACE("Volume %p, loading %s, have %s.\n", volume, wined3d_debug_location(location),
wined3d_debug_location(volume->resource.locations));
@ -576,7 +576,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
if ((volume->resource.access_flags & required_access) != required_access)
{
@@ -205,6 +263,7 @@
@@ -203,6 +261,7 @@
&& !(volume->container->flags & WINED3D_TEXTURE_SRGB_ALLOCATED)))
ERR("Trying to load (s)RGB texture without prior allocation.\n");
@ -584,7 +584,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
if (volume->resource.locations & WINED3D_LOCATION_DISCARDED)
{
TRACE("Volume previously discarded, nothing to do.\n");
@@ -234,6 +293,37 @@
@@ -232,6 +291,37 @@
return;
}
wined3d_resource_validate_location(&volume->resource, location);
@ -622,7 +622,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
if (wined3d_volume_can_evict(volume))
wined3d_volume_evict_sysmem(volume);
@@ -244,11 +334,24 @@
@@ -242,11 +332,24 @@
if (!volume->resource.heap_memory)
ERR("Trying to load WINED3D_LOCATION_SYSMEM without setting it up first.\n");
@ -647,7 +647,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
wined3d_texture_bind_and_dirtify(volume->container, context, FALSE);
else
wined3d_texture_bind_and_dirtify(volume->container, context, TRUE);
@@ -259,6 +362,7 @@
@@ -257,6 +360,7 @@
else
{
FIXME("Implement WINED3D_LOCATION_SYSMEM loading from %s.\n",
@ -655,7 +655,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
wined3d_debug_location(volume->resource.locations));
return;
}
@@ -274,6 +378,28 @@
@@ -272,6 +376,28 @@
struct wined3d_bo_address data = {volume->resource.buffer->name, NULL};
if (volume->resource.locations & WINED3D_LOCATION_TEXTURE_RGB)
@ -684,7 +684,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
wined3d_texture_bind_and_dirtify(volume->container, context, FALSE);
else
wined3d_texture_bind_and_dirtify(volume->container, context, TRUE);
@@ -283,6 +409,7 @@
@@ -281,6 +407,7 @@
else
{
FIXME("Implement WINED3D_LOCATION_BUFFER loading from %s.\n",
@ -692,7 +692,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
wined3d_debug_location(volume->resource.locations));
return;
}
@@ -292,6 +419,17 @@
@@ -290,6 +417,17 @@
default:
FIXME("Implement %s loading from %s.\n", wined3d_debug_location(location),
wined3d_debug_location(volume->resource.locations));
@ -710,7 +710,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
}
}
@@ -299,6 +437,7 @@
@@ -297,6 +435,7 @@
void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *context, BOOL srgb_mode)
{
wined3d_texture_prepare_texture(volume->container, context, srgb_mode);
@ -718,7 +718,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
wined3d_resource_load_location(&volume->resource, context,
srgb_mode ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB);
}
@@ -311,6 +450,51 @@
@@ -309,6 +448,51 @@
resource_cleanup(&volume->resource);
volume->resource.parent_ops->wined3d_object_destroyed(volume->resource.parent);
wined3d_cs_emit_volume_cleanup(device->cs, volume);
@ -770,7 +770,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
}
static void volume_unload(struct wined3d_resource *resource)
@@ -324,6 +508,7 @@
@@ -322,6 +506,7 @@
TRACE("texture %p.\n", resource);
@ -778,7 +778,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
if (wined3d_resource_prepare_system_memory(&volume->resource))
{
context = context_acquire(device, NULL);
@@ -336,6 +521,29 @@
@@ -334,6 +519,29 @@
ERR("Out of memory when unloading volume %p.\n", volume);
wined3d_resource_validate_location(&volume->resource, WINED3D_LOCATION_DISCARDED);
wined3d_resource_invalidate_location(&volume->resource, ~WINED3D_LOCATION_DISCARDED);
@ -808,7 +808,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
}
/* The texture name is managed by the container. */
@@ -351,11 +559,13 @@
@@ -349,11 +557,13 @@
return wined3d_texture_incref(volume->container);
}
@ -822,7 +822,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
ULONG CDECL wined3d_volume_decref(struct wined3d_volume *volume)
{
TRACE("Forwarding to container %p.\n", volume->container);
@@ -382,6 +592,36 @@
@@ -380,6 +590,36 @@
return &volume->resource;
}
@ -859,7 +859,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *volume,
const struct wined3d_box *box)
{
@@ -407,6 +647,7 @@
@@ -405,6 +645,7 @@
HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
{
@ -867,7 +867,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
HRESULT hr;
const struct wined3d_format *format = volume->resource.format;
@@ -434,6 +675,147 @@
@@ -432,6 +673,147 @@
return hr;
return hr;
@ -1015,7 +1015,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
}
struct wined3d_volume * CDECL wined3d_volume_from_resource(struct wined3d_resource *resource)
@@ -443,6 +825,7 @@
@@ -441,6 +823,7 @@
HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume)
{
@ -1023,7 +1023,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
HRESULT hr;
if (volume->resource.unmap_dirtify)
@@ -452,6 +835,33 @@
@@ -450,6 +833,33 @@
if (hr == WINEDDERR_NOTLOCKED)
return WINED3DERR_INVALIDCALL;
return hr;
@ -1057,7 +1057,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
}
static ULONG volume_resource_incref(struct wined3d_resource *resource)
@@ -464,6 +874,7 @@
@@ -462,6 +872,7 @@
return wined3d_volume_decref(volume_from_resource(resource));
}
@ -1065,7 +1065,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
static void wined3d_volume_location_invalidated(struct wined3d_resource *resource, DWORD location)
{
struct wined3d_volume *volume = volume_from_resource(resource);
@@ -479,6 +890,13 @@
@@ -477,6 +888,13 @@
volume_unload,
wined3d_volume_location_invalidated,
wined3d_volume_load_location,
@ -1079,7 +1079,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
};
static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_texture *container,
@@ -515,7 +933,11 @@
@@ -513,7 +931,11 @@
}
volume->texture_level = level;
@ -1091,7 +1091,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
if (desc->pool == WINED3D_POOL_DEFAULT && desc->usage & WINED3DUSAGE_DYNAMIC
&& gl_info->supported[ARB_PIXEL_BUFFER_OBJECT]
@@ -523,7 +945,9 @@
@@ -521,7 +943,9 @@
{
wined3d_resource_free_sysmem(&volume->resource);
volume->resource.map_binding = WINED3D_LOCATION_BUFFER;
@ -1678,7 +1678,7 @@ diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -16489,7 +16489,11 @@
@@ -16488,7 +16488,11 @@
fill_surface(surface_managed, 0x0000ff00, D3DLOCK_NO_DIRTY_UPDATE);
add_dirty_rect_test_draw(device);
color = getPixelColor(device, 320, 240);
@ -8092,7 +8092,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (format.convert)
{
/* This code is entered for texture formats which need a fixup. */
@@ -4082,6 +5189,7 @@
@@ -4081,6 +5188,7 @@
wined3d_surface_upload_data(surface, gl_info, &format, &src_rect,
src_row_pitch, &dst_point, srgb, wined3d_const_bo_address(&data));
@ -8100,7 +8100,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
HeapFree(GetProcessHeap(), 0, mem);
return WINED3D_OK;
@@ -4105,6 +5213,31 @@
@@ -4104,6 +5212,31 @@
struct wined3d_context *context, DWORD location)
{
struct wined3d_surface *surface = surface_from_resource(resource);
@ -8132,7 +8132,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
HRESULT hr;
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
@@ -4112,6 +5245,7 @@
@@ -4111,6 +5244,7 @@
if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
{
if (location == WINED3D_LOCATION_TEXTURE_RGB
@ -8140,7 +8140,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
&& surface->resource.locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_DISCARDED))
{
surface_load_ds_location(surface, context, location);
@@ -4131,11 +5265,53 @@
@@ -4130,11 +5264,53 @@
}
}
@ -8196,7 +8196,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
switch (location)
@@ -4144,6 +5320,7 @@
@@ -4143,6 +5319,7 @@
case WINED3D_LOCATION_USER_MEMORY:
case WINED3D_LOCATION_SYSMEM:
case WINED3D_LOCATION_BUFFER:
@ -8204,7 +8204,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
surface_load_sysmem(surface, context, location);
break;
@@ -4161,6 +5338,24 @@
@@ -4160,6 +5337,24 @@
if (FAILED(hr = surface_load_texture(surface, context,
location == WINED3D_LOCATION_TEXTURE_SRGB)))
return;
@ -8229,7 +8229,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
break;
default:
@@ -4168,12 +5363,21 @@
@@ -4167,12 +5362,21 @@
break;
}
@ -8251,7 +8251,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
static HRESULT ffp_blit_alloc(struct wined3d_device *device) { return WINED3D_OK; }
@@ -4267,6 +5471,7 @@
@@ -4266,6 +5470,7 @@
const RECT *dst_rect, const struct wined3d_color *color)
{
const RECT draw_rect = {0, 0, dst_surface->resource.width, dst_surface->resource.height};
@ -8259,7 +8259,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
struct wined3d_rendertarget_view view, *view_ptr = &view;
struct wined3d_fb_state fb = {&view_ptr, NULL, 1};
struct wined3d_texture *texture = dst_surface->container;
@@ -4287,6 +5492,21 @@
@@ -4286,6 +5491,21 @@
view.sub_resource_idx = dst_surface->texture_layer * texture->level_count + dst_surface->texture_level;
device_clear_render_targets(device, 1, &fb, 1, dst_rect, &draw_rect, WINED3DCLEAR_TARGET, color, 0.0f, 0);
@ -8281,7 +8281,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return WINED3D_OK;
}
@@ -4295,6 +5515,7 @@
@@ -4294,6 +5514,7 @@
const RECT *dst_rect, float depth)
{
const RECT draw_rect = {0, 0, dst_surface->resource.width, dst_surface->resource.height};
@ -8289,7 +8289,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
struct wined3d_rendertarget_view view;
struct wined3d_fb_state fb = {NULL, &view};
struct wined3d_texture *texture = dst_surface->container;
@@ -4310,6 +5531,20 @@
@@ -4309,6 +5530,20 @@
view.sub_resource_idx = dst_surface->texture_layer * texture->level_count + dst_surface->texture_level;
device_clear_render_targets(device, 0, &fb, 1, dst_rect, &draw_rect, WINED3DCLEAR_ZBUFFER, 0, depth, 0);
@ -8310,7 +8310,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return WINED3D_OK;
}
@@ -4467,6 +5702,7 @@
@@ -4466,6 +5701,7 @@
int bpp, srcheight, srcwidth, dstheight, dstwidth, width;
const struct wined3d_format *src_format, *dst_format;
struct wined3d_texture *src_texture = NULL;
@ -8318,7 +8318,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
void *src_data = NULL, *dst_data = NULL;
UINT src_row_pitch, src_slice_pitch, dst_row_pitch, dst_slice_pitch;
const BYTE *sbase = NULL;
@@ -4497,6 +5733,23 @@
@@ -4496,6 +5732,23 @@
wined3d_resource_get_pitch(&dst_surface->resource, &dst_row_pitch, &dst_slice_pitch);
src_data = dst_data;
src_row_pitch = dst_row_pitch;
@ -8342,7 +8342,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
src_format = dst_surface->resource.format;
dst_format = src_format;
}
@@ -4505,12 +5758,14 @@
@@ -4504,12 +5757,14 @@
dst_format = dst_surface->resource.format;
if (src_surface)
{
@ -8357,7 +8357,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (dst_surface->resource.format->id != src_surface->resource.format->id)
{
if (!(src_texture = surface_convert_format(src_surface, dst_format->id)))
@@ -4521,9 +5776,13 @@
@@ -4520,9 +5775,13 @@
}
src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, 0));
}
@ -8371,7 +8371,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
src_format = src_surface->resource.format;
}
else
@@ -4531,8 +5790,12 @@
@@ -4530,8 +5789,12 @@
src_format = dst_format;
}
@ -8384,7 +8384,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
bpp = dst_surface->resource.format->byte_count;
@@ -4543,12 +5806,24 @@
@@ -4542,12 +5805,24 @@
width = (dst_rect->right - dst_rect->left) * bpp;
if (src_surface)
@ -8409,7 +8409,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (src_format->flags & dst_format->flags & WINED3DFMT_FLAG_BLOCKS)
{
@@ -4583,7 +5858,11 @@
@@ -4582,7 +5857,11 @@
}
hr = surface_cpu_blt_compressed(sbase, dbuf,
@ -8421,7 +8421,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
src_format, flags, fx);
goto release;
}
@@ -4591,7 +5870,11 @@
@@ -4590,7 +5869,11 @@
/* First, all the 'source-less' blits */
if (flags & WINEDDBLT_COLORFILL)
{
@ -8433,7 +8433,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
flags &= ~WINEDDBLT_COLORFILL;
}
@@ -4605,12 +5888,21 @@
@@ -4604,12 +5887,21 @@
switch (fx->dwROP)
{
case BLACKNESS:
@ -8455,7 +8455,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
break;
case SRCCOPY: /* Well, we do that below? */
break;
@@ -4661,6 +5953,7 @@
@@ -4660,6 +5952,7 @@
for (y = 0; y < dstheight; ++y)
{
memcpy(dbuf, sbuf, width);
@ -8463,7 +8463,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
sbuf += src_row_pitch;
dbuf += dst_row_pitch;
}
@@ -4674,6 +5967,21 @@
@@ -4673,6 +5966,21 @@
{
sbuf -= src_row_pitch;
dbuf -= dst_row_pitch;
@ -8485,7 +8485,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
memcpy(dbuf, sbuf, width);
}
}
@@ -4683,8 +5991,13 @@
@@ -4682,8 +5990,13 @@
for (y = 0; y < dstheight; ++y)
{
memmove(dbuf, sbuf, width);
@ -8499,7 +8499,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
}
@@ -4693,9 +6006,15 @@
@@ -4692,9 +6005,15 @@
/* Stretching in y direction only. */
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
{
@ -8515,7 +8515,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
}
@@ -4705,6 +6024,7 @@
@@ -4704,6 +6023,7 @@
int last_sy = -1;
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
{
@ -8523,7 +8523,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
sbuf = sbase + (sy >> 16) * src_row_pitch;
if ((sy >> 16) == (last_sy >> 16))
@@ -4712,6 +6032,15 @@
@@ -4711,6 +6031,15 @@
/* This source row is the same as last source row -
* Copy the already stretched row. */
memcpy(dbuf, dbuf - dst_row_pitch, width);
@ -8539,7 +8539,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
else
{
@@ -4758,6 +6087,7 @@
@@ -4757,6 +6086,7 @@
}
#undef STRETCH_ROW
}
@ -8547,7 +8547,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
dbuf += dst_row_pitch;
last_sy = sy;
}
@@ -4766,6 +6096,16 @@
@@ -4765,6 +6095,16 @@
else
{
LONG dstyinc = dst_row_pitch, dstxinc = bpp;
@ -8564,7 +8564,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
DWORD keylow = 0xffffffff, keyhigh = 0, keymask = 0xffffffff;
DWORD destkeylow = 0x0, destkeyhigh = 0xffffffff, destkeymask = 0xffffffff;
if (flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYDEST | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_KEYDESTOVERRIDE))
@@ -4815,7 +6155,11 @@
@@ -4814,7 +6154,11 @@
LONG tmpxy;
dTopLeft = dbuf;
dTopRight = dbuf + ((dstwidth - 1) * bpp);
@ -8576,7 +8576,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
dBottomRight = dBottomLeft + ((dstwidth - 1) * bpp);
if (fx->dwDDFX & WINEDDBLTFX_ARITHSTRETCHY)
@@ -4892,6 +6236,7 @@
@@ -4891,6 +6235,7 @@
flags &= ~(WINEDDBLT_DDFX);
}
@ -8584,7 +8584,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
#define COPY_COLORKEY_FX(type) \
do { \
const type *s; \
@@ -4913,6 +6258,29 @@
@@ -4912,6 +6257,29 @@
d = (type *)(((BYTE *)d) + dstyinc); \
} \
} while(0)
@ -8614,7 +8614,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
switch (bpp)
{
@@ -4931,7 +6299,11 @@
@@ -4930,7 +6298,11 @@
BYTE *d = dbuf, *dx;
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
{
@ -8626,7 +8626,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
dx = d;
for (x = sx = 0; x < dstwidth; ++x, sx+= xinc)
{
@@ -4962,10 +6334,12 @@
@@ -4961,10 +6333,12 @@
}
}
@ -8639,7 +8639,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
error:
if (flags && FIXME_ON(d3d_surface))
{
@@ -4973,6 +6347,7 @@
@@ -4972,6 +6346,7 @@
}
release:
@ -8647,7 +8647,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (dst_data)
{
wined3d_resource_release_map_ptr(&dst_surface->resource, context);
@@ -4991,6 +6366,14 @@
@@ -4990,6 +6365,14 @@
wined3d_texture_decref(src_texture);
if (context)
context_release(context);
@ -8662,7 +8662,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return hr;
}
@@ -5025,6 +6408,7 @@
@@ -5024,6 +6407,7 @@
cpu_blit_depth_fill,
};
@ -8670,7 +8670,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect,
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter)
@@ -5032,6 +6416,16 @@
@@ -5031,6 +6415,16 @@
struct wined3d_swapchain *src_swapchain, *dst_swapchain;
struct wined3d_device *device = dst_surface->resource.device;
DWORD src_ds_flags, dst_ds_flags;
@ -8687,7 +8687,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
BOOL scale, convert;
static const DWORD simple_blit = WINEDDBLT_ASYNC
@@ -5040,6 +6434,106 @@
@@ -5039,6 +6433,106 @@
| WINEDDBLT_DEPTHFILL
| WINEDDBLT_DONOTWAIT;
@ -8794,7 +8794,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (!device->d3d_initialized)
{
WARN("D3D not initialized, using fallback.\n");
@@ -5082,8 +6576,13 @@
@@ -5081,8 +6575,13 @@
}
scale = src_surface
@ -8808,7 +8808,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
convert = src_surface && src_surface->resource.format->id != dst_surface->resource.format->id;
dst_ds_flags = dst_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL);
@@ -5101,6 +6600,7 @@
@@ -5100,6 +6599,7 @@
TRACE("Depth fill.\n");
if (!surface_convert_depth_to_float(dst_surface, fx->u5.dwFillDepth, &depth))
@ -8816,7 +8816,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return;
if (SUCCEEDED(wined3d_surface_depth_fill(dst_surface, dst_rect, depth)))
@@ -5119,6 +6619,32 @@
@@ -5118,6 +6618,32 @@
* implement those in the CPU blitter at the moment. */
if ((dst_surface->resource.locations & dst_surface->resource.map_binding)
&& (!src_surface || (src_surface->resource.locations & src_surface->resource.map_binding)))
@ -8849,7 +8849,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
if (scale)
TRACE("Not doing sysmem blit because of scaling.\n");
@@ -5137,6 +6663,7 @@
@@ -5136,6 +6662,7 @@
if (!surface_convert_color_to_float(dst_surface, fx->u5.dwFillColor, &color))
goto fallback;
@ -8857,7 +8857,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
if (SUCCEEDED(surface_color_fill(dst_surface, dst_rect, &color)))
return;
}
@@ -5147,6 +6674,18 @@
@@ -5146,6 +6673,18 @@
/* Upload */
if ((src_surface->resource.locations & WINED3D_LOCATION_SYSMEM)
&& !(dst_surface->resource.locations & WINED3D_LOCATION_SYSMEM))
@ -8876,7 +8876,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
{
if (scale)
TRACE("Not doing upload because of scaling.\n");
@@ -5154,6 +6693,7 @@
@@ -5153,6 +6692,7 @@
TRACE("Not doing upload because of format conversion.\n");
else
{
@ -8884,7 +8884,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
POINT dst_point = {dst_rect->left, dst_rect->top};
if (SUCCEEDED(surface_upload_from_surface(dst_surface, &dst_point, src_surface, src_rect)))
@@ -5166,6 +6706,15 @@
@@ -5165,6 +6705,15 @@
context_release(context);
}
return;
@ -8900,7 +8900,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
}
}
@@ -5190,6 +6739,7 @@
@@ -5189,6 +6738,7 @@
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0);
dst_swapchain->desc.swap_effect = swap_effect;
@ -8908,7 +8908,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return;
}
@@ -5386,6 +6936,50 @@
@@ -5385,6 +6935,50 @@
wined3d_surface_location_invalidated,
wined3d_surface_load_location,
};
@ -8959,7 +8959,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_texture *container,
const struct wined3d_resource_desc *desc, GLenum target, unsigned int level, unsigned int layer, DWORD flags)
@@ -5453,7 +7047,11 @@
@@ -5452,7 +7046,11 @@
}
surface->container = container;
@ -8971,7 +8971,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
list_init(&surface->renderbuffers);
list_init(&surface->overlays);
@@ -5485,9 +7083,14 @@
@@ -5484,9 +7082,14 @@
if (surface->resource.map_binding == WINED3D_LOCATION_DIB)
{
wined3d_resource_free_sysmem(&surface->resource);
@ -8986,7 +8986,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
}
return hr;
@@ -5514,7 +7117,11 @@
@@ -5513,7 +7116,11 @@
if (FAILED(hr = surface_init(object, container, desc, target, level, layer, flags)))
{
WARN("Failed to initialize surface, returning %#x.\n", hr);