Rebase against 7aadb08212a5269ebefcb100cf567f7cf7aa0a7c.

This commit is contained in:
Sebastian Lackner 2016-08-02 03:35:23 +02:00
parent 0b0ad0faa4
commit b5a323aaa3
14 changed files with 587 additions and 756 deletions

View File

@ -1,26 +0,0 @@
From 450d33400036663b5a0e21fce38a7c449409b4d3 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 30 Jul 2016 23:55:09 +0200
Subject: gdi32: Remove unnecessary debug channel.
---
dlls/gdi32/enhmfdrv/dc.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/dlls/gdi32/enhmfdrv/dc.c b/dlls/gdi32/enhmfdrv/dc.c
index 64c6136..91fde55 100644
--- a/dlls/gdi32/enhmfdrv/dc.c
+++ b/dlls/gdi32/enhmfdrv/dc.c
@@ -21,9 +21,6 @@
#include <assert.h>
#include "enhmfdrv/enhmetafiledrv.h"
-#include "wine/debug.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(enhmetafile);
/* get the emf physdev from the path physdev */
static inline PHYSDEV get_emfdev( PHYSDEV path )
--
2.9.0

View File

@ -1,26 +0,0 @@
From ced83fdea5e467009d8a4220fab97fb2e7e4e008 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 31 Jul 2016 00:02:13 +0200
Subject: winetest: Remove duplicate if check.
---
programs/winetest/gui.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/programs/winetest/gui.c b/programs/winetest/gui.c
index a8bcf05..2948d7e 100644
--- a/programs/winetest/gui.c
+++ b/programs/winetest/gui.c
@@ -547,8 +547,7 @@ report (enum report_type t, ...)
}
va_start (ap, t);
- if (t < sizeof text_funcs / sizeof text_funcs[0] &&
- t < sizeof GUI_funcs / sizeof GUI_funcs[0]) ret = funcs[t](ap);
+ if (t < sizeof text_funcs / sizeof text_funcs[0]) ret = funcs[t](ap);
else report (R_WARNING, "unimplemented report type: %d", t);
va_end (ap);
return ret;
--
2.9.0

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "0f2a776a59006a15fb84a2a51237d3484f136966"
echo "7aadb08212a5269ebefcb100cf567f7cf7aa0a7c"
}
# Show version information
@ -2330,19 +2330,18 @@ fi
# | * dlls/amstream/mediastreamfilter.c, dlls/comctl32/listview.c, dlls/d2d1/brush.c, dlls/d2d1/geometry.c, dlls/d3d11/view.c,
# | dlls/d3d8/texture.c, dlls/d3d9/tests/visual.c, dlls/d3d9/texture.c, dlls/ddraw/viewport.c, dlls/dsound/primary.c,
# | dlls/dwrite/layout.c, dlls/dwrite/tests/analyzer.c, dlls/dwrite/tests/font.c, dlls/dwrite/tests/layout.c,
# | dlls/gdi32/enhmfdrv/dc.c, dlls/mshtml/script.c, dlls/msvcirt/tests/msvcirt.c, dlls/msxml3/schema.c,
# | dlls/netapi32/netapi32.c, dlls/ole32/tests/compobj.c, dlls/oleaut32/oleaut.c, dlls/oleaut32/tests/safearray.c,
# | dlls/rpcrt4/cstub.c, dlls/rpcrt4/tests/ndr_marshall.c, dlls/scrrun/tests/dictionary.c, dlls/shell32/tests/appbar.c,
# | dlls/mshtml/script.c, dlls/msvcirt/tests/msvcirt.c, dlls/msxml3/schema.c, dlls/netapi32/netapi32.c,
# | dlls/ole32/tests/compobj.c, dlls/oleaut32/oleaut.c, dlls/oleaut32/tests/safearray.c, dlls/rpcrt4/cstub.c,
# | dlls/rpcrt4/tests/ndr_marshall.c, dlls/scrrun/tests/dictionary.c, dlls/shell32/tests/appbar.c,
# | dlls/shell32/tests/shelldispatch.c, dlls/shell32/tests/shellole.c, dlls/shlwapi/tests/ordinal.c,
# | dlls/user32/tests/input.c, dlls/user32/tests/menu.c, dlls/vbscript/vbdisp.c, dlls/winealsa.drv/mmdevdrv.c,
# | dlls/wined3d/glsl_shader.c, dlls/winhttp/tests/winhttp.c, dlls/wshom.ocx/tests/wshom.c, dlls/xaudio2_7/compat.c,
# | dlls/xaudio2_7/x3daudio.c, include/d3dtypes.h, include/wine/list.h, include/wine/rbtree.h, include/winnt.h,
# | programs/winetest/gui.c, server/request.c, server/sock.c, tools/makedep.c
# | server/request.c, server/sock.c, tools/makedep.c
# |
if test "$enable_Compiler_Warnings" -eq 1; then
patch_apply Compiler_Warnings/0001-comctl32-Avoid-misleading-indentation-warnings.patch
patch_apply Compiler_Warnings/0002-dwrite-tests-Avoid-misleading-indentation-warnings.patch
patch_apply Compiler_Warnings/0003-gdi32-Remove-unnecessary-debug-channel.patch
patch_apply Compiler_Warnings/0004-mshtml-Avoid-misleading-indentation-warnings.patch
patch_apply Compiler_Warnings/0005-msvcirt-tests-Avoid-misleading-indentation-warnings.patch
patch_apply Compiler_Warnings/0006-oleaut32-tests-Avoid-misleading-indentation-warnings.patch
@ -2355,7 +2354,6 @@ if test "$enable_Compiler_Warnings" -eq 1; then
patch_apply Compiler_Warnings/0013-wshom.ocx-tests-Avoid-misleading-indentation-warning.patch
patch_apply Compiler_Warnings/0014-xaudio2_7-Only-declare-debug-channel-when-needed.patch
patch_apply Compiler_Warnings/0015-include-Avoid-shift-overflow-warning.patch
patch_apply Compiler_Warnings/0016-winetest-Remove-duplicate-if-check.patch
patch_apply Compiler_Warnings/0017-server-Workaround-duplicate-condition-warning-of-GCC.patch
patch_apply Compiler_Warnings/0018-Appease-the-blessed-version-of-gcc-4.5-when-Werror-i.patch
patch_apply Compiler_Warnings/0019-dsound-Avoid-implicit-cast-of-interface-pointer.patch
@ -2374,7 +2372,6 @@ if test "$enable_Compiler_Warnings" -eq 1; then
(
echo '+ { "Sebastian Lackner", "comctl32: Avoid misleading indentation warnings.", 1 },';
echo '+ { "Sebastian Lackner", "dwrite/tests: Avoid misleading indentation warnings.", 1 },';
echo '+ { "Sebastian Lackner", "gdi32: Remove unnecessary debug channel.", 1 },';
echo '+ { "Sebastian Lackner", "mshtml: Avoid misleading indentation warnings.", 1 },';
echo '+ { "Sebastian Lackner", "msvcirt/tests: Avoid misleading indentation warnings.", 1 },';
echo '+ { "Sebastian Lackner", "oleaut32/tests: Avoid misleading indentation warnings.", 1 },';
@ -2387,7 +2384,6 @@ if test "$enable_Compiler_Warnings" -eq 1; then
echo '+ { "Sebastian Lackner", "wshom.ocx/tests: Avoid misleading indentation warnings.", 1 },';
echo '+ { "Sebastian Lackner", "xaudio2_7: Only declare debug channel when needed.", 1 },';
echo '+ { "Sebastian Lackner", "include: Avoid shift overflow warning.", 1 },';
echo '+ { "Sebastian Lackner", "winetest: Remove duplicate if check.", 1 },';
echo '+ { "Sebastian Lackner", "server: Workaround duplicate condition warning of GCC 6.", 1 },';
echo '+ { "Erich E. Hoover", "Appease the blessed version of gcc (4.5) when -Werror is enabled.", 1 },';
echo '+ { "Sebastian Lackner", "dsound: Avoid implicit cast of interface pointer.", 1 },';

View File

@ -1,13 +1,13 @@
From 437012ece4738ad5cea694b2a6c2759927074ebe Mon Sep 17 00:00:00 2001
From 77b33ddf4f55a309c42a137f4a27c3f8726e7442 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 14 Dec 2014 20:49:28 +0100
Subject: wined3d: Add second dll with STAGING_CSMT definition set.
---
configure.ac | 1 +
dlls/wined3d-csmt/Makefile.in | 38 ++++++++++++++++++++++++++++++++++++++
dlls/wined3d-csmt/Makefile.in | 37 +++++++++++++++++++++++++++++++++++++
dlls/wined3d-csmt/version.rc | 27 +++++++++++++++++++++++++++
3 files changed, 66 insertions(+)
3 files changed, 65 insertions(+)
create mode 100644 dlls/wined3d-csmt/Makefile.in
create mode 100644 dlls/wined3d-csmt/version.rc
@ -25,10 +25,10 @@ index e5fb209..7394424 100644
WINE_CONFIG_DLL(winejoystick.drv)
diff --git a/dlls/wined3d-csmt/Makefile.in b/dlls/wined3d-csmt/Makefile.in
new file mode 100644
index 0000000..3a401a0
index 0000000..bf064ed
--- /dev/null
+++ b/dlls/wined3d-csmt/Makefile.in
@@ -0,0 +1,38 @@
@@ -0,0 +1,37 @@
+EXTRADEFS = -DSTAGING_CSMT
+MODULE = wined3d-csmt.dll
+IMPORTS = uuid opengl32 user32 gdi32 advapi32
@ -63,13 +63,12 @@ index 0000000..3a401a0
+ utils.c \
+ vertexdeclaration.c \
+ view.c \
+ volume.c \
+ wined3d_main.c
+
+RC_SRCS = version.rc
diff --git a/dlls/wined3d-csmt/version.rc b/dlls/wined3d-csmt/version.rc
new file mode 100644
index 0000000..0439375
index 0000000..2fa8710
--- /dev/null
+++ b/dlls/wined3d-csmt/version.rc
@@ -0,0 +1,27 @@
@ -101,5 +100,5 @@ index 0000000..0439375
+
+#include "wine/wine_common_ver.rc"
--
2.1.3
2.9.0

View File

@ -1,4 +1,4 @@
From d85d4d230b8d8d5fc13ef101272a53ccad04d4c1 Mon Sep 17 00:00:00 2001
From f35c5d6bcd2b0d61a70da8a55b7c6bda4510fd25 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 29 Oct 2015 17:33:23 +0100
Subject: wined3d: Start to move surface/volume_load_location into the texture.
@ -13,9 +13,9 @@ moving allocation of all locations (including sysmem) there.
dlls/wined3d/device.c | 11 ++++++-----
dlls/wined3d/drawprim.c | 10 +++++-----
dlls/wined3d/swapchain.c | 7 ++++---
dlls/wined3d/texture.c | 21 +++++++++++++++------
dlls/wined3d/texture.c | 3 ++-
dlls/wined3d/wined3d_private.h | 2 ++
6 files changed, 34 insertions(+), 22 deletions(-)
6 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 085ed03..20d7868 100644
@ -41,7 +41,7 @@ index 085ed03..20d7868 100644
swapchain_update_draw_bindings(swapchain);
context_set_render_offscreen(context, TRUE);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index a5a3fc4..b3ecf33 100644
index 0031f79..a9cbadb 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -324,14 +324,15 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
@ -134,46 +134,19 @@ index 9596735..ea52af6 100644
if (swapchain->render_to_fbo)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 17140aa..4ef9e88 100644
index 8cb8274..8939660 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -352,7 +352,7 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
for (i = 0; i < sub_count; ++i)
{
if (texture->sub_resources[i].locations == texture->resource.map_binding
- && !texture->texture_ops->texture_load_location(texture, i, context, map_binding))
+ && !wined3d_texture_load_location(texture, i, context, map_binding))
ERR("Failed to load location %s.\n", wined3d_debug_location(map_binding));
if (texture->resource.map_binding == WINED3D_LOCATION_BUFFER)
wined3d_texture_remove_buffer_object(texture, i, context->gl_info);
@@ -914,7 +914,7 @@ void wined3d_texture_load(struct wined3d_texture *texture,
TRACE("Reloading because of color key value change.\n");
for (i = 0; i < sub_count; i++)
{
- if (!texture->texture_ops->texture_load_location(texture, i, context, texture->resource.map_binding))
+ if (!wined3d_texture_load_location(texture, i, context, texture->resource.map_binding))
ERR("Failed to load location %s.\n", wined3d_debug_location(texture->resource.map_binding));
else
wined3d_texture_invalidate_location(texture, i, ~texture->resource.map_binding);
@@ -932,7 +932,7 @@ void wined3d_texture_load(struct wined3d_texture *texture,
/* Reload the surfaces if the texture is marked dirty. */
for (i = 0; i < sub_count; ++i)
{
- if (!texture->texture_ops->texture_load_location(texture, i, context,
+ if (!wined3d_texture_load_location(texture, i, context,
srgb ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB))
ERR("Failed to load location (srgb %#x).\n", srgb);
}
@@ -1413,7 +1413,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
WARN("Ignoring dirty_region %s.\n", debug_box(dirty_region));
@@ -176,7 +176,7 @@ void wined3d_texture_invalidate_location(struct wined3d_texture *texture,
context = context_acquire(texture->resource.device, NULL);
- if (!texture->texture_ops->texture_load_location(texture, sub_resource_idx,
+ if (!wined3d_texture_load_location(texture, sub_resource_idx,
context, texture->resource.map_binding))
{
ERR("Failed to load location %s.\n", wined3d_debug_location(texture->resource.map_binding));
@@ -1434,6 +1434,7 @@ static void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigne
/* Context activation is done by the caller. Context may be NULL in
* WINED3D_NO3D mode. */
-static BOOL wined3d_texture_load_location(struct wined3d_texture *texture,
+BOOL wined3d_texture_load_location(struct wined3d_texture *texture,
unsigned int sub_resource_idx, struct wined3d_context *context, DWORD location)
{
return texture->texture_ops->texture_load_location(texture, sub_resource_idx, context, location);
@@ -1441,6 +1441,7 @@ void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int s
context, data, row_pitch, slice_pitch);
}
@ -181,45 +154,8 @@ index 17140aa..4ef9e88 100644
static void texture2d_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx,
const struct wined3d_context *context, const struct wined3d_const_bo_address *data,
unsigned int row_pitch, unsigned int slice_pitch)
@@ -1592,7 +1593,7 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
struct wined3d_texture_sub_resource *sub_resource = &texture->sub_resources[i];
if (resource->pool != WINED3D_POOL_DEFAULT
- && texture->texture_ops->texture_load_location(texture, i, context, resource->map_binding))
+ && wined3d_texture_load_location(texture, i, context, resource->map_binding))
{
wined3d_texture_invalidate_location(texture, i, ~resource->map_binding);
}
@@ -1711,7 +1712,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
{
if (resource->usage & WINED3DUSAGE_DYNAMIC)
WARN_(d3d_perf)("Mapping a dynamic texture without WINED3D_MAP_DISCARD.\n");
- ret = texture->texture_ops->texture_load_location(texture,
+ ret = wined3d_texture_load_location(texture,
sub_resource_idx, context, texture->resource.map_binding);
}
@@ -2073,6 +2074,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
return WINED3D_OK;
}
+/* Context activation is done by the caller. */
static void texture3d_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx,
const struct wined3d_context *context, const struct wined3d_const_bo_address *data,
unsigned int row_pitch, unsigned int slice_pitch)
@@ -2883,3 +2885,10 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
return WINED3D_OK;
}
+
+/* Context activation is done by the caller. Context may be NULL. */
+BOOL wined3d_texture_load_location(struct wined3d_texture *texture, unsigned int sub_resource_idx,
+ struct wined3d_context *context, DWORD location)
+{
+ return texture->texture_ops->texture_load_location(texture, sub_resource_idx, context, location);
+}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 1873a79..7fd8ae0 100644
index 12fc7de..bbfb1f6 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2761,6 +2761,8 @@ void *wined3d_texture_map_bo_address(const struct wined3d_bo_address *data, size
@ -227,7 +163,7 @@ index 1873a79..7fd8ae0 100644
BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned int sub_resource_idx,
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
+BOOL wined3d_texture_load_location(struct wined3d_texture *texture, unsigned int sub_resource_idx,
+ struct wined3d_context *context, DWORD location);
+ struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
void wined3d_texture_prepare_texture(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
void wined3d_texture_set_map_binding(struct wined3d_texture *texture, DWORD map_binding) DECLSPEC_HIDDEN;

View File

@ -1,4 +1,4 @@
From 8a19a2579927f3b47f3c894af877a2d810c01c6a Mon Sep 17 00:00:00 2001
From 2b5e06e34805da8a6c3f9f16415ec7f026c247d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 18 Nov 2015 08:31:14 +0000
Subject: wined3d: Share surface and volume system memory loading code.
@ -156,7 +156,7 @@ index 105fcb5..2933b82 100644
}
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 8975155..634314b 100644
index f4c50d2..5bbeab6 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -80,27 +80,6 @@ GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture)
@ -187,54 +187,8 @@ index 8975155..634314b 100644
static void wined3d_texture_evict_sysmem(struct wined3d_texture *texture)
{
struct wined3d_texture_sub_resource *sub_resource;
@@ -2182,37 +2161,15 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
struct wined3d_context *context, DWORD location)
{
struct wined3d_texture_sub_resource *sub_resource = &texture->sub_resources[sub_resource_idx];
- DWORD required_access = wined3d_resource_access_from_location(location);
TRACE("texture %p, sub_resource_idx %u, context %p, location %s.\n",
texture, sub_resource_idx, context, wined3d_debug_location(location));
TRACE("Current resource location %s.\n", wined3d_debug_location(sub_resource->locations));
- if ((sub_resource->locations & location) == location)
- {
- TRACE("Location(s) already up to date.\n");
- return TRUE;
- }
-
- if ((texture->resource.access_flags & required_access) != required_access)
- {
- ERR("Operation requires %#x access, but volume only has %#x.\n",
- required_access, texture->resource.access_flags);
- return FALSE;
- }
-
if (!wined3d_texture_prepare_location(texture, sub_resource_idx, context, location))
return FALSE;
- if (sub_resource->locations & WINED3D_LOCATION_DISCARDED)
- {
- TRACE("Volume previously discarded, nothing to do.\n");
- wined3d_texture_validate_location(texture, sub_resource_idx, location);
- wined3d_texture_invalidate_location(texture, sub_resource_idx, WINED3D_LOCATION_DISCARDED);
- goto done;
- }
-
switch (location)
{
case WINED3D_LOCATION_TEXTURE_RGB:
@@ -2295,7 +2252,6 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
return FALSE;
}
-done:
wined3d_texture_validate_location(texture, sub_resource_idx, location);
return TRUE;
@@ -2906,9 +2862,132 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
return WINED3D_OK;
@@ -174,12 +153,135 @@ void wined3d_texture_invalidate_location(struct wined3d_texture *texture,
sub_resource_idx, texture);
}
+static BOOL wined3d_texture_copy_sysmem_location(struct wined3d_texture *texture,
@ -299,9 +253,10 @@ index 8975155..634314b 100644
+ }
+}
+
/* Context activation is done by the caller. Context may be NULL. */
BOOL wined3d_texture_load_location(struct wined3d_texture *texture, unsigned int sub_resource_idx,
struct wined3d_context *context, DWORD location)
/* Context activation is done by the caller. Context may be NULL in
* WINED3D_NO3D mode. */
BOOL wined3d_texture_load_location(struct wined3d_texture *texture,
unsigned int sub_resource_idx, struct wined3d_context *context, DWORD location)
{
- return texture->texture_ops->texture_load_location(texture, sub_resource_idx, context, location);
+ BOOL ret;
@ -367,6 +322,55 @@ index 8975155..634314b 100644
+ }
+ return ret;
}
/* Context activation is done by the caller. */
@@ -2209,7 +2311,6 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
struct wined3d_context *context, DWORD location)
{
struct wined3d_texture_sub_resource *sub_resource = &texture->sub_resources[sub_resource_idx];
- DWORD required_access = wined3d_resource_access_from_location(location);
unsigned int row_pitch, slice_pitch;
TRACE("texture %p, sub_resource_idx %u, context %p, location %s.\n",
@@ -2217,30 +2318,9 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
TRACE("Current resource location %s.\n", wined3d_debug_location(sub_resource->locations));
- if ((sub_resource->locations & location) == location)
- {
- TRACE("Location(s) already up to date.\n");
- return TRUE;
- }
-
- if ((texture->resource.access_flags & required_access) != required_access)
- {
- ERR("Operation requires %#x access, but volume only has %#x.\n",
- required_access, texture->resource.access_flags);
- return FALSE;
- }
-
if (!wined3d_texture_prepare_location(texture, sub_resource_idx, context, location))
return FALSE;
- if (sub_resource->locations & WINED3D_LOCATION_DISCARDED)
- {
- TRACE("Volume previously discarded, nothing to do.\n");
- wined3d_texture_validate_location(texture, sub_resource_idx, location);
- wined3d_texture_invalidate_location(texture, sub_resource_idx, WINED3D_LOCATION_DISCARDED);
- goto done;
- }
-
switch (location)
{
case WINED3D_LOCATION_TEXTURE_RGB:
@@ -2325,7 +2405,6 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
return FALSE;
}
-done:
wined3d_texture_validate_location(texture, sub_resource_idx, location);
return TRUE;
--
2.9.0

View File

@ -1,4 +1,4 @@
From 56b000bf2a5d8a0d47d5fd06d51f737cafdb9933 Mon Sep 17 00:00:00 2001
From c1c29e14d5b9efe39db225334885e4b4703ff72d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 20 Dec 2012 13:09:17 +0100
Subject: wined3d: Move the framebuffer into wined3d_state
@ -7,7 +7,7 @@ Subject: wined3d: Move the framebuffer into wined3d_state
dlls/wined3d/arb_program_shader.c | 4 +-
dlls/wined3d/context.c | 19 ++++--
dlls/wined3d/cs.c | 50 ++++++++--------
dlls/wined3d/device.c | 122 +++++++++++++++++---------------------
dlls/wined3d/device.c | 121 ++++++++++++++++++--------------------
dlls/wined3d/drawprim.c | 2 +-
dlls/wined3d/glsl_shader.c | 2 +-
dlls/wined3d/shader.c | 2 +-
@ -16,11 +16,11 @@ Subject: wined3d: Move the framebuffer into wined3d_state
dlls/wined3d/surface.c | 2 +-
dlls/wined3d/swapchain.c | 2 +-
dlls/wined3d/utils.c | 4 +-
dlls/wined3d/wined3d_private.h | 46 ++++++++++----
13 files changed, 192 insertions(+), 134 deletions(-)
dlls/wined3d/wined3d_private.h | 46 +++++++++++----
13 files changed, 192 insertions(+), 133 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 2de6577..fdd981a 100644
index 3f551b6..05ce745 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -704,7 +704,7 @@ static void shader_arb_load_constants_internal(struct shader_arb_priv *priv,
@ -42,7 +42,7 @@ index 2de6577..fdd981a 100644
}
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 20d7868..d8d6ce0 100644
index 8b12a39..8946676 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1699,6 +1699,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
@ -128,10 +128,10 @@ index 20d7868..d8d6ce0 100644
WORD map;
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 5931569..0f2156b 100644
index 6569b97..0553d4a 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -313,19 +313,19 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
@@ -328,19 +328,19 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
state = &device->state;
wined3d_get_draw_rect(state, &draw_rect);
device_clear_render_targets(device, device->adapter->gl_info.limits.buffers,
@ -155,7 +155,7 @@ index 5931569..0f2156b 100644
}
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
@@ -348,12 +348,12 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
@@ -363,12 +363,12 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
{
for (i = 0; i < cs->device->adapter->gl_info.limits.buffers; ++i)
{
@ -171,7 +171,7 @@ index 5931569..0f2156b 100644
cs->ops->submit(cs);
}
@@ -391,11 +391,11 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
@@ -406,11 +406,11 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
}
for (i = 0; i < cs->device->adapter->gl_info.limits.buffers; ++i)
{
@ -187,7 +187,7 @@ index 5931569..0f2156b 100644
for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
{
if (!(shader = state->shader[i]))
@@ -452,11 +452,11 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
@@ -467,11 +467,11 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
}
for (i = 0; i < cs->device->adapter->gl_info.limits.buffers; ++i)
{
@ -203,7 +203,7 @@ index 5931569..0f2156b 100644
for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
{
if (!(shader = state->shader[i]))
@@ -544,7 +544,7 @@ static void wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const v
@@ -559,7 +559,7 @@ static void wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const v
{
const struct wined3d_cs_set_rendertarget_view *op = data;
@ -212,7 +212,7 @@ index 5931569..0f2156b 100644
device_invalidate_state(cs->device, STATE_FRAMEBUFFER);
}
@@ -567,7 +567,7 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
@@ -582,7 +582,7 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
struct wined3d_device *device = cs->device;
struct wined3d_rendertarget_view *prev;
@ -221,7 +221,7 @@ index 5931569..0f2156b 100644
{
struct wined3d_surface *prev_surface = wined3d_rendertarget_view_get_surface(prev);
@@ -583,7 +583,7 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
@@ -598,7 +598,7 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
}
}
@ -230,7 +230,7 @@ index 5931569..0f2156b 100644
if (!prev != !op->view)
{
@@ -1152,11 +1152,13 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
@@ -1187,11 +1187,13 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
{
struct wined3d_adapter *adapter = cs->device->adapter;
@ -246,7 +246,7 @@ index 5931569..0f2156b 100644
}
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1257,15 +1259,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -1314,15 +1316,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
if (!(cs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cs))))
return NULL;
@ -264,7 +264,7 @@ index 5931569..0f2156b 100644
cs->ops = &wined3d_cs_st_ops;
cs->device = device;
@@ -1273,7 +1273,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -1330,7 +1330,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
if (!(cs->data = HeapAlloc(GetProcessHeap(), 0, cs->data_size)))
{
state_cleanup(&cs->state);
@ -272,7 +272,7 @@ index 5931569..0f2156b 100644
HeapFree(GetProcessHeap(), 0, cs);
return NULL;
}
@@ -1284,7 +1283,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -1341,7 +1340,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
void wined3d_cs_destroy(struct wined3d_cs *cs)
{
state_cleanup(&cs->state);
@ -281,7 +281,7 @@ index 5931569..0f2156b 100644
HeapFree(GetProcessHeap(), 0, cs);
}
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 4d0ff2e..602398e 100644
index 98a934c..6e118dc 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -987,7 +987,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
@ -402,7 +402,7 @@ index 4d0ff2e..602398e 100644
return;
if (src_view->resource->type == WINED3D_RTYPE_BUFFER)
{
@@ -3441,6 +3419,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
@@ -3467,6 +3445,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_count,
const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
{
@ -411,7 +411,7 @@ index 4d0ff2e..602398e 100644
TRACE("device %p, rect_count %u, rects %p, flags %#x, color %s, depth %.8e, stencil %u.\n",
device, rect_count, rects, flags, debug_color(color), depth, stencil);
@@ -3452,7 +3432,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
@@ -3478,7 +3458,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
{
@ -420,7 +420,7 @@ index 4d0ff2e..602398e 100644
if (!ds)
{
WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
@@ -3461,8 +3441,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
@@ -3487,8 +3467,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
}
else if (flags & WINED3DCLEAR_TARGET)
{
@ -431,7 +431,7 @@ index 4d0ff2e..602398e 100644
{
WARN("Silently ignoring depth and target clear with mismatching sizes\n");
return WINED3D_OK;
@@ -3778,8 +3758,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
@@ -3804,8 +3784,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE]
|| state->render_states[WINED3D_RS_STENCILENABLE])
{
@ -442,7 +442,7 @@ index 4d0ff2e..602398e 100644
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
{
@@ -4237,20 +4217,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
@@ -4263,20 +4243,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
return NULL;
}
@ -466,7 +466,7 @@ index 4d0ff2e..602398e 100644
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
device, view_idx, view, set_viewport);
@@ -4290,13 +4271,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
@@ -4313,13 +4294,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
}
@ -482,7 +482,7 @@ index 4d0ff2e..602398e 100644
wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view);
/* Release after the assignment, to prevent device_resource_released()
* from seeing the surface as still in use. */
@@ -4308,18 +4289,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
@@ -4331,18 +4312,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
{
@ -504,7 +504,7 @@ index 4d0ff2e..602398e 100644
wined3d_rendertarget_view_incref(view);
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
if (prev)
@@ -4682,10 +4664,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4705,10 +4687,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
wined3d_texture_decref(device->cursor_texture);
device->cursor_texture = NULL;
}
@ -516,7 +516,7 @@ index 4d0ff2e..602398e 100644
{
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@@ -4694,6 +4675,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4717,6 +4698,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
}
wined3d_device_set_depth_stencil_view(device, NULL);
@ -528,7 +528,7 @@ index 4d0ff2e..602398e 100644
if (device->onscreen_depth_stencil)
{
wined3d_texture_decref(device->onscreen_depth_stencil->container);
@@ -4919,30 +4905,30 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4942,27 +4928,28 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
if (device->d3d_initialized)
delete_opengl_contexts(device, swapchain);
@ -558,16 +558,13 @@ index 4d0ff2e..602398e 100644
+ state->viewport.height = swapchain->desc.backbuffer_height;
wined3d_cs_emit_set_viewport(device->cs, &state->viewport);
state->scissor_rect.top = 0;
state->scissor_rect.left = 0;
- state->scissor_rect.right = view->width;
- state->scissor_rect.bottom = view->height;
+ state->scissor_rect.right = swapchain->desc.backbuffer_width;
+ state->scissor_rect.bottom = swapchain->desc.backbuffer_height;
- SetRect(&state->scissor_rect, 0, 0, view->width, view->height);
+ SetRect(&state->scissor_rect, 0, 0,
+ swapchain->desc.backbuffer_width, swapchain->desc.backbuffer_height);
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
}
@@ -5032,11 +5018,11 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
@@ -5052,11 +5039,11 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@ -581,7 +578,7 @@ index 4d0ff2e..602398e 100644
ERR("Resource %p is still in use as depth/stencil buffer.\n", resource);
switch (type)
@@ -5172,8 +5158,12 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
@@ -5192,8 +5179,12 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
device->blitter = adapter->blitter;
@ -610,7 +607,7 @@ index dd82654..dd0f1d9 100644
struct wined3d_event_query *ib_query = NULL;
struct wined3d_stream_info si_emulated;
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 6b1ac34..c35bf0e 100644
index d13f429..f8f0b8d 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -1495,7 +1495,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
@ -623,10 +620,10 @@ index 6b1ac34..c35bf0e 100644
0.0f,
0.0f,
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 08cee35..fbad000 100644
index 28d5972..37594b2 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -3057,7 +3057,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
@@ -3066,7 +3066,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
UINT i;
memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */
@ -636,10 +633,10 @@ index 08cee35..fbad000 100644
static unsigned int warned = 0;
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index ea8bd40..50cf6cd 100644
index 50b82e9..c08af26 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -105,7 +105,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
@@ -152,7 +152,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
const struct wined3d_gl_info *gl_info = context->gl_info;
/* No z test without depth stencil buffers */
@ -648,7 +645,7 @@ index ea8bd40..50cf6cd 100644
{
TRACE("No Z buffer - disabling depth test\n");
zenable = WINED3D_ZB_FALSE;
@@ -382,14 +382,14 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st
@@ -429,14 +429,14 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st
GLenum srcBlend, dstBlend;
unsigned int rt_fmt_flags;
@ -666,7 +663,7 @@ index ea8bd40..50cf6cd 100644
/* According to the red book, GL_LINE_SMOOTH needs GL_BLEND with specific
* blending parameters to work. */
@@ -823,7 +823,7 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
@@ -870,7 +870,7 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
GLint depthFail_ccw;
/* No stencil test without a stencil buffer. */
@ -675,7 +672,7 @@ index ea8bd40..50cf6cd 100644
{
gl_info->gl_ops.gl.p_glDisable(GL_STENCIL_TEST);
checkGLcall("glDisable GL_STENCIL_TEST");
@@ -919,7 +919,7 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
@@ -966,7 +966,7 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
static void state_stencilwrite2s(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
@ -684,7 +681,7 @@ index ea8bd40..50cf6cd 100644
const struct wined3d_gl_info *gl_info = context->gl_info;
GL_EXTCALL(glActiveStencilFaceEXT(GL_BACK));
@@ -933,7 +933,7 @@ static void state_stencilwrite2s(struct wined3d_context *context, const struct w
@@ -980,7 +980,7 @@ static void state_stencilwrite2s(struct wined3d_context *context, const struct w
static void state_stencilwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
@ -693,7 +690,7 @@ index ea8bd40..50cf6cd 100644
const struct wined3d_gl_info *gl_info = context->gl_info;
gl_info->gl_ops.gl.p_glStencilMask(mask);
@@ -1671,7 +1671,7 @@ static void state_depthbias(struct wined3d_context *context, const struct wined3
@@ -1718,7 +1718,7 @@ static void state_depthbias(struct wined3d_context *context, const struct wined3
if (state->render_states[WINED3D_RS_SLOPESCALEDEPTHBIAS]
|| state->render_states[WINED3D_RS_DEPTHBIAS])
{
@ -702,7 +699,7 @@ index ea8bd40..50cf6cd 100644
float scale;
union
@@ -4580,8 +4580,8 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
@@ -4632,8 +4632,8 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
static void viewport_miscpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
@ -713,7 +710,7 @@ index ea8bd40..50cf6cd 100644
const struct wined3d_gl_info *gl_info = context->gl_info;
struct wined3d_viewport vp = state->viewport;
unsigned int width, height;
@@ -4767,7 +4767,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
@@ -4819,7 +4819,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
}
else
{
@ -722,7 +719,7 @@ index ea8bd40..50cf6cd 100644
UINT height;
UINT width;
@@ -4835,7 +4835,7 @@ void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state
@@ -4884,7 +4884,7 @@ void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state
TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id);
@ -732,7 +729,7 @@ index ea8bd40..50cf6cd 100644
else
gl_info->gl_ops.gl.p_glDisable(GL_FRAMEBUFFER_SRGB);
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index bb15995..08f5ed5 100644
index 2fbfa2c..bb3c0cc 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -430,6 +430,7 @@ void state_unbind_resources(struct wined3d_state *state)
@ -832,10 +829,10 @@ index bb15995..08f5ed5 100644
if (type == WINED3D_SBT_RECORDED)
return WINED3D_OK;
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 0caf753..7b55e25 100644
index af7a92a..1b32ad0 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2570,7 +2570,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
@@ -2568,7 +2568,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
{
struct wined3d_texture *dst_texture = dst_surface->container;
struct wined3d_device *device = dst_texture->resource.device;
@ -858,10 +855,10 @@ index cf3cb95..783a174 100644
struct wined3d_texture *logo_texture;
struct wined3d_context *context;
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index e1a7952..1c5b55c 100644
index 93b610d..288c82e 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -4481,7 +4481,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
@@ -4498,7 +4498,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
float y_offset = context->render_offscreen
? (center_offset - (2.0f * y) - h) / h
: (center_offset - (2.0f * y) - h) / -h;
@ -870,7 +867,7 @@ index e1a7952..1c5b55c 100644
state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE;
float z_scale = zenable ? 2.0f : 0.0f;
float z_offset = zenable ? -1.0f : 0.0f;
@@ -5278,7 +5278,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
@@ -5295,7 +5295,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
break;
}
}
@ -880,10 +877,10 @@ index e1a7952..1c5b55c 100644
|| !state->render_states[WINED3D_RS_CLIPPLANEENABLE])
{
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 39d3759..a4ea193 100644
index 63534ce..5e6cbda 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1405,6 +1405,36 @@ struct wined3d_timestamp_query
@@ -1450,6 +1450,36 @@ struct wined3d_timestamp_query
void context_alloc_timestamp_query(struct wined3d_context *context, struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
void context_free_timestamp_query(struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
@ -920,7 +917,7 @@ index 39d3759..a4ea193 100644
struct wined3d_context
{
const struct wined3d_gl_info *gl_info;
@@ -1419,6 +1449,7 @@ struct wined3d_context
@@ -1464,6 +1494,7 @@ struct wined3d_context
DWORD dirtyArray[STATE_HIGHEST + 1]; /* Won't get bigger than that, a state is never marked dirty 2 times */
DWORD numDirtyEntries;
DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */
@ -928,7 +925,7 @@ index 39d3759..a4ea193 100644
struct wined3d_swapchain *swapchain;
struct
@@ -1526,12 +1557,6 @@ struct wined3d_context
@@ -1572,12 +1603,6 @@ struct wined3d_context
GLuint dummy_arbfp_prog;
};
@ -941,7 +938,7 @@ index 39d3759..a4ea193 100644
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
struct StateEntry
@@ -2296,7 +2321,7 @@ struct wined3d_stream_state
@@ -2353,7 +2378,7 @@ struct wined3d_stream_state
struct wined3d_state
{
DWORD flags;
@ -950,7 +947,7 @@ index 39d3759..a4ea193 100644
struct wined3d_vertex_declaration *vertex_declaration;
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
@@ -2400,7 +2425,6 @@ struct wined3d_device
@@ -2458,7 +2483,6 @@ struct wined3d_device
struct wine_rb_tree samplers;
/* Render Target Support */
@ -958,7 +955,7 @@ index 39d3759..a4ea193 100644
struct wined3d_surface *onscreen_depth_stencil;
struct wined3d_rendertarget_view *auto_depth_stencil_view;
@@ -2952,9 +2976,8 @@ struct wined3d_stateblock
@@ -3001,9 +3025,8 @@ struct wined3d_stateblock
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -970,7 +967,7 @@ index 39d3759..a4ea193 100644
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
struct wined3d_cs_ops
@@ -2967,7 +2990,6 @@ struct wined3d_cs
@@ -3016,7 +3039,6 @@ struct wined3d_cs
{
const struct wined3d_cs_ops *ops;
struct wined3d_device *device;
@ -979,5 +976,5 @@ index 39d3759..a4ea193 100644
size_t data_size;
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From 68607b84ae0cdb73a2cb49ce37057187492a8d61 Mon Sep 17 00:00:00 2001
From 590b2e4bdbc7f4dd6719a3172a439294d64b4c7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
Date: Sun, 3 Apr 2016 19:34:19 +0100
Subject: wined3d: send texture maps through the command stream
@ -6,15 +6,15 @@ Subject: wined3d: send texture maps through the command stream
Slow version only. Good enough to dodge some Nvidia bugs in the ddraw tests.
---
dlls/wined3d/cs.c | 73 +++++++++++++++++
dlls/wined3d/texture.c | 173 +++++++++++++++++++++--------------------
dlls/wined3d/texture.c | 172 +++++++++++++++++++++--------------------
dlls/wined3d/wined3d_private.h | 8 ++
3 files changed, 168 insertions(+), 86 deletions(-)
3 files changed, 168 insertions(+), 85 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 8496d42..904f304 100644
index 737c39a..0fc98be 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -77,6 +77,8 @@ enum wined3d_cs_op
@@ -79,6 +79,8 @@ enum wined3d_cs_op
WINED3D_CS_OP_SET_LIGHT_ENABLE,
WINED3D_CS_OP_BLT,
WINED3D_CS_OP_CLEAR_RTV,
@ -23,7 +23,7 @@ index 8496d42..904f304 100644
WINED3D_CS_OP_STOP,
};
@@ -374,6 +376,22 @@ struct wined3d_cs_clear_rtv
@@ -389,6 +391,22 @@ struct wined3d_cs_clear_rtv
const struct blit_shader *blitter;
};
@ -46,7 +46,7 @@ index 8496d42..904f304 100644
/* FIXME: The list synchronization probably isn't particularly fast. */
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
{
@@ -1966,6 +1984,59 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
@@ -2025,6 +2043,59 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
cs->ops->submit(cs);
}
@ -106,7 +106,7 @@ index 8496d42..904f304 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -2009,6 +2080,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2070,6 +2141,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_LIGHT_ENABLE */ wined3d_cs_exec_set_light_enable,
/* WINED3D_CS_OP_BLT */ wined3d_cs_exec_blt,
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
@ -116,10 +116,10 @@ index 8496d42..904f304 100644
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index debafc4..e239282 100644
index 43615c38..d7e68ba 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1648,6 +1648,63 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
@@ -1750,6 +1750,63 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
wined3d_texture_unload_gl_texture(texture);
}
@ -183,7 +183,7 @@ index debafc4..e239282 100644
static HRESULT texture_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)
{
@@ -1655,13 +1712,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -1757,13 +1814,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
struct wined3d_texture_sub_resource *sub_resource;
struct wined3d_device *device = resource->device;
unsigned int fmt_flags = resource->format_flags;
@ -197,7 +197,7 @@ index debafc4..e239282 100644
TRACE("resource %p, sub_resource_idx %u, map_desc %p, box %s, flags %#x.\n",
resource, sub_resource_idx, map_desc, debug_box(box), flags);
@@ -1706,54 +1759,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -1808,53 +1861,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
return WINED3DERR_INVALIDCALL;
}
@ -228,8 +228,7 @@ index debafc4..e239282 100644
- {
- if (resource->usage & WINED3DUSAGE_DYNAMIC)
- WARN_(d3d_perf)("Mapping a dynamic texture without WINED3D_MAP_DISCARD.\n");
- ret = wined3d_texture_load_location(texture,
- sub_resource_idx, context, texture->resource.map_binding);
- ret = wined3d_texture_load_location(texture, sub_resource_idx, context, texture->resource.map_binding);
- }
-
- if (!ret)
@ -253,7 +252,7 @@ index debafc4..e239282 100644
if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
{
@@ -1789,17 +1797,6 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -1890,17 +1899,6 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
}
}
@ -271,7 +270,7 @@ index debafc4..e239282 100644
++resource->map_count;
++sub_resource->map_count;
@@ -1809,14 +1806,38 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -1910,14 +1908,38 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
return WINED3D_OK;
}
@ -314,7 +313,7 @@ index debafc4..e239282 100644
TRACE("resource %p, sub_resource_idx %u.\n", resource, sub_resource_idx);
@@ -1832,27 +1853,7 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
@@ -1933,27 +1955,7 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
return WINEDDERR_NOTLOCKED;
}
@ -344,28 +343,28 @@ index debafc4..e239282 100644
--sub_resource->map_count;
if (!--resource->map_count && texture->update_map_binding)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 426c10d..ed0eabc 100644
index 924c8aa..64b874f 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2769,6 +2769,8 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
@@ -2784,6 +2784,8 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
BOOL wined3d_texture_load_location(struct wined3d_texture *texture, unsigned int sub_resource_idx,
struct wined3d_context *context, DWORD location);
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
+void *wined3d_texture_map_internal(struct wined3d_texture *texture, unsigned int sub_resource_idx,
+ DWORD flags) DECLSPEC_HIDDEN;
void wined3d_texture_prepare_texture(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
void wined3d_texture_set_map_binding(struct wined3d_texture *texture, DWORD map_binding) DECLSPEC_HIDDEN;
@@ -2776,6 +2778,8 @@ void wined3d_texture_set_swapchain(struct wined3d_texture *texture,
@@ -2791,6 +2793,8 @@ void wined3d_texture_set_swapchain(struct wined3d_texture *texture,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void wined3d_texture_unmap_bo_address(const struct wined3d_bo_address *data,
const struct wined3d_gl_info *gl_info, GLenum binding) DECLSPEC_HIDDEN;
+void wined3d_texture_unmap_internal(struct wined3d_texture *texture,
+ unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
void wined3d_texture_validate_location(struct wined3d_texture *texture,
unsigned int sub_resource_idx, DWORD location) DECLSPEC_HIDDEN;
@@ -3134,6 +3138,10 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx,
const struct wined3d_context *context, const struct wined3d_const_bo_address *data,
unsigned int row_pitch, unsigned int slice_pitch) DECLSPEC_HIDDEN;
@@ -3143,6 +3147,10 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil,
const struct blit_shader *blitter) DECLSPEC_HIDDEN;
@ -377,5 +376,5 @@ index 426c10d..ed0eabc 100644
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From 50cab9c747626e21eb7e80343da79a9004a1b505 Mon Sep 17 00:00:00 2001
From 614b05bd7947d8178fbdf3193641c3675608dbc8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 1 Aug 2013 00:33:48 +0200
Subject: wined3d: Send update_texture calls through the CS
@ -11,7 +11,7 @@ FIXME: This logic duplication is ugly.
3 files changed, 137 insertions(+), 82 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 67e2c13..8e56772 100644
index b056e22..4611f41 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -72,6 +72,7 @@ enum wined3d_cs_op
@ -76,7 +76,7 @@ index 67e2c13..8e56772 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index d458747..99118f2 100644
index 1735f85..de927cc 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3558,34 +3558,17 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
@ -130,7 +130,7 @@ index d458747..99118f2 100644
data.buffer_object = 0;
data.addr = src.data;
wined3d_volume_upload_data(dst_texture, i, context, &data);
wined3d_texture_upload_data(dst_texture, i, context, &data, src.row_pitch, src.slice_pitch);
wined3d_texture_invalidate_location(dst_texture, i, ~WINED3D_LOCATION_TEXTURE_RGB);
- if (FAILED(hr = wined3d_resource_unmap(&src_texture->resource, src_level + i)))
@ -319,7 +319,7 @@ index d458747..99118f2 100644
HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index cdcf620..75f2983 100644
index 06fe9cb..e468abb 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2533,6 +2533,8 @@ void device_resource_add(struct wined3d_device *device, struct wined3d_resource
@ -331,7 +331,7 @@ index cdcf620..75f2983 100644
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -3153,6 +3155,8 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
@@ -3156,6 +3158,8 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;

View File

@ -1,4 +1,4 @@
From ef69918c044a527e154a919c829076bc19689925 Mon Sep 17 00:00:00 2001
From 1feae0a25e88a0f7f7c51f1cd2f9484e0927f558 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 29 Aug 2013 22:25:14 +0200
Subject: wined3d: Don't lock the src volume in device_update_volume
@ -13,24 +13,25 @@ FIXME 2: Loading the src location might be nice, or even better,
responding to unexpected src locs. In theory it should be in SYSMEM
since its a sysmem texture.
---
dlls/wined3d/device.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
dlls/wined3d/device.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 955f061..12e87e1 100644
index de927cc..896e7a1 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3496,8 +3496,7 @@ static void wined3d_device_update_texture_3d(struct wined3d_context *context,
@@ -3563,8 +3563,8 @@ static void wined3d_device_update_texture_3d(struct wined3d_context *context,
struct wined3d_texture *src_texture, unsigned int src_level,
struct wined3d_texture *dst_texture, unsigned int level_count)
{
- struct wined3d_const_bo_address data;
- struct wined3d_map_desc src;
+ unsigned int row_pitch, slice_pitch;
+ struct wined3d_bo_address data;
unsigned int i;
TRACE("context %p, src_texture %p, src_level %u, dst_texture %p, level_count %u.\n",
@@ -3509,17 +3508,11 @@ static void wined3d_device_update_texture_3d(struct wined3d_context *context,
@@ -3576,17 +3576,13 @@ static void wined3d_device_update_texture_3d(struct wined3d_context *context,
for (i = 0; i < level_count; ++i)
{
@ -39,11 +40,13 @@ index 955f061..12e87e1 100644
- return;
+ wined3d_texture_get_memory(src_texture, src_level + i, &data,
+ src_texture->resource.map_binding);
+ wined3d_texture_get_pitch(src_texture, src_level + i, &row_pitch, &slice_pitch);
- data.buffer_object = 0;
- data.addr = src.data;
- wined3d_volume_upload_data(dst_texture, i, context, &data);
+ wined3d_volume_upload_data(dst_texture, i, context, wined3d_const_bo_address(&data));
- wined3d_texture_upload_data(dst_texture, i, context, &data, src.row_pitch, src.slice_pitch);
+ wined3d_texture_upload_data(dst_texture, i, context, wined3d_const_bo_address(&data),
+ row_pitch, slice_pitch);
wined3d_texture_invalidate_location(dst_texture, i, ~WINED3D_LOCATION_TEXTURE_RGB);
-
- if (FAILED(wined3d_resource_unmap(&src_texture->resource, src_level + i)))
@ -52,5 +55,5 @@ index 955f061..12e87e1 100644
}
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From e8dd35793f2b32afab25f6acd46422aac1aa69d6 Mon Sep 17 00:00:00 2001
From ef8df8ff00cb4cc235b01ee452f806824ef00b3a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Fri, 30 Aug 2013 17:00:35 +0200
Subject: wined3d: Wrap GL BOs in a structure
@ -13,10 +13,10 @@ them for DISCARD maps.
4 files changed, 91 insertions(+), 32 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 0b393ca..cf60d3d 100644
index 5562b31..928fcda 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -5267,3 +5267,56 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
@@ -5270,3 +5270,56 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
else
return CallWindowProcA(proc, window, message, wparam, lparam);
}
@ -87,7 +87,7 @@ index 444237e..46f79db 100644
TRACE("Removing the pbo attached to surface %p.\n", surface);
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index fffc2e1..102f022 100644
index d98503d..d0acd74 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -206,7 +206,7 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
@ -204,7 +204,7 @@ index fffc2e1..102f022 100644
return TRUE;
case WINED3D_LOCATION_TEXTURE_RGB:
@@ -1620,8 +1613,8 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
@@ -1592,8 +1585,8 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
wined3d_texture_invalidate_location(texture, i, ~WINED3D_LOCATION_DISCARDED);
}
@ -215,7 +215,7 @@ index fffc2e1..102f022 100644
if (resource->type == WINED3D_RTYPE_TEXTURE_2D)
{
@@ -2214,7 +2207,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
@@ -2188,7 +2181,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
}
else if (sub_resource->locations & WINED3D_LOCATION_BUFFER)
{
@ -223,8 +223,8 @@ index fffc2e1..102f022 100644
+ struct wined3d_const_bo_address data = {sub_resource->buffer->name, NULL};
wined3d_texture_bind_and_dirtify(texture, context,
location == WINED3D_LOCATION_TEXTURE_SRGB);
wined3d_volume_upload_data(texture, sub_resource_idx, context, &data);
@@ -2259,7 +2252,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
wined3d_texture_get_pitch(texture, sub_resource_idx, &row_pitch, &slice_pitch);
@@ -2234,7 +2227,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
case WINED3D_LOCATION_BUFFER:
if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
{
@ -234,10 +234,10 @@ index fffc2e1..102f022 100644
if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB)
wined3d_texture_bind_and_dirtify(texture, context, FALSE);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 66a1061..b89b7d7 100644
index f84b267..76be9c5 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2426,6 +2426,14 @@ struct wined3d_state
@@ -2427,6 +2427,14 @@ struct wined3d_state
struct wined3d_rasterizer_state *rasterizer_state;
};
@ -252,7 +252,7 @@ index 66a1061..b89b7d7 100644
#define WINED3D_UNMAPPED_STAGE ~0U
/* Multithreaded flag. Removed from the public header to signal that
@@ -2534,6 +2542,11 @@ void device_invalidate_state(const struct wined3d_device *device, DWORD state) D
@@ -2535,6 +2543,11 @@ void device_invalidate_state(const struct wined3d_device *device, DWORD state) D
void device_invalidate_shader_constants(const struct wined3d_device *device, DWORD mask) DECLSPEC_HIDDEN;
void device_exec_update_texture(struct wined3d_context *context, struct wined3d_texture *src_texture,
struct wined3d_texture *dst_texture) DECLSPEC_HIDDEN;
@ -264,7 +264,7 @@ index 66a1061..b89b7d7 100644
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -2721,7 +2734,7 @@ struct wined3d_texture
@@ -2722,7 +2735,7 @@ struct wined3d_texture
unsigned int map_count;
DWORD locations;

View File

@ -1,4 +1,4 @@
From 309cfa9faf4718572d8720468b11c386f69b6e82 Mon Sep 17 00:00:00 2001
From 9feb9ed51972175002f84d899915fe57a82d509d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Fri, 30 Aug 2013 17:06:29 +0200
Subject: wined3d: Separate resource map and draw buffers
@ -11,20 +11,20 @@ Subject: wined3d: Separate resource map and draw buffers
4 files changed, 34 insertions(+), 20 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 62d64f6..47bd8c9 100644
index 928fcda..92f9034 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3509,7 +3509,7 @@ static void wined3d_device_update_texture_3d(struct wined3d_context *context,
@@ -3577,7 +3577,7 @@ static void wined3d_device_update_texture_3d(struct wined3d_context *context,
for (i = 0; i < level_count; ++i)
{
wined3d_texture_get_memory(src_texture, src_level + i, &data,
- src_texture->resource.map_binding);
+ src_texture->resource.map_binding, FALSE);
wined3d_texture_get_pitch(src_texture, src_level + i, &row_pitch, &slice_pitch);
wined3d_volume_upload_data(dst_texture, i, context, wined3d_const_bo_address(&data));
wined3d_texture_invalidate_location(dst_texture, i, ~WINED3D_LOCATION_TEXTURE_RGB);
wined3d_texture_upload_data(dst_texture, i, context, wined3d_const_bo_address(&data),
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 9fbd0db..465710f 100644
index 46f79db..4b2cdad 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -324,7 +324,7 @@ void wined3d_surface_destroy_dc(struct wined3d_surface *surface)
@ -45,7 +45,7 @@ index 9fbd0db..465710f 100644
desc.pMemory = wined3d_texture_map_bo_address(&data, texture->sub_resources[sub_resource_idx].size,
gl_info, GL_PIXEL_UNPACK_BUFFER, 0);
@@ -812,7 +812,7 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
@@ -808,7 +808,7 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
}
}
@ -54,7 +54,7 @@ index 9fbd0db..465710f 100644
if (texture->flags & WINED3D_TEXTURE_COND_NP2_EMULATED)
{
@@ -1214,7 +1214,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -1210,7 +1210,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
wined3d_texture_bind_and_dirtify(dst_texture, context, FALSE);
wined3d_texture_get_memory(src_texture, src_sub_resource_idx, &data,
@ -63,7 +63,7 @@ index 9fbd0db..465710f 100644
wined3d_texture_get_pitch(src_texture, src_surface->texture_level, &src_row_pitch, &src_slice_pitch);
wined3d_surface_upload_data(dst_surface, gl_info, src_format, src_rect,
@@ -1609,7 +1609,7 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr
@@ -1758,7 +1758,7 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr
wined3d_texture_load_location(src_texture, sub_resource_idx, context,
src_texture->resource.map_binding);
wined3d_texture_get_memory(src_texture, sub_resource_idx, &src_bo_addr,
@ -72,7 +72,7 @@ index 9fbd0db..465710f 100644
src_data = wined3d_texture_map_bo_address(&src_bo_addr,
src_texture->sub_resources[sub_resource_idx].size,
context->gl_info, GL_PIXEL_UNPACK_BUFFER, WINED3D_MAP_READONLY);
@@ -1622,7 +1622,7 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr
@@ -1771,7 +1771,7 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr
wined3d_texture_prepare_location(dst_texture, 0, context, dst_texture->resource.map_binding);
wined3d_texture_get_memory(dst_texture, 0, &dst_bo_addr,
@ -81,7 +81,7 @@ index 9fbd0db..465710f 100644
dst_data = wined3d_texture_map_bo_address(&dst_bo_addr,
dst_texture->sub_resources[0].size,
context->gl_info, GL_PIXEL_UNPACK_BUFFER, 0);
@@ -1751,7 +1751,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
@@ -1900,7 +1900,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
BOOL srcIsUpsideDown;
struct wined3d_bo_address data;
@ -90,7 +90,7 @@ index 9fbd0db..465710f 100644
restore_rt = context_get_rt_surface(old_ctx);
if (restore_rt != surface)
@@ -2941,7 +2941,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -3088,7 +3088,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
wined3d_texture_set_map_binding(texture, WINED3D_LOCATION_SYSMEM);
}
@ -99,7 +99,7 @@ index 9fbd0db..465710f 100644
if (format.convert)
{
/* This code is entered for texture formats which need a fixup. */
@@ -3432,7 +3432,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
@@ -3579,7 +3579,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
same_sub_resource = TRUE;
wined3d_texture_get_memory(dst_texture, dst_sub_resource_idx, &dst_bo_addr,
@ -108,7 +108,7 @@ index 9fbd0db..465710f 100644
dst_map.data = wined3d_texture_map_bo_address(&dst_bo_addr,
dst_texture->sub_resources[dst_sub_resource_idx].size,
context->gl_info, GL_PIXEL_UNPACK_BUFFER, 0);
@@ -3468,7 +3468,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
@@ -3615,7 +3615,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
wined3d_texture_get_pitch(src_texture, src_sub_resource_idx % src_texture->level_count,
&src_map.row_pitch, &src_map.slice_pitch);
wined3d_texture_get_memory(src_texture, src_sub_resource_idx, &src_bo_addr,
@ -117,7 +117,7 @@ index 9fbd0db..465710f 100644
src_map.data = wined3d_texture_map_bo_address(&src_bo_addr,
src_texture->sub_resources[src_sub_resource_idx].size,
context->gl_info, GL_PIXEL_UNPACK_BUFFER, 0);
@@ -3483,7 +3483,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
@@ -3630,7 +3630,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
}
wined3d_texture_get_memory(dst_texture, dst_sub_resource_idx, &dst_bo_addr,
@ -127,10 +127,22 @@ index 9fbd0db..465710f 100644
dst_texture->sub_resources[dst_sub_resource_idx].size,
context->gl_info, GL_PIXEL_UNPACK_BUFFER, 0);
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index bd415eb..ad4e93f 100644
index afb1738..729863c 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -181,7 +181,7 @@ void wined3d_texture_unmap_bo_address(const struct wined3d_bo_address *data,
@@ -163,9 +163,9 @@ static BOOL wined3d_texture_copy_sysmem_location(struct wined3d_texture *texture
wined3d_texture_prepare_location(texture, sub_resource_idx, context, location);
- wined3d_texture_get_memory(texture, sub_resource_idx, &dst, location);
+ wined3d_texture_get_memory(texture, sub_resource_idx, &dst, location, FALSE);
wined3d_texture_get_memory(texture, sub_resource_idx, &src,
- texture->sub_resources[sub_resource_idx].locations);
+ texture->sub_resources[sub_resource_idx].locations, FALSE);
if (dst.buffer_object)
{
@@ -326,7 +326,7 @@ void wined3d_texture_unmap_bo_address(const struct wined3d_bo_address *data,
}
void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int sub_resource_idx,
@ -139,7 +151,7 @@ index bd415eb..ad4e93f 100644
{
struct wined3d_texture_sub_resource *sub_resource;
@@ -192,7 +192,10 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
@@ -337,7 +337,10 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
if (locations & WINED3D_LOCATION_BUFFER)
{
data->addr = NULL;
@ -151,7 +163,7 @@ index bd415eb..ad4e93f 100644
return;
}
if (locations & WINED3D_LOCATION_USER_MEMORY)
@@ -294,8 +297,13 @@ static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture
@@ -439,8 +442,13 @@ static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture
struct wined3d_gl_bo *buffer = texture->sub_resources[sub_resource_idx].buffer;
GLuint name = buffer->name;
@ -165,7 +177,7 @@ index bd415eb..ad4e93f 100644
wined3d_texture_invalidate_location(texture, sub_resource_idx, WINED3D_LOCATION_BUFFER);
TRACE("Deleted buffer object %u for texture %p, sub-resource %u.\n",
@@ -405,6 +413,10 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
@@ -628,6 +636,10 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
for (i = 0; i < sub_count; ++i)
{
@ -176,7 +188,7 @@ index bd415eb..ad4e93f 100644
if (!(buffer = texture->sub_resources[i].buffer))
continue;
@@ -417,6 +429,7 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
@@ -640,6 +652,7 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
wined3d_device_release_bo(device, buffer, context);
texture->sub_resources[i].buffer = NULL;
@ -184,7 +196,7 @@ index bd415eb..ad4e93f 100644
}
if (context)
context_release(context);
@@ -1090,6 +1103,7 @@ static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *textur
@@ -1322,6 +1335,7 @@ static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *textur
sub_resource->buffer = wined3d_device_get_bo(texture->resource.device,
sub_resource->size, GL_STREAM_DRAW, GL_PIXEL_UNPACK_BUFFER, context);
@ -192,7 +204,7 @@ index bd415eb..ad4e93f 100644
TRACE("Created buffer object %u for texture %p, sub-resource %u.\n",
sub_resource->buffer->name, texture, sub_resource_idx);
@@ -1609,7 +1623,7 @@ void *wined3d_texture_map_internal(struct wined3d_texture *texture, unsigned int
@@ -1779,7 +1793,7 @@ void *wined3d_texture_map_internal(struct wined3d_texture *texture, unsigned int
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
sub_resource->unmap_dirtify = TRUE;
@ -201,7 +213,7 @@ index bd415eb..ad4e93f 100644
data = wined3d_texture_map_bo_address(&bo_data, sub_resource->size,
context->gl_info, GL_PIXEL_UNPACK_BUFFER, flags);
@@ -1743,7 +1757,7 @@ void wined3d_texture_unmap_internal(struct wined3d_texture *texture, unsigned in
@@ -1913,7 +1927,7 @@ void wined3d_texture_unmap_internal(struct wined3d_texture *texture, unsigned in
if (texture->resource.device->d3d_initialized)
context = context_acquire(texture->resource.device, NULL);
@ -210,23 +222,11 @@ index bd415eb..ad4e93f 100644
wined3d_texture_unmap_bo_address(&data, context->gl_info, GL_PIXEL_UNPACK_BUFFER);
if (context)
@@ -2682,9 +2696,9 @@ static BOOL wined3d_texture_copy_sysmem_location(struct wined3d_texture *texture
wined3d_texture_prepare_location(texture, sub_resource_idx, context, location);
- wined3d_texture_get_memory(texture, sub_resource_idx, &dst, location);
+ wined3d_texture_get_memory(texture, sub_resource_idx, &dst, location, FALSE);
wined3d_texture_get_memory(texture, sub_resource_idx, &src,
- texture->sub_resources[sub_resource_idx].locations);
+ texture->sub_resources[sub_resource_idx].locations, FALSE);
if (dst.buffer_object)
{
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 55b96ee..611b8b0 100644
index c56e454..cbcb923 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2573,7 +2573,7 @@ struct wined3d_texture
@@ -2735,7 +2735,7 @@ struct wined3d_texture
unsigned int map_count;
DWORD locations;
@ -235,7 +235,7 @@ index 55b96ee..611b8b0 100644
BOOL unmap_dirtify;
} sub_resources[1];
};
@@ -2631,7 +2631,7 @@ BOOL wined3d_texture_check_block_align(const struct wined3d_texture *texture,
@@ -2793,7 +2793,7 @@ BOOL wined3d_texture_check_block_align(const struct wined3d_texture *texture,
unsigned int level, const struct wined3d_box *box) DECLSPEC_HIDDEN;
GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture) DECLSPEC_HIDDEN;
void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int sub_resource_idx,
@ -245,5 +245,5 @@ index 55b96ee..611b8b0 100644
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
void wined3d_texture_invalidate_location(struct wined3d_texture *texture,
--
2.8.0
2.9.0

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
From b8c44cd1d2f029251cf05c9620b4cdc52b1e43fd Mon Sep 17 00:00:00 2001
From 0a7d13f672cea0839dade4d06a332c024bea9a24 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 21 Mar 2016 18:27:59 +0100
Subject: wined3d: Silence extremely noisy FIXME in
@ -9,10 +9,10 @@ Subject: wined3d: Silence extremely noisy FIXME in
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index c8a7695..33b2204 100644
index 1f0a97a..2d8df58 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1230,7 +1230,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
@@ -1418,7 +1418,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
sub_resource_idx = layer * texture->level_count;
if (dirty_region)
@ -20,7 +20,7 @@ index c8a7695..33b2204 100644
+ WARN("Ignoring dirty_region %s.\n", debug_box(dirty_region));
context = context_acquire(texture->resource.device, NULL);
if (!texture->texture_ops->texture_load_location(texture, sub_resource_idx,
if (!wined3d_texture_load_location(texture, sub_resource_idx, context, texture->resource.map_binding))
--
2.7.1
2.9.0