mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Rebase against efb1cf0299c23385f934fa9b3abc920bfca46611.
This commit is contained in:
parent
357269a486
commit
929a331358
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "e19a8fd706768aa2bcbeeec2f22ca991c4821ad3"
|
||||
echo "efb1cf0299c23385f934fa9b3abc920bfca46611"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
|
@ -1,4 +1,4 @@
|
||||
From baa69b6a987dfdefff4b205f1dabe6e485226256 Mon Sep 17 00:00:00 2001
|
||||
From e092a5748fac188f5b214467cdb33b4df9a7163c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Wed, 2 Oct 2013 22:54:57 +0200
|
||||
Subject: wined3d: Clean up volume resource data through the CS.
|
||||
@ -10,10 +10,10 @@ Subject: wined3d: Clean up volume resource data through the CS.
|
||||
3 files changed, 36 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 40cd85d..9cba57b 100644
|
||||
index 54b6d1a..18b556d 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -84,6 +84,7 @@ enum wined3d_cs_op
|
||||
@@ -85,6 +85,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_CREATE_VBO,
|
||||
WINED3D_CS_OP_RESOURCE_CLEANUP,
|
||||
WINED3D_CS_OP_BUFFER_CLEANUP,
|
||||
@ -21,7 +21,7 @@ index 40cd85d..9cba57b 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -491,6 +492,12 @@ struct wined3d_cs_buffer_cleanup
|
||||
@@ -501,6 +502,12 @@ struct wined3d_cs_buffer_cleanup
|
||||
struct wined3d_buffer *buffer;
|
||||
};
|
||||
|
||||
@ -34,7 +34,7 @@ index 40cd85d..9cba57b 100644
|
||||
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
|
||||
{
|
||||
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
|
||||
@@ -2392,6 +2399,26 @@ void wined3d_cs_emit_buffer_cleanup(struct wined3d_cs *cs, struct wined3d_buffer
|
||||
@@ -2506,6 +2513,26 @@ void wined3d_cs_emit_buffer_cleanup(struct wined3d_cs *cs, struct wined3d_buffer
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ index 40cd85d..9cba57b 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2454,6 +2481,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2569,6 +2596,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_CREATE_VBO */ wined3d_cs_exec_create_vbo,
|
||||
/* WINED3D_CS_OP_RESOURCE_CLEANUP */ wined3d_cs_exec_resource_cleanup,
|
||||
/* WINED3D_CS_OP_BUFFER_CLEANUP */ wined3d_cs_exec_buffer_cleanup,
|
||||
@ -70,10 +70,10 @@ index 40cd85d..9cba57b 100644
|
||||
|
||||
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index a223f43..fb7ec1a 100644
|
||||
index 7913a13..36dd640 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -296,10 +296,8 @@ void wined3d_volume_destroy(struct wined3d_volume *volume)
|
||||
@@ -313,10 +313,8 @@ void wined3d_volume_destroy(struct wined3d_volume *volume)
|
||||
TRACE("volume %p.\n", volume);
|
||||
|
||||
resource_cleanup(&volume->resource);
|
||||
@ -85,7 +85,7 @@ index a223f43..fb7ec1a 100644
|
||||
}
|
||||
|
||||
static void volume_unload(struct wined3d_resource *resource)
|
||||
@@ -340,6 +338,11 @@ ULONG CDECL wined3d_volume_incref(struct wined3d_volume *volume)
|
||||
@@ -357,6 +355,11 @@ static ULONG CDECL wined3d_volume_incref(struct wined3d_volume *volume)
|
||||
return wined3d_texture_incref(volume->container);
|
||||
}
|
||||
|
||||
@ -94,14 +94,14 @@ index a223f43..fb7ec1a 100644
|
||||
+ HeapFree(GetProcessHeap(), 0, volume);
|
||||
+}
|
||||
+
|
||||
ULONG CDECL wined3d_volume_decref(struct wined3d_volume *volume)
|
||||
static ULONG CDECL wined3d_volume_decref(struct wined3d_volume *volume)
|
||||
{
|
||||
TRACE("Forwarding to container %p.\n", volume->container);
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index ffcdcb4..8537000 100644
|
||||
index 0933ae6..088bf72 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2358,6 +2358,7 @@ void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *
|
||||
@@ -2423,6 +2423,7 @@ void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *
|
||||
BOOL srgb_mode) DECLSPEC_HIDDEN;
|
||||
void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wined3d_context *context,
|
||||
const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
|
||||
@ -109,7 +109,7 @@ index ffcdcb4..8537000 100644
|
||||
|
||||
struct wined3d_surface_dib
|
||||
{
|
||||
@@ -2728,6 +2729,7 @@ void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *bu
|
||||
@@ -2797,6 +2798,7 @@ void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *bu
|
||||
void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs,
|
||||
struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_buffer_cleanup(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
|
||||
@ -118,5 +118,5 @@ index ffcdcb4..8537000 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.5.1
|
||||
|
||||
|
@ -828,10 +828,10 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
}
|
||||
|
||||
+#endif /* STAGING_CSMT */
|
||||
ULONG CDECL wined3d_volume_decref(struct wined3d_volume *volume)
|
||||
static ULONG CDECL wined3d_volume_decref(struct wined3d_volume *volume)
|
||||
{
|
||||
TRACE("Forwarding to container %p.\n", volume->container);
|
||||
@@ -386,6 +630,36 @@
|
||||
@@ -374,6 +618,36 @@
|
||||
return &volume->resource;
|
||||
}
|
||||
|
||||
@ -868,7 +868,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)
|
||||
{
|
||||
@@ -411,6 +685,7 @@
|
||||
@@ -399,6 +673,7 @@
|
||||
HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
|
||||
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
|
||||
{
|
||||
@ -876,7 +876,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
HRESULT hr;
|
||||
const struct wined3d_format *format = volume->resource.format;
|
||||
const unsigned int fmt_flags = volume->container->resource.format_flags;
|
||||
@@ -438,6 +713,148 @@
|
||||
@@ -426,6 +701,148 @@
|
||||
return hr;
|
||||
|
||||
return hr;
|
||||
@ -1025,7 +1025,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)
|
||||
@@ -447,6 +864,7 @@
|
||||
@@ -435,6 +852,7 @@
|
||||
|
||||
HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume)
|
||||
{
|
||||
@ -1033,7 +1033,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
HRESULT hr;
|
||||
|
||||
if (volume->resource.unmap_dirtify)
|
||||
@@ -456,6 +874,33 @@
|
||||
@@ -444,6 +862,33 @@
|
||||
if (hr == WINEDDERR_NOTLOCKED)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
return hr;
|
||||
@ -1067,7 +1067,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
}
|
||||
|
||||
static ULONG volume_resource_incref(struct wined3d_resource *resource)
|
||||
@@ -468,6 +913,7 @@
|
||||
@@ -456,6 +901,7 @@
|
||||
return wined3d_volume_decref(volume_from_resource(resource));
|
||||
}
|
||||
|
||||
@ -1075,7 +1075,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);
|
||||
@@ -483,6 +929,13 @@
|
||||
@@ -471,6 +917,13 @@
|
||||
volume_unload,
|
||||
wined3d_volume_location_invalidated,
|
||||
wined3d_volume_load_location,
|
||||
@ -1089,7 +1089,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,
|
||||
@@ -514,7 +967,11 @@
|
||||
@@ -502,7 +955,11 @@
|
||||
}
|
||||
|
||||
volume->texture_level = level;
|
||||
@ -1101,7 +1101,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]
|
||||
@@ -522,7 +979,9 @@
|
||||
@@ -510,7 +967,9 @@
|
||||
{
|
||||
wined3d_resource_free_sysmem(&volume->resource);
|
||||
volume->resource.map_binding = WINED3D_LOCATION_BUFFER;
|
||||
@ -7310,7 +7310,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
void * CDECL wined3d_surface_get_parent(const struct wined3d_surface *surface)
|
||||
@@ -1782,10 +2234,28 @@
|
||||
@@ -1750,10 +2202,28 @@
|
||||
|
||||
DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface)
|
||||
{
|
||||
@ -7339,7 +7339,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y)
|
||||
@@ -1910,6 +2380,7 @@
|
||||
@@ -1878,6 +2348,7 @@
|
||||
{
|
||||
DeleteDC(surface->hDC);
|
||||
DeleteObject(surface->dib.DIBsection);
|
||||
@ -7347,7 +7347,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
surface->resource.bitmap_data = NULL;
|
||||
surface->flags &= ~SFLAG_DIBSECTION;
|
||||
create_dib = TRUE;
|
||||
@@ -1918,6 +2389,15 @@
|
||||
@@ -1886,6 +2357,15 @@
|
||||
surface->resource.locations = 0;
|
||||
wined3d_resource_free_sysmem(&surface->resource);
|
||||
surface->resource.map_heap_memory = NULL;
|
||||
@ -7363,7 +7363,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
|
||||
width = texture_resource->width;
|
||||
height = texture_resource->height;
|
||||
@@ -1943,6 +2423,7 @@
|
||||
@@ -1911,6 +2391,7 @@
|
||||
else
|
||||
surface->flags &= ~SFLAG_NONPOW2;
|
||||
|
||||
@ -7371,7 +7371,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
if ((surface->resource.user_memory = mem))
|
||||
{
|
||||
surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY;
|
||||
@@ -1963,6 +2444,27 @@
|
||||
@@ -1931,6 +2412,27 @@
|
||||
surface->resource.size = wined3d_format_calculate_size(texture_resource->format,
|
||||
1, width, height, 1);
|
||||
surface->resource.custom_row_pitch = wined3d_format_calculate_pitch(texture_resource->format, width);
|
||||
@ -7399,7 +7399,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
/* The format might be changed to a format that needs conversion.
|
||||
@@ -1985,11 +2487,19 @@
|
||||
@@ -1953,11 +2455,19 @@
|
||||
|
||||
if (!valid_location)
|
||||
{
|
||||
@ -7419,7 +7419,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -2348,6 +2858,7 @@
|
||||
@@ -2316,6 +2826,7 @@
|
||||
|
||||
static struct wined3d_texture *surface_convert_format(struct wined3d_surface *source, enum wined3d_format_id to_fmt)
|
||||
{
|
||||
@ -7427,7 +7427,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
void *dst_data = NULL, *src_data = NULL;
|
||||
UINT src_row_pitch, src_slice_pitch, dst_row_pitch, dst_slice_pitch;
|
||||
const struct d3dfmt_converter_desc *conv;
|
||||
@@ -2356,6 +2867,13 @@
|
||||
@@ -2324,6 +2835,13 @@
|
||||
struct wined3d_surface *dst;
|
||||
struct wined3d_context *context = NULL;
|
||||
struct wined3d_device *device = source->resource.device;
|
||||
@ -7441,7 +7441,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
|
||||
conv = find_converter(source->resource.format->id, to_fmt);
|
||||
if (!conv)
|
||||
@@ -2379,6 +2897,7 @@
|
||||
@@ -2347,6 +2865,7 @@
|
||||
}
|
||||
dst = surface_from_resource(wined3d_texture_get_sub_resource(ret, 0));
|
||||
|
||||
@ -7449,7 +7449,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
wined3d_resource_get_pitch(&source->resource, &src_row_pitch, &src_slice_pitch);
|
||||
wined3d_resource_get_pitch(&ret->resource, &dst_row_pitch, &dst_slice_pitch);
|
||||
|
||||
@@ -2419,6 +2938,32 @@
|
||||
@@ -2387,6 +2906,32 @@
|
||||
if (context)
|
||||
context_release(context);
|
||||
return NULL;
|
||||
@ -7482,7 +7482,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
static HRESULT _Blt_ColorFill(BYTE *buf, unsigned int width, unsigned int height,
|
||||
@@ -2486,6 +3031,7 @@
|
||||
@@ -2454,6 +2999,7 @@
|
||||
|
||||
HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
|
||||
{
|
||||
@ -7490,7 +7490,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
HRESULT hr;
|
||||
TRACE("surface %p.\n", surface);
|
||||
|
||||
@@ -2504,17 +3050,58 @@
|
||||
@@ -2472,17 +3018,58 @@
|
||||
struct wined3d_box box;
|
||||
const struct wined3d_format *format = surface->resource.format;
|
||||
unsigned int fmt_flags = surface->container->resource.format_flags;
|
||||
@ -7554,7 +7554,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
/* Performance optimization: Count how often a surface is mapped, if it is
|
||||
* mapped regularly do not throw away the system memory copy. This avoids
|
||||
* the need to download the surface from OpenGL all the time. The surface
|
||||
@@ -2530,6 +3117,7 @@
|
||||
@@ -2498,6 +3085,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -7562,7 +7562,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
if (rect)
|
||||
{
|
||||
surface->lockedRect = *rect;
|
||||
@@ -2635,6 +3223,140 @@
|
||||
@@ -2603,6 +3191,140 @@
|
||||
if (context)
|
||||
context_release(context);
|
||||
}
|
||||
@ -7703,7 +7703,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
|
||||
@@ -2654,6 +3376,7 @@
|
||||
@@ -2622,6 +3344,7 @@
|
||||
surface->resource.map_count--;
|
||||
surface->flags &= ~SFLAG_DCINUSE;
|
||||
|
||||
@ -7711,7 +7711,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
wined3d_cs_emit_releasedc(surface->resource.device->cs, surface);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2690,6 +3413,40 @@
|
||||
@@ -2658,6 +3381,40 @@
|
||||
context = context_acquire(device, surface);
|
||||
}
|
||||
|
||||
@ -7752,7 +7752,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
context_apply_blit_state(context, device);
|
||||
gl_info = context->gl_info;
|
||||
|
||||
@@ -2722,8 +3479,13 @@
|
||||
@@ -2690,8 +3447,13 @@
|
||||
}
|
||||
|
||||
/* Setup pixel store pack state -- to glReadPixels into the correct place */
|
||||
@ -7766,7 +7766,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
checkGLcall("glPixelStorei");
|
||||
|
||||
gl_info->gl_ops.gl.p_glReadPixels(0, 0,
|
||||
@@ -2740,6 +3502,10 @@
|
||||
@@ -2708,6 +3470,10 @@
|
||||
{
|
||||
/* glReadPixels returns the image upside down, and there is no way to prevent this.
|
||||
* Flip the lines in software. */
|
||||
@ -7777,7 +7777,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
if (!(row = HeapAlloc(GetProcessHeap(), 0, pitch)))
|
||||
goto error;
|
||||
|
||||
@@ -2774,12 +3540,16 @@
|
||||
@@ -2742,12 +3508,16 @@
|
||||
checkGLcall("glBindBuffer");
|
||||
}
|
||||
|
||||
@ -7794,7 +7794,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
/* Read the framebuffer contents into a texture. Note that this function
|
||||
@@ -2960,8 +3730,13 @@
|
||||
@@ -2928,8 +3698,13 @@
|
||||
|
||||
/* The texture is now most up to date - If the surface is a render target
|
||||
* and has a drawable, this path is never entered. */
|
||||
@ -7808,7 +7808,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
/* Uses the hardware to stretch and flip the image */
|
||||
@@ -3029,7 +3804,11 @@
|
||||
@@ -2997,7 +3772,11 @@
|
||||
checkGLcall("glEnable(texture_target)");
|
||||
|
||||
/* For now invalidate the texture copy of the back buffer. Drawable and sysmem copy are untouched */
|
||||
@ -7820,7 +7820,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
|
||||
@@ -3226,6 +4005,7 @@
|
||||
@@ -3194,6 +3973,7 @@
|
||||
checkGLcall("glDeleteTextures(1, &backup)");
|
||||
}
|
||||
|
||||
@ -7828,7 +7828,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
if (wined3d_settings.cs_multithreaded)
|
||||
gl_info->gl_ops.gl.p_glFinish();
|
||||
else if (wined3d_settings.strict_draw_ordering)
|
||||
@@ -3237,6 +4017,17 @@
|
||||
@@ -3205,6 +3985,17 @@
|
||||
* and has a drawable, this path is never entered. */
|
||||
wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
wined3d_resource_invalidate_location(&dst_surface->resource, ~WINED3D_LOCATION_TEXTURE_RGB);
|
||||
@ -7846,7 +7846,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
/* Front buffer coordinates are always full screen coordinates, but our GL
|
||||
@@ -3267,6 +4058,7 @@
|
||||
@@ -3235,6 +4026,7 @@
|
||||
rect->bottom = drawable_height - rect->bottom;
|
||||
}
|
||||
|
||||
@ -7854,7 +7854,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
/* Context activation is done by the caller. */
|
||||
static void surface_blt_to_drawable(const struct wined3d_device *device,
|
||||
struct wined3d_context *old_ctx,
|
||||
@@ -3301,6 +4093,26 @@
|
||||
@@ -3269,6 +4061,26 @@
|
||||
/* Make sure the surface is up-to-date. This should probably use
|
||||
* wined3d_resource_load_location() and worry about the destination
|
||||
* surface too, unless we're overwriting it completely. */
|
||||
@ -7881,7 +7881,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
wined3d_texture_load(src_surface->container, context, FALSE);
|
||||
|
||||
/* Activate the destination context, set it up for blitting */
|
||||
@@ -3343,6 +4155,7 @@
|
||||
@@ -3311,6 +4123,7 @@
|
||||
/* Leave the opengl state valid for blitting */
|
||||
device->blitter->unset_shader(context->gl_info);
|
||||
|
||||
@ -7889,7 +7889,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
if (wined3d_settings.cs_multithreaded)
|
||||
gl_info->gl_ops.gl.p_glFinish();
|
||||
else if (wined3d_settings.strict_draw_ordering
|
||||
@@ -3356,6 +4169,14 @@
|
||||
@@ -3324,6 +4137,14 @@
|
||||
context = context_acquire(device, restore_rt);
|
||||
context_release(context);
|
||||
}
|
||||
@ -7904,7 +7904,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const struct wined3d_color *color)
|
||||
@@ -3379,8 +4200,13 @@
|
||||
@@ -3347,8 +4168,13 @@
|
||||
enum wined3d_texture_filter_type filter)
|
||||
{
|
||||
struct wined3d_device *device = dst_surface->resource.device;
|
||||
@ -7918,7 +7918,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
|
||||
TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, blt_fx %p, filter %s.\n",
|
||||
dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect),
|
||||
@@ -3571,6 +4397,7 @@
|
||||
@@ -3539,6 +4365,7 @@
|
||||
{
|
||||
TRACE("surface %p, new location %#x, w %u, h %u.\n", surface, location, w, h);
|
||||
|
||||
@ -7926,7 +7926,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
if (((surface->resource.locations & WINED3D_LOCATION_TEXTURE_RGB) && !(location & WINED3D_LOCATION_TEXTURE_RGB))
|
||||
|| (!(surface->resource.locations & WINED3D_LOCATION_TEXTURE_RGB)
|
||||
&& (location & WINED3D_LOCATION_TEXTURE_RGB)))
|
||||
@@ -3579,6 +4406,15 @@
|
||||
@@ -3547,6 +4374,15 @@
|
||||
surface->ds_current_size.cx = w;
|
||||
surface->ds_current_size.cy = h;
|
||||
surface->resource.locations = location;
|
||||
@ -7942,7 +7942,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -3593,7 +4429,11 @@
|
||||
@@ -3561,7 +4397,11 @@
|
||||
/* TODO: Make this work for modes other than FBO */
|
||||
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return;
|
||||
|
||||
@ -7954,7 +7954,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
{
|
||||
w = surface->ds_current_size.cx;
|
||||
h = surface->ds_current_size.cy;
|
||||
@@ -3619,7 +4459,11 @@
|
||||
@@ -3587,7 +4427,11 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@ -7966,7 +7966,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
{
|
||||
TRACE("Surface was discarded, no need copy data.\n");
|
||||
switch (location)
|
||||
@@ -3639,6 +4483,7 @@
|
||||
@@ -3607,6 +4451,7 @@
|
||||
default:
|
||||
FIXME("Unhandled location %#x\n", location);
|
||||
}
|
||||
@ -7974,7 +7974,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
surface->resource.locations &= ~WINED3D_LOCATION_DISCARDED;
|
||||
surface->resource.locations |= location;
|
||||
surface->ds_current_size.cx = surface->resource.width;
|
||||
@@ -3650,6 +4495,19 @@
|
||||
@@ -3618,6 +4463,19 @@
|
||||
{
|
||||
FIXME("No up to date depth stencil location.\n");
|
||||
surface->resource.locations |= location;
|
||||
@ -7994,7 +7994,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
surface->ds_current_size.cx = surface->resource.width;
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
return;
|
||||
@@ -3714,9 +4572,13 @@
|
||||
@@ -3682,9 +4540,13 @@
|
||||
|
||||
context_invalidate_state(context, STATE_FRAMEBUFFER);
|
||||
|
||||
@ -8008,7 +8008,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
|
||||
}
|
||||
else if (location == WINED3D_LOCATION_DRAWABLE)
|
||||
@@ -3732,9 +4594,13 @@
|
||||
@@ -3700,9 +4562,13 @@
|
||||
|
||||
context_invalidate_state(context, STATE_FRAMEBUFFER);
|
||||
|
||||
@ -8022,7 +8022,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
|
||||
}
|
||||
else
|
||||
@@ -3742,6 +4608,7 @@
|
||||
@@ -3710,6 +4576,7 @@
|
||||
ERR("Invalid location (%#x) specified.\n", location);
|
||||
}
|
||||
|
||||
@ -8030,7 +8030,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
surface->resource.locations |= location;
|
||||
surface->ds_current_size.cx = surface->resource.width;
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
@@ -3787,6 +4654,135 @@
|
||||
@@ -3755,6 +4622,135 @@
|
||||
TRACE("Surface was discarded, nothing to do.\n");
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@ -8166,7 +8166,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
|
||||
&& wined3d_resource_is_offscreen(&surface->container->resource))
|
||||
@@ -3796,6 +4792,7 @@
|
||||
@@ -3764,6 +4760,7 @@
|
||||
}
|
||||
|
||||
surface_get_rect(surface, NULL, &r);
|
||||
@ -8174,7 +8174,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
wined3d_resource_load_location(&surface->resource, context, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
surface_blt_to_drawable(surface->resource.device, context,
|
||||
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
|
||||
@@ -3864,6 +4861,66 @@
|
||||
@@ -3832,6 +4829,66 @@
|
||||
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
|
||||
|
||||
surface_blt_fbo(device, context, WINED3D_TEXF_POINT, surface, src_location,
|
||||
@ -8241,7 +8241,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
&rect, surface, dst_location, &rect);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -3873,6 +4930,7 @@
|
||||
@@ -3841,6 +4898,7 @@
|
||||
|
||||
if (srgb)
|
||||
{
|
||||
@ -8249,7 +8249,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
if ((surface->resource.locations & (WINED3D_LOCATION_TEXTURE_RGB | surface->resource.map_binding))
|
||||
== WINED3D_LOCATION_TEXTURE_RGB)
|
||||
{
|
||||
@@ -3907,6 +4965,45 @@
|
||||
@@ -3875,6 +4933,45 @@
|
||||
|
||||
width = surface->resource.width;
|
||||
wined3d_resource_get_pitch(&surface->resource, &src_row_pitch, &src_slice_pitch);
|
||||
@ -8295,7 +8295,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
|
||||
format = *texture->resource.format;
|
||||
if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE)))
|
||||
@@ -3915,7 +5012,11 @@
|
||||
@@ -3883,7 +4980,11 @@
|
||||
/* Don't use PBOs for converted surfaces. During PBO conversion we look at
|
||||
* WINED3D_TEXTURE_CONVERTED but it isn't set (yet) in all cases it is
|
||||
* getting called. */
|
||||
@ -8307,7 +8307,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
{
|
||||
TRACE("Removing the pbo attached to surface %p.\n", surface);
|
||||
|
||||
@@ -3924,6 +5025,7 @@
|
||||
@@ -3892,6 +4993,7 @@
|
||||
else
|
||||
surface->resource.map_binding = WINED3D_LOCATION_SYSMEM;
|
||||
|
||||
@ -8315,7 +8315,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
wined3d_resource_prepare_map_memory(&surface->resource, context);
|
||||
wined3d_resource_load_location(&surface->resource, context, surface->resource.map_binding);
|
||||
wined3d_resource_free_bo(&surface->resource);
|
||||
@@ -3931,6 +5033,14 @@
|
||||
@@ -3899,6 +5001,14 @@
|
||||
}
|
||||
|
||||
wined3d_resource_get_memory(&surface->resource, surface->resource.locations, &data);
|
||||
@ -8330,7 +8330,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. */
|
||||
@@ -3945,9 +5055,15 @@
|
||||
@@ -3913,9 +5023,15 @@
|
||||
context_release(context);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
@ -8346,7 +8346,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
data.addr = mem;
|
||||
}
|
||||
else if (conversion)
|
||||
@@ -3967,6 +5083,7 @@
|
||||
@@ -3935,6 +5051,7 @@
|
||||
}
|
||||
if (texture->swapchain && texture->swapchain->palette)
|
||||
palette = texture->swapchain->palette;
|
||||
@ -8354,7 +8354,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
conversion->convert(data.addr, src_row_pitch, mem, dst_pitch,
|
||||
width, height, palette, &texture->async.gl_color_key);
|
||||
src_row_pitch = dst_pitch;
|
||||
@@ -3999,6 +5116,40 @@
|
||||
@@ -3967,6 +5084,40 @@
|
||||
struct wined3d_context *context, DWORD location)
|
||||
{
|
||||
struct wined3d_surface *surface = surface_from_resource(resource);
|
||||
@ -8395,7 +8395,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));
|
||||
@@ -4006,30 +5157,73 @@
|
||||
@@ -3974,30 +5125,73 @@
|
||||
if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
|
||||
{
|
||||
if (location == WINED3D_LOCATION_TEXTURE_RGB
|
||||
@ -8476,7 +8476,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
switch (location)
|
||||
@@ -4038,6 +5232,7 @@
|
||||
@@ -4006,6 +5200,7 @@
|
||||
case WINED3D_LOCATION_USER_MEMORY:
|
||||
case WINED3D_LOCATION_SYSMEM:
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
@ -8484,7 +8484,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
surface_load_sysmem(surface, context, location);
|
||||
break;
|
||||
|
||||
@@ -4055,6 +5250,24 @@
|
||||
@@ -4023,6 +5218,24 @@
|
||||
if (FAILED(hr = surface_load_texture(surface, context,
|
||||
location == WINED3D_LOCATION_TEXTURE_SRGB)))
|
||||
return;
|
||||
@ -8509,7 +8509,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -4062,12 +5275,21 @@
|
||||
@@ -4030,12 +5243,21 @@
|
||||
break;
|
||||
}
|
||||
|
||||
@ -8531,7 +8531,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; }
|
||||
@@ -4175,6 +5397,7 @@
|
||||
@@ -4143,6 +5365,7 @@
|
||||
const RECT *dst_rect, const struct wined3d_color *color)
|
||||
{
|
||||
const RECT draw_rect = {0, 0, dst_surface->resource.width, dst_surface->resource.height};
|
||||
@ -8539,7 +8539,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;
|
||||
@@ -4195,6 +5418,21 @@
|
||||
@@ -4163,6 +5386,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);
|
||||
@ -8561,7 +8561,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -4203,6 +5441,7 @@
|
||||
@@ -4171,6 +5409,7 @@
|
||||
const RECT *dst_rect, float depth)
|
||||
{
|
||||
const RECT draw_rect = {0, 0, dst_surface->resource.width, dst_surface->resource.height};
|
||||
@ -8569,7 +8569,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;
|
||||
@@ -4218,6 +5457,20 @@
|
||||
@@ -4186,6 +5425,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);
|
||||
@ -8590,7 +8590,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -4227,8 +5480,10 @@
|
||||
@@ -4195,8 +5448,10 @@
|
||||
struct wined3d_surface *dst_surface, const RECT *dst_rect,
|
||||
const struct wined3d_color_key *color_key)
|
||||
{
|
||||
@ -8601,7 +8601,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
/* Blit from offscreen surface to render target */
|
||||
struct wined3d_color_key old_blt_key = src_surface->container->async.src_blt_color_key;
|
||||
DWORD old_color_key_flags = src_surface->container->async.color_key_flags;
|
||||
@@ -4237,6 +5492,7 @@
|
||||
@@ -4205,6 +5460,7 @@
|
||||
|
||||
wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT, color_key);
|
||||
|
||||
@ -8609,7 +8609,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
context = context_acquire(device, dst_surface);
|
||||
surface_blt_to_drawable(device, context, filter,
|
||||
!!color_key, src_surface, src_rect, dst_surface, dst_rect);
|
||||
@@ -4248,6 +5504,17 @@
|
||||
@@ -4216,6 +5472,17 @@
|
||||
|
||||
wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
|
||||
wined3d_resource_invalidate_location(&dst_surface->resource, ~dst_surface->container->resource.draw_binding);
|
||||
@ -8627,7 +8627,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
const struct blit_shader ffp_blit = {
|
||||
@@ -4407,6 +5674,7 @@
|
||||
@@ -4375,6 +5642,7 @@
|
||||
const struct wined3d_format *src_format, *dst_format;
|
||||
unsigned int src_fmt_flags, dst_fmt_flags;
|
||||
struct wined3d_texture *src_texture = NULL;
|
||||
@ -8635,7 +8635,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;
|
||||
@@ -4437,6 +5705,23 @@
|
||||
@@ -4405,6 +5673,23 @@
|
||||
wined3d_resource_get_pitch(&dst_surface->resource, &dst_row_pitch, &dst_slice_pitch);
|
||||
src_data = dst_data;
|
||||
src_row_pitch = dst_row_pitch;
|
||||
@ -8659,7 +8659,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
src_format = dst_surface->resource.format;
|
||||
dst_format = src_format;
|
||||
dst_fmt_flags = dst_surface->container->resource.format_flags;
|
||||
@@ -4448,12 +5733,14 @@
|
||||
@@ -4416,12 +5701,14 @@
|
||||
dst_fmt_flags = dst_surface->container->resource.format_flags;
|
||||
if (src_surface)
|
||||
{
|
||||
@ -8674,7 +8674,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)))
|
||||
@@ -4464,9 +5751,13 @@
|
||||
@@ -4432,9 +5719,13 @@
|
||||
}
|
||||
src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, 0));
|
||||
}
|
||||
@ -8688,7 +8688,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
src_format = src_surface->resource.format;
|
||||
src_fmt_flags = src_surface->container->resource.format_flags;
|
||||
}
|
||||
@@ -4476,8 +5767,12 @@
|
||||
@@ -4444,8 +5735,12 @@
|
||||
src_fmt_flags = dst_fmt_flags;
|
||||
}
|
||||
|
||||
@ -8701,7 +8701,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
bpp = dst_surface->resource.format->byte_count;
|
||||
@@ -4488,12 +5783,24 @@
|
||||
@@ -4456,12 +5751,24 @@
|
||||
width = (dst_rect->right - dst_rect->left) * bpp;
|
||||
|
||||
if (src_surface)
|
||||
@ -8726,7 +8726,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
|
||||
if (src_fmt_flags & dst_fmt_flags & WINED3DFMT_FLAG_BLOCKS)
|
||||
{
|
||||
@@ -4528,7 +5835,11 @@
|
||||
@@ -4496,7 +5803,11 @@
|
||||
}
|
||||
|
||||
hr = surface_cpu_blt_compressed(sbase, dbuf,
|
||||
@ -8738,7 +8738,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
src_format, flags, fx);
|
||||
goto release;
|
||||
}
|
||||
@@ -4536,7 +5847,11 @@
|
||||
@@ -4504,7 +5815,11 @@
|
||||
/* First, all the 'source-less' blits */
|
||||
if (flags & WINEDDBLT_COLORFILL)
|
||||
{
|
||||
@ -8750,7 +8750,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
flags &= ~WINEDDBLT_COLORFILL;
|
||||
}
|
||||
|
||||
@@ -4585,6 +5900,7 @@
|
||||
@@ -4553,6 +5868,7 @@
|
||||
for (y = 0; y < dstheight; ++y)
|
||||
{
|
||||
memcpy(dbuf, sbuf, width);
|
||||
@ -8758,7 +8758,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
sbuf += src_row_pitch;
|
||||
dbuf += dst_row_pitch;
|
||||
}
|
||||
@@ -4598,6 +5914,21 @@
|
||||
@@ -4566,6 +5882,21 @@
|
||||
{
|
||||
sbuf -= src_row_pitch;
|
||||
dbuf -= dst_row_pitch;
|
||||
@ -8780,7 +8780,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
memcpy(dbuf, sbuf, width);
|
||||
}
|
||||
}
|
||||
@@ -4607,8 +5938,13 @@
|
||||
@@ -4575,8 +5906,13 @@
|
||||
for (y = 0; y < dstheight; ++y)
|
||||
{
|
||||
memmove(dbuf, sbuf, width);
|
||||
@ -8794,7 +8794,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4617,9 +5953,15 @@
|
||||
@@ -4585,9 +5921,15 @@
|
||||
/* Stretching in y direction only. */
|
||||
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
|
||||
{
|
||||
@ -8810,7 +8810,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4629,6 +5971,7 @@
|
||||
@@ -4597,6 +5939,7 @@
|
||||
int last_sy = -1;
|
||||
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
|
||||
{
|
||||
@ -8818,7 +8818,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))
|
||||
@@ -4636,6 +5979,15 @@
|
||||
@@ -4604,6 +5947,15 @@
|
||||
/* This source row is the same as last source row -
|
||||
* Copy the already stretched row. */
|
||||
memcpy(dbuf, dbuf - dst_row_pitch, width);
|
||||
@ -8834,7 +8834,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4682,6 +6034,7 @@
|
||||
@@ -4650,6 +6002,7 @@
|
||||
}
|
||||
#undef STRETCH_ROW
|
||||
}
|
||||
@ -8842,7 +8842,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
dbuf += dst_row_pitch;
|
||||
last_sy = sy;
|
||||
}
|
||||
@@ -4690,6 +6043,16 @@
|
||||
@@ -4658,6 +6011,16 @@
|
||||
else
|
||||
{
|
||||
LONG dstyinc = dst_row_pitch, dstxinc = bpp;
|
||||
@ -8859,7 +8859,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))
|
||||
@@ -4739,7 +6102,11 @@
|
||||
@@ -4707,7 +6070,11 @@
|
||||
LONG tmpxy;
|
||||
dTopLeft = dbuf;
|
||||
dTopRight = dbuf + ((dstwidth - 1) * bpp);
|
||||
@ -8871,7 +8871,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
dBottomRight = dBottomLeft + ((dstwidth - 1) * bpp);
|
||||
|
||||
if (fx->dwDDFX & WINEDDBLTFX_ARITHSTRETCHY)
|
||||
@@ -4816,6 +6183,7 @@
|
||||
@@ -4784,6 +6151,7 @@
|
||||
flags &= ~(WINEDDBLT_DDFX);
|
||||
}
|
||||
|
||||
@ -8879,7 +8879,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
#define COPY_COLORKEY_FX(type) \
|
||||
do { \
|
||||
const type *s; \
|
||||
@@ -4837,6 +6205,29 @@
|
||||
@@ -4805,6 +6173,29 @@
|
||||
d = (type *)(((BYTE *)d) + dstyinc); \
|
||||
} \
|
||||
} while(0)
|
||||
@ -8909,7 +8909,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
|
||||
switch (bpp)
|
||||
{
|
||||
@@ -4855,7 +6246,11 @@
|
||||
@@ -4823,7 +6214,11 @@
|
||||
BYTE *d = dbuf, *dx;
|
||||
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
|
||||
{
|
||||
@ -8921,7 +8921,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
dx = d;
|
||||
for (x = sx = 0; x < dstwidth; ++x, sx+= xinc)
|
||||
{
|
||||
@@ -4886,10 +6281,12 @@
|
||||
@@ -4854,10 +6249,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -8934,7 +8934,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
error:
|
||||
if (flags && FIXME_ON(d3d_surface))
|
||||
{
|
||||
@@ -4897,6 +6294,7 @@
|
||||
@@ -4865,6 +6262,7 @@
|
||||
}
|
||||
|
||||
release:
|
||||
@ -8942,7 +8942,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);
|
||||
@@ -4915,6 +6313,14 @@
|
||||
@@ -4883,6 +6281,14 @@
|
||||
wined3d_texture_decref(src_texture);
|
||||
if (context)
|
||||
context_release(context);
|
||||
@ -8957,7 +8957,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -4959,6 +6365,7 @@
|
||||
@@ -4927,6 +6333,7 @@
|
||||
cpu_blit_blit_surface,
|
||||
};
|
||||
|
||||
@ -8965,7 +8965,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)
|
||||
@@ -4966,6 +6373,16 @@
|
||||
@@ -4934,6 +6341,16 @@
|
||||
struct wined3d_swapchain *src_swapchain, *dst_swapchain;
|
||||
struct wined3d_device *device = dst_surface->resource.device;
|
||||
DWORD src_ds_flags, dst_ds_flags;
|
||||
@ -8982,7 +8982,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
BOOL scale, convert;
|
||||
|
||||
static const DWORD simple_blit = WINEDDBLT_ASYNC
|
||||
@@ -4976,6 +6393,106 @@
|
||||
@@ -4944,6 +6361,106 @@
|
||||
| WINEDDBLT_DEPTHFILL
|
||||
| WINEDDBLT_DONOTWAIT;
|
||||
|
||||
@ -9089,7 +9089,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
if (!device->d3d_initialized)
|
||||
{
|
||||
WARN("D3D not initialized, using fallback.\n");
|
||||
@@ -5018,8 +6535,13 @@
|
||||
@@ -4986,8 +6503,13 @@
|
||||
}
|
||||
|
||||
scale = src_surface
|
||||
@ -9103,7 +9103,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->container->resource.format_flags
|
||||
@@ -5039,6 +6561,7 @@
|
||||
@@ -5007,6 +6529,7 @@
|
||||
TRACE("Depth fill.\n");
|
||||
|
||||
if (!surface_convert_depth_to_float(dst_surface, fx->u5.dwFillDepth, &depth))
|
||||
@ -9111,7 +9111,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)))
|
||||
@@ -5049,6 +6572,24 @@
|
||||
@@ -5017,6 +6540,24 @@
|
||||
if (SUCCEEDED(wined3d_surface_depth_blt(src_surface, src_surface->container->resource.draw_binding,
|
||||
src_rect, dst_surface, dst_surface->container->resource.draw_binding, dst_rect)))
|
||||
return;
|
||||
@ -9136,7 +9136,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -5057,8 +6598,13 @@
|
||||
@@ -5025,8 +6566,13 @@
|
||||
|
||||
/* In principle this would apply to depth blits as well, but we don't
|
||||
* implement those in the CPU blitter at the moment. */
|
||||
@ -9150,7 +9150,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
{
|
||||
if (scale)
|
||||
TRACE("Not doing sysmem blit because of scaling.\n");
|
||||
@@ -5079,8 +6625,13 @@
|
||||
@@ -5047,8 +6593,13 @@
|
||||
palette, fx->u5.dwFillColor, &color))
|
||||
goto fallback;
|
||||
|
||||
@ -9164,7 +9164,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5098,8 +6649,13 @@
|
||||
@@ -5066,8 +6617,13 @@
|
||||
color_key = &src_surface->container->async.src_blt_color_key;
|
||||
blit_op = WINED3D_BLIT_OP_COLOR_BLIT_CKEY;
|
||||
}
|
||||
@ -9178,7 +9178,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
{
|
||||
/* Upload */
|
||||
if (scale)
|
||||
@@ -5108,6 +6664,7 @@
|
||||
@@ -5076,6 +6632,7 @@
|
||||
TRACE("Not doing upload because of format conversion.\n");
|
||||
else
|
||||
{
|
||||
@ -9186,7 +9186,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)))
|
||||
@@ -5120,6 +6677,15 @@
|
||||
@@ -5088,6 +6645,15 @@
|
||||
context_release(context);
|
||||
}
|
||||
return;
|
||||
@ -9202,7 +9202,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5143,6 +6709,7 @@
|
||||
@@ -5111,6 +6677,7 @@
|
||||
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0);
|
||||
dst_swapchain->desc.swap_effect = swap_effect;
|
||||
|
||||
@ -9210,7 +9210,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5348,6 +6915,49 @@
|
||||
@@ -5316,6 +6883,49 @@
|
||||
wined3d_surface_location_invalidated,
|
||||
wined3d_surface_load_location,
|
||||
};
|
||||
@ -9260,7 +9260,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)
|
||||
@@ -5409,7 +7019,11 @@
|
||||
@@ -5377,7 +6987,11 @@
|
||||
}
|
||||
|
||||
surface->container = container;
|
||||
@ -9272,7 +9272,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
list_init(&surface->renderbuffers);
|
||||
list_init(&surface->overlays);
|
||||
|
||||
@@ -5441,9 +7055,14 @@
|
||||
@@ -5409,9 +7023,14 @@
|
||||
if (surface->resource.map_binding == WINED3D_LOCATION_DIB)
|
||||
{
|
||||
wined3d_resource_free_sysmem(&surface->resource);
|
||||
@ -9287,7 +9287,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
return hr;
|
||||
@@ -5470,7 +7089,11 @@
|
||||
@@ -5438,7 +7057,11 @@
|
||||
if (FAILED(hr = surface_init(object, container, desc, target, level, layer, flags)))
|
||||
{
|
||||
WARN("Failed to initialize surface, returning %#x.\n", hr);
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 46e90808c84f3473966d59fbf7a30987d5c3791e Mon Sep 17 00:00:00 2001
|
||||
From 5a9fbe80d7b3c6c5c9b6395f730c9ff6b08b0d57 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Tue, 4 Nov 2014 22:41:45 +0100
|
||||
Subject: wined3d: Improve DXTn support and export conversion functions for
|
||||
@ -13,7 +13,7 @@ Subject: wined3d: Improve DXTn support and export conversion functions for
|
||||
5 files changed, 161 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/dxtn.c b/dlls/wined3d/dxtn.c
|
||||
index fcd2134..082f01c 100644
|
||||
index ce98949..77f7d55 100644
|
||||
--- a/dlls/wined3d/dxtn.c
|
||||
+++ b/dlls/wined3d/dxtn.c
|
||||
@@ -25,6 +25,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
@ -153,10 +153,10 @@ index fcd2134..082f01c 100644
|
||||
|
||||
#undef LOAD_FUNCPTR
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 03b5f4f..ec1f4a5 100644
|
||||
index 603a6194..3530414 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -2408,6 +2408,30 @@ static void convert_dxt1_x8r8g8b8(const BYTE *src, BYTE *dst,
|
||||
@@ -2303,6 +2303,30 @@ static void convert_dxt1_x8r8g8b8(const BYTE *src, BYTE *dst,
|
||||
wined3d_dxt1_decode(src, dst, pitch_in, pitch_out, WINED3DFMT_B8G8R8X8_UNORM, w, h);
|
||||
}
|
||||
|
||||
@ -187,7 +187,7 @@ index 03b5f4f..ec1f4a5 100644
|
||||
static void convert_a8r8g8b8_dxt1(const BYTE *src, BYTE *dst,
|
||||
DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h)
|
||||
{
|
||||
@@ -2474,8 +2498,15 @@ static const struct d3dfmt_converter_desc converters[] =
|
||||
@@ -2369,8 +2393,15 @@ static const struct d3dfmt_converter_desc converters[] =
|
||||
|
||||
static const struct d3dfmt_converter_desc dxtn_converters[] =
|
||||
{
|
||||
@ -204,12 +204,12 @@ index 03b5f4f..ec1f4a5 100644
|
||||
{WINED3DFMT_B8G8R8X8_UNORM, WINED3DFMT_DXT1, convert_x8r8g8b8_dxt1},
|
||||
{WINED3DFMT_B5G5R5A1_UNORM, WINED3DFMT_DXT1, convert_a1r5g5b5_dxt1},
|
||||
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
|
||||
index 9de0baf..fb55abc 100644
|
||||
index 9531dd3..845d36b 100644
|
||||
--- a/dlls/wined3d/wined3d.spec
|
||||
+++ b/dlls/wined3d/wined3d.spec
|
||||
@@ -288,3 +288,11 @@
|
||||
@@ -285,3 +285,11 @@
|
||||
@ cdecl wined3d_volume_get_resource(ptr)
|
||||
@ cdecl wined3d_volume_map(ptr ptr ptr long)
|
||||
@ cdecl wined3d_volume_preload(ptr)
|
||||
@ cdecl wined3d_volume_unmap(ptr)
|
||||
+
|
||||
+@ cdecl wined3d_dxtn_supported()
|
||||
@ -220,10 +220,10 @@ index 9de0baf..fb55abc 100644
|
||||
+@ cdecl wined3d_dxt5_decode(ptr ptr long long long long long)
|
||||
+@ cdecl wined3d_dxt5_encode(ptr ptr long long long long long)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 67105f4..01c0fc2 100644
|
||||
index 01ea83c..e561137 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3176,17 +3176,7 @@ static inline void context_apply_state(struct wined3d_context *context,
|
||||
@@ -3251,17 +3251,7 @@ static inline void context_apply_state(struct wined3d_context *context,
|
||||
state_table[rep].apply(context, state, rep);
|
||||
}
|
||||
|
||||
@ -242,10 +242,10 @@ index 67105f4..01c0fc2 100644
|
||||
|
||||
/* The WNDCLASS-Name for the fake window which we use to retrieve the GL capabilities */
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index 089db9e..bf4efe8 100644
|
||||
index ac1e59e..4878b06 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -2596,4 +2596,18 @@ static inline unsigned int wined3d_log2i(unsigned int x)
|
||||
@@ -2601,4 +2601,18 @@ static inline unsigned int wined3d_log2i(unsigned int x)
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -265,5 +265,5 @@ index 089db9e..bf4efe8 100644
|
||||
+
|
||||
#endif /* __WINE_WINED3D_H */
|
||||
--
|
||||
2.3.0
|
||||
2.5.1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user