mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against 46317e0cb1af2f0b2a07532903677dd412bde3c4.
This commit is contained in:
parent
5d71a4eff3
commit
31fe5d3167
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "6037179f6b48a9becdc9e8328ee3b4cc45a8f8eb"
|
||||
echo "46317e0cb1af2f0b2a07532903677dd412bde3c4"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
|
@ -1,4 +1,4 @@
|
||||
From bc240cf9d9401914b2685b66f21af86aca21bccb Mon Sep 17 00:00:00 2001
|
||||
From 790f8208a4873a5d172d7c11a36477e9a6b8e7aa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 17 Nov 2013 18:44:48 +0100
|
||||
Subject: wined3d: Invalidate containers via callback.
|
||||
@ -13,10 +13,10 @@ Subject: wined3d: Invalidate containers via callback.
|
||||
6 files changed, 30 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index ba4ed5d..638c9b9 100644
|
||||
index 1e66cae..8aac5cb 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -1161,6 +1161,11 @@ static HRESULT buffer_resource_sub_resource_unmap(struct wined3d_resource *resou
|
||||
@@ -1188,6 +1188,11 @@ static HRESULT buffer_resource_sub_resource_unmap(struct wined3d_resource *resou
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ index ba4ed5d..638c9b9 100644
|
||||
static const struct wined3d_resource_ops buffer_resource_ops =
|
||||
{
|
||||
buffer_resource_incref,
|
||||
@@ -1168,6 +1173,7 @@ static const struct wined3d_resource_ops buffer_resource_ops =
|
||||
@@ -1195,6 +1200,7 @@ static const struct wined3d_resource_ops buffer_resource_ops =
|
||||
buffer_unload,
|
||||
buffer_resource_sub_resource_map,
|
||||
buffer_resource_sub_resource_unmap,
|
||||
@ -37,10 +37,10 @@ index ba4ed5d..638c9b9 100644
|
||||
|
||||
static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device *device,
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index 2a42535..c259eba 100644
|
||||
index c4a3a7b..39346b5 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -474,4 +474,6 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
|
||||
@@ -484,4 +484,6 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
|
||||
TRACE("Resource %p, setting %s.\n", resource, wined3d_debug_location(location));
|
||||
resource->locations &= ~location;
|
||||
TRACE("new location flags are %s.\n", wined3d_debug_location(resource->locations));
|
||||
@ -48,10 +48,10 @@ index 2a42535..c259eba 100644
|
||||
+ resource->resource_ops->resource_location_invalidated(resource, location);
|
||||
}
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 0d95db3..f5bc72c 100644
|
||||
index e286384..c4b9cac 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -1220,6 +1220,11 @@ static HRESULT surface_resource_sub_resource_unmap(struct wined3d_resource *reso
|
||||
@@ -1222,6 +1222,11 @@ static HRESULT surface_resource_sub_resource_unmap(struct wined3d_resource *reso
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ index 0d95db3..f5bc72c 100644
|
||||
static const struct wined3d_resource_ops surface_resource_ops =
|
||||
{
|
||||
surface_resource_incref,
|
||||
@@ -1227,6 +1232,7 @@ static const struct wined3d_resource_ops surface_resource_ops =
|
||||
@@ -1229,6 +1234,7 @@ static const struct wined3d_resource_ops surface_resource_ops =
|
||||
surface_unload,
|
||||
surface_resource_sub_resource_map,
|
||||
surface_resource_sub_resource_unmap,
|
||||
@ -72,10 +72,10 @@ index 0d95db3..f5bc72c 100644
|
||||
|
||||
static const struct wined3d_surface_ops surface_ops =
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 2e5276a..520647d 100644
|
||||
index 72f00fd..82ddeeb 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -978,6 +978,11 @@ static HRESULT texture2d_resource_sub_resource_unmap(struct wined3d_resource *re
|
||||
@@ -938,6 +938,11 @@ static HRESULT texture2d_resource_sub_resource_unmap(struct wined3d_resource *re
|
||||
return wined3d_surface_unmap(surface_from_resource(sub_resource));
|
||||
}
|
||||
|
||||
@ -87,19 +87,19 @@ index 2e5276a..520647d 100644
|
||||
static const struct wined3d_resource_ops texture2d_resource_ops =
|
||||
{
|
||||
texture_resource_incref,
|
||||
@@ -985,6 +990,7 @@ static const struct wined3d_resource_ops texture2d_resource_ops =
|
||||
@@ -945,6 +950,7 @@ static const struct wined3d_resource_ops texture2d_resource_ops =
|
||||
wined3d_texture_unload,
|
||||
texture2d_resource_sub_resource_map,
|
||||
texture2d_resource_sub_resource_unmap,
|
||||
+ wined3d_texture_load_location_invalidated,
|
||||
};
|
||||
|
||||
static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc,
|
||||
static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc,
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index eefdb06..f150795 100644
|
||||
index b3b2fe2..00b9814 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -604,10 +604,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
@@ -601,10 +601,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
}
|
||||
|
||||
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
|
||||
@ -110,7 +110,7 @@ index eefdb06..f150795 100644
|
||||
|
||||
volume->resource.map_count++;
|
||||
|
||||
@@ -675,6 +672,14 @@ static HRESULT volume_resource_sub_resource_unmap(struct wined3d_resource *resou
|
||||
@@ -672,6 +669,14 @@ static HRESULT volume_resource_sub_resource_unmap(struct wined3d_resource *resou
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ index eefdb06..f150795 100644
|
||||
static const struct wined3d_resource_ops volume_resource_ops =
|
||||
{
|
||||
volume_resource_incref,
|
||||
@@ -682,6 +687,7 @@ static const struct wined3d_resource_ops volume_resource_ops =
|
||||
@@ -679,6 +684,7 @@ static const struct wined3d_resource_ops volume_resource_ops =
|
||||
volume_unload,
|
||||
volume_resource_sub_resource_map,
|
||||
volume_resource_sub_resource_unmap,
|
||||
@ -134,10 +134,10 @@ index eefdb06..f150795 100644
|
||||
|
||||
static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_texture *container,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 429a093..53e9fe9 100644
|
||||
index a282b95..dc24c36 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2159,6 +2159,7 @@ struct wined3d_resource_ops
|
||||
@@ -2250,6 +2250,7 @@ struct wined3d_resource_ops
|
||||
HRESULT (*resource_sub_resource_map)(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
|
||||
HRESULT (*resource_sub_resource_unmap)(struct wined3d_resource *resource, unsigned int sub_resource_idx);
|
||||
@ -146,5 +146,5 @@ index 429a093..53e9fe9 100644
|
||||
|
||||
struct wined3d_resource
|
||||
--
|
||||
2.6.2
|
||||
2.7.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From baafba4da7e88b445e043b45fd1b852c7e0a1f61 Mon Sep 17 00:00:00 2001
|
||||
From 9508926776cb6d94f7d184fae9642a379f4ee7ad Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 3 Oct 2013 12:47:01 +0200
|
||||
Subject: wined3d: Move load_location into the resource.
|
||||
@ -16,10 +16,10 @@ and downloading from textures will be delegated to surfaces / volumes.
|
||||
6 files changed, 91 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index 638c9b9..e1bd034 100644
|
||||
index 8aac5cb..4e91176 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -1166,6 +1166,13 @@ static void wined3d_buffer_location_invalidated(struct wined3d_resource *resourc
|
||||
@@ -1193,6 +1193,13 @@ static void wined3d_buffer_location_invalidated(struct wined3d_resource *resourc
|
||||
ERR("Not yet implemented.\n");
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ index 638c9b9..e1bd034 100644
|
||||
static const struct wined3d_resource_ops buffer_resource_ops =
|
||||
{
|
||||
buffer_resource_incref,
|
||||
@@ -1174,6 +1181,7 @@ static const struct wined3d_resource_ops buffer_resource_ops =
|
||||
@@ -1201,6 +1208,7 @@ static const struct wined3d_resource_ops buffer_resource_ops =
|
||||
buffer_resource_sub_resource_map,
|
||||
buffer_resource_sub_resource_unmap,
|
||||
wined3d_buffer_location_invalidated,
|
||||
@ -42,10 +42,10 @@ index 638c9b9..e1bd034 100644
|
||||
|
||||
static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device *device,
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index c259eba..bff4997 100644
|
||||
index 39346b5..d1f9fd9 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -477,3 +477,53 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
|
||||
@@ -487,3 +487,53 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
|
||||
|
||||
resource->resource_ops->resource_location_invalidated(resource, location);
|
||||
}
|
||||
@ -100,10 +100,10 @@ index c259eba..bff4997 100644
|
||||
+ resource->resource_ops->resource_load_location(resource, context, location);
|
||||
+}
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 34f589b..fed3aaf 100644
|
||||
index 146d647..791f351 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -1228,6 +1228,13 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
|
||||
@@ -1230,6 +1230,13 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
|
||||
wined3d_texture_set_dirty(surface->container);
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ index 34f589b..fed3aaf 100644
|
||||
static const struct wined3d_resource_ops surface_resource_ops =
|
||||
{
|
||||
surface_resource_incref,
|
||||
@@ -1236,6 +1243,7 @@ static const struct wined3d_resource_ops surface_resource_ops =
|
||||
@@ -1238,6 +1245,7 @@ static const struct wined3d_resource_ops surface_resource_ops =
|
||||
surface_resource_sub_resource_map,
|
||||
surface_resource_sub_resource_unmap,
|
||||
wined3d_surface_location_invalidated,
|
||||
@ -125,7 +125,7 @@ index 34f589b..fed3aaf 100644
|
||||
};
|
||||
|
||||
static const struct wined3d_surface_ops surface_ops =
|
||||
@@ -3941,7 +3949,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3839,7 +3847,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ index 34f589b..fed3aaf 100644
|
||||
{
|
||||
switch (location)
|
||||
{
|
||||
@@ -4273,7 +4281,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4178,7 +4186,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
|
||||
if (WARN_ON(d3d_surface))
|
||||
{
|
||||
@ -144,10 +144,10 @@ index 34f589b..fed3aaf 100644
|
||||
WARN("Operation requires %#x access, but surface only has %#x.\n",
|
||||
required_access, surface->resource.access_flags);
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index e2df18d..7650f36 100644
|
||||
index 377d1bc..bcdf96f 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -981,6 +981,13 @@ static void wined3d_texture_load_location_invalidated(struct wined3d_resource *r
|
||||
@@ -941,6 +941,13 @@ static void wined3d_texture_load_location_invalidated(struct wined3d_resource *r
|
||||
ERR("Should not be called on textures.\n");
|
||||
}
|
||||
|
||||
@ -161,16 +161,16 @@ index e2df18d..7650f36 100644
|
||||
static const struct wined3d_resource_ops texture2d_resource_ops =
|
||||
{
|
||||
texture_resource_incref,
|
||||
@@ -989,6 +996,7 @@ static const struct wined3d_resource_ops texture2d_resource_ops =
|
||||
@@ -949,6 +956,7 @@ static const struct wined3d_resource_ops texture2d_resource_ops =
|
||||
texture2d_resource_sub_resource_map,
|
||||
texture2d_resource_sub_resource_unmap,
|
||||
wined3d_texture_load_location_invalidated,
|
||||
+ wined3d_texture_load_location,
|
||||
};
|
||||
|
||||
static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc,
|
||||
static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc,
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index f150795..82bc3b0 100644
|
||||
index 00b9814..457548e 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -137,27 +137,6 @@ static void wined3d_volume_evict_sysmem(struct wined3d_volume *volume)
|
||||
@ -201,7 +201,7 @@ index f150795..82bc3b0 100644
|
||||
/* Context activation is done by the caller. */
|
||||
static void wined3d_volume_srgb_transfer(struct wined3d_volume *volume,
|
||||
struct wined3d_context *context, BOOL dest_is_srgb)
|
||||
@@ -197,21 +176,17 @@ static BOOL wined3d_volume_can_evict(const struct wined3d_volume *volume)
|
||||
@@ -195,21 +174,17 @@ static BOOL wined3d_volume_can_evict(const struct wined3d_volume *volume)
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -227,7 +227,7 @@ index f150795..82bc3b0 100644
|
||||
if ((volume->resource.access_flags & required_access) != required_access)
|
||||
{
|
||||
ERR("Operation requires %#x access, but volume only has %#x.\n",
|
||||
@@ -337,7 +312,7 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume,
|
||||
@@ -335,7 +310,7 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume,
|
||||
void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *context, BOOL srgb_mode)
|
||||
{
|
||||
wined3d_texture_prepare_texture(volume->container, context, srgb_mode);
|
||||
@ -236,7 +236,7 @@ index f150795..82bc3b0 100644
|
||||
srgb_mode ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB);
|
||||
}
|
||||
|
||||
@@ -396,7 +371,7 @@ static void volume_unload(struct wined3d_resource *resource)
|
||||
@@ -394,7 +369,7 @@ static void volume_unload(struct wined3d_resource *resource)
|
||||
if (volume_prepare_system_memory(volume))
|
||||
{
|
||||
context = context_acquire(device, NULL);
|
||||
@ -245,7 +245,7 @@ index f150795..82bc3b0 100644
|
||||
context_release(context);
|
||||
wined3d_resource_invalidate_location(&volume->resource, ~WINED3D_LOCATION_SYSMEM);
|
||||
}
|
||||
@@ -519,7 +494,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
@@ -516,7 +491,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
if (flags & WINED3D_MAP_DISCARD)
|
||||
wined3d_resource_validate_location(&volume->resource, WINED3D_LOCATION_BUFFER);
|
||||
else
|
||||
@ -254,7 +254,7 @@ index f150795..82bc3b0 100644
|
||||
|
||||
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->pbo));
|
||||
|
||||
@@ -557,7 +532,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
@@ -554,7 +529,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
else if (!(volume->resource.locations & WINED3D_LOCATION_SYSMEM))
|
||||
{
|
||||
context = context_acquire(device, NULL);
|
||||
@ -263,7 +263,7 @@ index f150795..82bc3b0 100644
|
||||
context_release(context);
|
||||
}
|
||||
base_memory = volume->resource.heap_memory;
|
||||
@@ -688,6 +663,7 @@ static const struct wined3d_resource_ops volume_resource_ops =
|
||||
@@ -685,6 +660,7 @@ static const struct wined3d_resource_ops volume_resource_ops =
|
||||
volume_resource_sub_resource_map,
|
||||
volume_resource_sub_resource_unmap,
|
||||
wined3d_volume_location_invalidated,
|
||||
@ -272,10 +272,10 @@ index f150795..82bc3b0 100644
|
||||
|
||||
static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_texture *container,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 4282508..e970088 100644
|
||||
index bcd6589..7e60c22 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2160,6 +2160,8 @@ struct wined3d_resource_ops
|
||||
@@ -2251,6 +2251,8 @@ struct wined3d_resource_ops
|
||||
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
|
||||
HRESULT (*resource_sub_resource_unmap)(struct wined3d_resource *resource, unsigned int sub_resource_idx);
|
||||
void (*resource_location_invalidated)(struct wined3d_resource *resource, DWORD location);
|
||||
@ -284,7 +284,7 @@ index 4282508..e970088 100644
|
||||
};
|
||||
|
||||
struct wined3d_resource
|
||||
@@ -2212,17 +2214,20 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
|
||||
@@ -2303,17 +2305,20 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
|
||||
void *parent, const struct wined3d_parent_ops *parent_ops,
|
||||
const struct wined3d_resource_ops *resource_ops) DECLSPEC_HIDDEN;
|
||||
void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
@ -307,5 +307,5 @@ index 4282508..e970088 100644
|
||||
/* Tests show that the start address of resources is 32 byte aligned */
|
||||
#define RESOURCE_ALIGNMENT 16
|
||||
--
|
||||
2.6.2
|
||||
2.7.0
|
||||
|
||||
|
@ -1,19 +1,19 @@
|
||||
From 99c21f03b539568231b746938b4b0cb5ba664720 Mon Sep 17 00:00:00 2001
|
||||
From 422533270db1400ad7a8a0d4bfd5fa74ed2f8424 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.
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 28 ++++++++++++++++++++++++++++
|
||||
dlls/wined3d/texture.c | 38 ++++++++++++++++++++++++++++++--------
|
||||
dlls/wined3d/texture.c | 33 +++++++++++++++++++++++++--------
|
||||
dlls/wined3d/wined3d_private.h | 2 ++
|
||||
3 files changed, 60 insertions(+), 8 deletions(-)
|
||||
3 files changed, 55 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 91b76f5..ba8d19e 100644
|
||||
index 1c7b3c7..4f7e49f 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -87,6 +87,7 @@ enum wined3d_cs_op
|
||||
@@ -86,6 +86,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_BUFFER_CLEANUP,
|
||||
WINED3D_CS_OP_VOLUME_CLEANUP,
|
||||
WINED3D_CS_OP_SURFACE_CLEANUP,
|
||||
@ -21,7 +21,7 @@ index 91b76f5..ba8d19e 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -515,6 +516,12 @@ struct wined3d_cs_surface_cleanup
|
||||
@@ -508,6 +509,12 @@ struct wined3d_cs_surface_cleanup
|
||||
struct wined3d_surface *surface;
|
||||
};
|
||||
|
||||
@ -34,7 +34,7 @@ index 91b76f5..ba8d19e 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);
|
||||
@@ -2560,6 +2567,26 @@ void wined3d_cs_emit_surface_cleanup(struct wined3d_cs *cs, struct wined3d_surfa
|
||||
@@ -2530,6 +2537,26 @@ void wined3d_cs_emit_surface_cleanup(struct wined3d_cs *cs, struct wined3d_surfa
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ index 91b76f5..ba8d19e 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2625,6 +2652,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2594,6 +2621,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_BUFFER_CLEANUP */ wined3d_cs_exec_buffer_cleanup,
|
||||
/* WINED3D_CS_OP_VOLUME_CLEANUP */ wined3d_cs_exec_volume_cleanup,
|
||||
/* WINED3D_CS_OP_SURFACE_CLEANUP */ wined3d_cs_exec_surface_cleanup,
|
||||
@ -70,7 +70,7 @@ index 91b76f5..ba8d19e 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 61ef22e..85abaa4 100644
|
||||
index 0e9b6ea..18fc976 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -114,17 +114,26 @@ static void wined3d_texture_unload_gl_texture(struct wined3d_texture *texture)
|
||||
@ -127,7 +127,7 @@ index 61ef22e..85abaa4 100644
|
||||
}
|
||||
|
||||
return refcount;
|
||||
@@ -1028,6 +1035,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
@@ -990,6 +997,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);
|
||||
@ -135,54 +135,15 @@ index 61ef22e..85abaa4 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1037,12 +1045,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");
|
||||
+ HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
if (levels != 1)
|
||||
{
|
||||
WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning D3DERR_INVALIDCALL.\n");
|
||||
+ HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1063,6 +1073,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);
|
||||
+ HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1072,6 +1083,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
surface_flags, device, parent, parent_ops, &texture2d_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x\n", hr);
|
||||
+ HeapFree(GetProcessHeap(), 0, texture);
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1134,6 +1146,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);
|
||||
+ HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1164,6 +1177,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
@@ -1020,6 +1028,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");
|
||||
WARN("Attempted to create a mipmapped/cube NPOT texture without unconditional NPOT support.\n");
|
||||
+ HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1176,12 +1190,14 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
@@ -1032,12 +1041,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");
|
||||
@ -190,22 +151,22 @@ index 61ef22e..85abaa4 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
if (levels != 1)
|
||||
if (level_count != 1)
|
||||
{
|
||||
WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning WINED3DERR_INVALIDCALL.\n");
|
||||
+ HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1190,6 +1206,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
surface_flags, device, parent, parent_ops, &texture2d_resource_ops)))
|
||||
@@ -1046,6 +1057,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
flags, device, parent, parent_ops, &texture2d_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
+ HeapFree(GetProcessHeap(), 0, texture);
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1392,12 +1409,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -1248,12 +1260,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);
|
||||
@ -220,7 +181,7 @@ index 61ef22e..85abaa4 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1407,12 +1426,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -1263,12 +1277,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");
|
||||
@ -235,7 +196,7 @@ index 61ef22e..85abaa4 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1440,6 +1461,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -1296,6 +1312,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);
|
||||
@ -243,7 +204,7 @@ index 61ef22e..85abaa4 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1449,6 +1471,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -1305,6 +1322,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
0, device, parent, parent_ops, &texture3d_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@ -251,7 +212,7 @@ index 61ef22e..85abaa4 100644
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1549,7 +1572,6 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
|
||||
@@ -1424,7 +1442,6 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@ -260,10 +221,10 @@ index 61ef22e..85abaa4 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 55b057c..e5baaa4 100644
|
||||
index 7a1b9aa..2da4a16 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2393,6 +2393,7 @@ static inline struct gl_texture *wined3d_texture_get_gl_texture(struct wined3d_t
|
||||
@@ -2484,6 +2484,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;
|
||||
@ -271,7 +232,7 @@ index 55b057c..e5baaa4 100644
|
||||
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,
|
||||
@@ -2827,6 +2828,7 @@ void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs,
|
||||
@@ -2917,6 +2918,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;
|
||||
@ -280,5 +241,5 @@ index 55b057c..e5baaa4 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
|
||||
--
|
||||
2.6.2
|
||||
2.7.0
|
||||
|
||||
|
@ -7968,8 +7968,8 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
+#endif /* STAGING_CSMT */
|
||||
};
|
||||
|
||||
static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc,
|
||||
@@ -991,7 +1050,9 @@
|
||||
static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc,
|
||||
@@ -993,7 +1052,9 @@
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
@ -7979,70 +7979,17 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1001,6 +1062,7 @@
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n");
|
||||
+#if defined(STAGING_CSMT)
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
@@ -1009,6 +1071,14 @@
|
||||
{
|
||||
WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning D3DERR_INVALIDCALL.\n");
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ return WINED3DERR_INVALIDCALL;
|
||||
+ }
|
||||
+
|
||||
+ if (levels != 1)
|
||||
+ {
|
||||
+ WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning D3DERR_INVALIDCALL.\n");
|
||||
+#endif /* STAGING_CSMT */
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1029,7 +1099,9 @@
|
||||
else
|
||||
{
|
||||
WARN("Attempted to create a NPOT cube texture (edge length %u) without GL support.\n", desc->width);
|
||||
+#if defined(STAGING_CSMT)
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
+#endif /* STAGING_CSMT */
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1039,7 +1111,9 @@
|
||||
surface_flags, device, parent, parent_ops, &texture2d_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x\n", hr);
|
||||
+#if defined(STAGING_CSMT)
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
+#endif /* STAGING_CSMT */
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1102,7 +1176,9 @@
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
+#if defined(STAGING_CSMT)
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
+#endif /* STAGING_CSMT */
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1133,7 +1209,9 @@
|
||||
@@ -1024,7 +1085,9 @@
|
||||
else
|
||||
{
|
||||
WARN("Attempted to create a mipmapped NPOT texture without unconditional NPOT support.\n");
|
||||
WARN("Attempted to create a mipmapped/cube NPOT texture without unconditional NPOT support.\n");
|
||||
+#if defined(STAGING_CSMT)
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
+#endif /* STAGING_CSMT */
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1146,6 +1224,7 @@
|
||||
@@ -1037,6 +1100,7 @@
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning WINED3DERR_INVALIDCALL.\n");
|
||||
@ -8050,7 +7997,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
@@ -1154,6 +1233,14 @@
|
||||
@@ -1045,6 +1109,14 @@
|
||||
{
|
||||
WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning WINED3DERR_INVALIDCALL.\n");
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
@ -8058,15 +8005,15 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
+ return WINED3DERR_INVALIDCALL;
|
||||
+ }
|
||||
+
|
||||
+ if (levels != 1)
|
||||
+ if (level_count != 1)
|
||||
+ {
|
||||
+ WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning WINED3DERR_INVALIDCALL.\n");
|
||||
+#endif /* STAGING_CSMT */
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1162,7 +1249,9 @@
|
||||
surface_flags, device, parent, parent_ops, &texture2d_resource_ops)))
|
||||
@@ -1053,7 +1125,9 @@
|
||||
flags, device, parent, parent_ops, &texture2d_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
+#if defined(STAGING_CSMT)
|
||||
@ -8075,7 +8022,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1248,12 +1337,25 @@
|
||||
@@ -1156,12 +1230,25 @@
|
||||
|
||||
static void texture3d_sub_resource_invalidate_location(struct wined3d_resource *sub_resource, DWORD location)
|
||||
{
|
||||
@ -8101,7 +8048,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
|
||||
static void texture3d_sub_resource_upload_data(struct wined3d_resource *sub_resource,
|
||||
@@ -1263,7 +1365,11 @@
|
||||
@@ -1171,7 +1258,11 @@
|
||||
struct wined3d_const_bo_address addr;
|
||||
unsigned int row_pitch, slice_pitch;
|
||||
|
||||
@ -8113,7 +8060,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
if (row_pitch != data->row_pitch || slice_pitch != data->slice_pitch)
|
||||
FIXME("Ignoring row/slice pitch (%u/%u).\n", data->row_pitch, data->slice_pitch);
|
||||
|
||||
@@ -1348,6 +1454,7 @@
|
||||
@@ -1256,6 +1347,7 @@
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
@ -8121,7 +8068,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
@@ -1356,6 +1463,14 @@
|
||||
@@ -1264,6 +1356,14 @@
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created - no volume texture support.\n", texture);
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
@ -8136,7 +8083,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1365,6 +1480,7 @@
|
||||
@@ -1273,6 +1373,7 @@
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n");
|
||||
@ -8144,7 +8091,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
@@ -1373,6 +1489,14 @@
|
||||
@@ -1281,6 +1382,14 @@
|
||||
{
|
||||
WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning D3DERR_INVALIDCALL.\n");
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
@ -8159,7 +8106,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1400,7 +1524,9 @@
|
||||
@@ -1308,7 +1417,9 @@
|
||||
{
|
||||
WARN("Attempted to create a NPOT volume texture (%u, %u, %u) without GL support.\n",
|
||||
desc->width, desc->height, desc->depth);
|
||||
@ -8169,7 +8116,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1410,7 +1536,9 @@
|
||||
@@ -1318,7 +1429,9 @@
|
||||
0, device, parent, parent_ops, &texture3d_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@ -8179,7 +8126,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1533,6 +1661,9 @@
|
||||
@@ -1438,6 +1551,9 @@
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@ -8189,23 +8136,23 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1554,8 +1685,15 @@
|
||||
@@ -1459,8 +1575,15 @@
|
||||
HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC *dc)
|
||||
{
|
||||
struct wined3d_device *device = texture->resource.device;
|
||||
+#if defined(STAGING_CSMT)
|
||||
+ struct wined3d_resource *sub_resource;
|
||||
+ struct wined3d_surface *surface;
|
||||
+#else /* STAGING_CSMT */
|
||||
+ struct wined3d_context *context = NULL;
|
||||
struct wined3d_resource *sub_resource;
|
||||
struct wined3d_surface *surface;
|
||||
+#else /* STAGING_CSMT */
|
||||
+ struct wined3d_context *context = NULL;
|
||||
+ struct wined3d_resource *sub_resource;
|
||||
+ struct wined3d_surface *surface;
|
||||
+ HRESULT hr;
|
||||
+#endif /* STAGING_CSMT */
|
||||
|
||||
TRACE("texture %p, sub_resource_idx %u, dc %p.\n", texture, sub_resource_idx, dc);
|
||||
|
||||
@@ -1570,12 +1708,14 @@
|
||||
@@ -1475,12 +1598,14 @@
|
||||
|
||||
surface = surface_from_resource(sub_resource);
|
||||
|
||||
@ -8220,7 +8167,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
/* Give more detailed info for ddraw. */
|
||||
if (surface->flags & SFLAG_DCINUSE)
|
||||
return WINEDDERR_DCALREADYCREATED;
|
||||
@@ -1584,6 +1724,7 @@
|
||||
@@ -1489,6 +1614,7 @@
|
||||
if (surface->resource.map_count)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
@ -8228,7 +8175,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
surface->flags |= SFLAG_DCINUSE;
|
||||
surface->resource.map_count++;
|
||||
wined3d_cs_emit_getdc(device->cs, surface);
|
||||
@@ -1596,6 +1737,45 @@
|
||||
@@ -1501,6 +1627,45 @@
|
||||
HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC dc)
|
||||
{
|
||||
struct wined3d_device *device = texture->resource.device;
|
||||
@ -8274,7 +8221,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
struct wined3d_resource *sub_resource;
|
||||
struct wined3d_surface *surface;
|
||||
|
||||
@@ -1625,7 +1805,30 @@
|
||||
@@ -1530,7 +1695,30 @@
|
||||
surface->resource.map_count--;
|
||||
surface->flags &= ~SFLAG_DCINUSE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user