mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against 714abcb7cdd8cab7d9383bded5b5426e55d98791.
This commit is contained in:
parent
995b761dee
commit
a6f687dcc9
@ -182,7 +182,7 @@ for more details.*
|
||||
* Fix wrong version of ID3DXEffect interface for d3dx9_24
|
||||
* Fix wrong version of ID3DXEffect interface for d3dx9_25 ([Wine Bug #25138](https://bugs.winehq.org/show_bug.cgi?id=25138))
|
||||
* Free RPC parameters allocated by application before anything else ([Wine Bug #36743](https://bugs.winehq.org/show_bug.cgi?id=36743))
|
||||
* Games For Windows Live 1.x expects a valid linker version in the PE header ([Wine Bug #28768](https://bugs.winehq.org/show_bug.cgi?id=28768))
|
||||
* ~~Games For Windows Live 1.x expects a valid linker version in the PE header~~ ([Wine Bug #28768](https://bugs.winehq.org/show_bug.cgi?id=28768))
|
||||
* GetMessage should remove already seen messages with higher priority ([Wine Bug #28884](https://bugs.winehq.org/show_bug.cgi?id=28884))
|
||||
* GetMonitorInfo returns the same name for all monitors ([Wine Bug #37709](https://bugs.winehq.org/show_bug.cgi?id=37709))
|
||||
* GetSecurityInfo returns NULL DACL for process object ([Wine Bug #15980](https://bugs.winehq.org/show_bug.cgi?id=15980))
|
||||
@ -241,7 +241,7 @@ for more details.*
|
||||
* Return correct values for GetThreadTimes function ([Wine Bug #20230](https://bugs.winehq.org/show_bug.cgi?id=20230))
|
||||
* Return default palette entries from GetSystemPaletteEntries for non-palette-based devices
|
||||
* Return fake device type when systemroot is located on virtual disk ([Wine Bug #36546](https://bugs.winehq.org/show_bug.cgi?id=36546))
|
||||
* Revert patch which causes broken rendering in various games ([Wine Bug #38654](https://bugs.winehq.org/show_bug.cgi?id=38654))
|
||||
* ~~Revert patch which causes broken rendering in various games~~ ([Wine Bug #38654](https://bugs.winehq.org/show_bug.cgi?id=38654))
|
||||
* SO_CONNECT_TIME returns the appropriate time
|
||||
* Scrolling causes mouse and screen to lock in Call to Power II ([Wine Bug #34559](https://bugs.winehq.org/show_bug.cgi?id=34559))
|
||||
* Send WM_PAINT event during dialog creation ([Wine Bug #35652](https://bugs.winehq.org/show_bug.cgi?id=35652))
|
||||
|
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -54,6 +54,10 @@ wine-staging (1.7.45) UNRELEASED; urgency=low
|
||||
(accepted upstream).
|
||||
* Removed patch to fix handling of periodic advice timers causing high CPU
|
||||
usage (accepted upstream).
|
||||
* Removed revert path to fix broken rendering in various games (fixed
|
||||
upstream).
|
||||
* Removed patch to set a valid linker version in winebuild (accepted
|
||||
upstream).
|
||||
-- Sebastian Lackner <sebastian@fds-team.de> Sun, 31 May 2015 14:46:37 +0200
|
||||
|
||||
wine-staging (1.7.44) unstable; urgency=low
|
||||
|
@ -1,15 +1,15 @@
|
||||
From 431cbd6d947169761c8768b23f0c804be67229f3 Mon Sep 17 00:00:00 2001
|
||||
From 662f5dfa5e3f4de2106b5abbe47b069fa580b94a Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Mon, 2 Dec 2013 12:18:58 +0900
|
||||
Date: Thu, 11 Jun 2015 15:32:36 +0200
|
||||
Subject: gdiplus: Implement GdipCreateRegionRgnData. Take 3.
|
||||
|
||||
---
|
||||
dlls/gdiplus/region.c | 258 ++++++++++++++++++++++++++++++++++++++++----
|
||||
dlls/gdiplus/tests/region.c | 65 +++++++++++
|
||||
2 files changed, 304 insertions(+), 19 deletions(-)
|
||||
dlls/gdiplus/region.c | 249 ++++++++++++++++++++++++++++++++++++--------
|
||||
dlls/gdiplus/tests/region.c | 65 ++++++++++++
|
||||
2 files changed, 273 insertions(+), 41 deletions(-)
|
||||
|
||||
diff --git a/dlls/gdiplus/region.c b/dlls/gdiplus/region.c
|
||||
index 4ba86eb..450105f 100644
|
||||
index 572df62..a3b526e 100644
|
||||
--- a/dlls/gdiplus/region.c
|
||||
+++ b/dlls/gdiplus/region.c
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -48,17 +48,57 @@ index 4ba86eb..450105f 100644
|
||||
/* Header size as far as header->size is concerned. This doesn't include
|
||||
* header->size or header->checksum
|
||||
*/
|
||||
@@ -522,12 +545,221 @@ GpStatus WINGDIPAPI GdipCreateRegionRectI(GDIPCONST GpRect *rect,
|
||||
return GdipCreateRegionRect(&rectf, region);
|
||||
@@ -729,15 +752,9 @@ static void write_element(const region_element* element, DWORD *buffer,
|
||||
{
|
||||
INT i;
|
||||
const GpPath* path = element->elementdata.path;
|
||||
- struct _pathheader
|
||||
- {
|
||||
- DWORD size;
|
||||
- DWORD magic;
|
||||
- DWORD count;
|
||||
- DWORD flags;
|
||||
- } *pathheader;
|
||||
+ struct path_header *pathheader;
|
||||
|
||||
- pathheader = (struct _pathheader *)(buffer + *filled);
|
||||
+ pathheader = (struct path_header *)(buffer + *filled);
|
||||
|
||||
pathheader->flags = is_integer_path(path) ? FLAGS_INTPATH : FLAGS_NOFLAGS;
|
||||
/* 3 for headers, once again size doesn't count itself */
|
||||
@@ -778,14 +795,6 @@ static void write_element(const region_element* element, DWORD *buffer,
|
||||
}
|
||||
}
|
||||
|
||||
-struct region_header
|
||||
-{
|
||||
- DWORD size;
|
||||
- DWORD checksum;
|
||||
- DWORD magic;
|
||||
- DWORD num_children;
|
||||
-};
|
||||
-
|
||||
/*****************************************************************************
|
||||
* GdipGetRegionData [GDIPLUS.@]
|
||||
*
|
||||
@@ -856,36 +865,190 @@ GpStatus WINGDIPAPI GdipGetRegionData(GpRegion *region, BYTE *buffer, UINT size,
|
||||
return Ok;
|
||||
}
|
||||
|
||||
-static inline GpStatus read_dword(DWORD **buffer, INT *size, DWORD *ret)
|
||||
+static inline void init_memory_buffer(struct memory_buffer *mbuf, const BYTE *buffer, INT size)
|
||||
+{
|
||||
{
|
||||
- if (*size < sizeof(DWORD))
|
||||
- return GenericError;
|
||||
+ mbuf->buffer = buffer;
|
||||
+ mbuf->size = size;
|
||||
+ mbuf->pos = 0;
|
||||
+}
|
||||
+
|
||||
|
||||
- *ret = **buffer;
|
||||
- (*buffer)++;
|
||||
- (*size) -= sizeof(DWORD);
|
||||
- return Ok;
|
||||
+static inline const void *buffer_read(struct memory_buffer *mbuf, INT size)
|
||||
+{
|
||||
+ if (mbuf->size - mbuf->pos >= size)
|
||||
@ -68,13 +108,16 @@ index 4ba86eb..450105f 100644
|
||||
+ return data;
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
}
|
||||
|
||||
-static GpStatus read_element(GpRegion *region, region_element *element, DWORD **buffer, INT *size)
|
||||
+static GpStatus read_element(struct memory_buffer *mbuf, GpRegion *region, region_element *node, INT *count)
|
||||
+{
|
||||
+ GpStatus status;
|
||||
{
|
||||
GpStatus status;
|
||||
+ const DWORD *type;
|
||||
+
|
||||
|
||||
- status = read_dword(buffer, size, &element->type);
|
||||
- if (status != Ok)
|
||||
+ type = buffer_read(mbuf, sizeof(DWORD));
|
||||
+ if (!type) return Ok;
|
||||
+
|
||||
@ -117,11 +160,13 @@ index 4ba86eb..450105f 100644
|
||||
+
|
||||
+ GdipFree(left);
|
||||
+ GdipFree(right);
|
||||
+ return status;
|
||||
return status;
|
||||
+ }
|
||||
+
|
||||
|
||||
- switch (element->type)
|
||||
+ case RegionDataRect:
|
||||
+ {
|
||||
{
|
||||
- case RegionDataInfiniteRect:
|
||||
+ const GpRectF *rc;
|
||||
+
|
||||
+ rc = buffer_read(mbuf, sizeof(GpRectF));
|
||||
@ -225,98 +270,68 @@ index 4ba86eb..450105f 100644
|
||||
+ return Ok;
|
||||
+ }
|
||||
+
|
||||
+ case RegionDataEmptyRect:
|
||||
case RegionDataEmptyRect:
|
||||
- break;
|
||||
+ case RegionDataInfiniteRect:
|
||||
+ *count += 1;
|
||||
+ return Ok;
|
||||
+
|
||||
+ default:
|
||||
default:
|
||||
- FIXME("region element type 0x%08x not supported\n", element->type);
|
||||
- return NotImplemented;
|
||||
+ FIXME("element type %#x is not supported\n", *type);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
- return Ok;
|
||||
+ return InvalidParameter;
|
||||
+}
|
||||
+
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
@@ -893,28 +1056,32 @@ static GpStatus read_element(GpRegion *region, region_element *element, DWORD **
|
||||
*/
|
||||
GpStatus WINGDIPAPI GdipCreateRegionRgnData(GDIPCONST BYTE *data, INT size, GpRegion **region)
|
||||
{
|
||||
- FIXME("(%p, %d, %p): stub\n", data, size, region);
|
||||
+ GpStatus status;
|
||||
+ struct memory_buffer mbuf;
|
||||
- struct region_header *region_header;
|
||||
- DWORD *buffer = (DWORD*)data;
|
||||
+ const struct region_header *region_header;
|
||||
+ struct memory_buffer mbuf;
|
||||
GpStatus status;
|
||||
+ INT count;
|
||||
|
||||
- *region = NULL;
|
||||
- return NotImplemented;
|
||||
+ if (!data || !size) return InvalidParameter;
|
||||
+
|
||||
+ TRACE("%p, %d, %p\n", data, size, region);
|
||||
+
|
||||
TRACE("(%p, %d, %p)\n", data, size, region);
|
||||
|
||||
- if (!data || size < sizeof(*region_header) || !region)
|
||||
+ if (!data || !size)
|
||||
return InvalidParameter;
|
||||
|
||||
- region_header = (struct region_header *)buffer;
|
||||
- if (region_header->magic != VERSION_MAGIC && region_header->magic != VERSION_MAGIC2)
|
||||
+ init_memory_buffer(&mbuf, data, size);
|
||||
+
|
||||
+ region_header = buffer_read(&mbuf, sizeof(struct region_header));
|
||||
+ if (!region_header || region_header->magic != VERSION_MAGIC)
|
||||
+ return InvalidParameter;
|
||||
+
|
||||
+ status = GdipCreateRegion(region);
|
||||
+ if (status != Ok) return status;
|
||||
+
|
||||
+ if (!region_header || (region_header->magic != VERSION_MAGIC &&
|
||||
+ region_header->magic != VERSION_MAGIC2))
|
||||
return InvalidParameter;
|
||||
|
||||
status = GdipCreateRegion(region);
|
||||
if (status != Ok)
|
||||
return status;
|
||||
|
||||
- /* skip header */
|
||||
- buffer += 4;
|
||||
- size -= sizeof(*region_header);
|
||||
+ count = 0;
|
||||
+ status = read_element(&mbuf, *region, &(*region)->node, &count);
|
||||
+ if (status == Ok && !count)
|
||||
+ status = InvalidParameter;
|
||||
+
|
||||
+ if (status != Ok)
|
||||
+ GdipDeleteRegion(*region);
|
||||
+
|
||||
+ return status;
|
||||
}
|
||||
|
||||
|
||||
@@ -738,15 +970,9 @@ static void write_element(const region_element* element, DWORD *buffer,
|
||||
{
|
||||
INT i;
|
||||
const GpPath* path = element->elementdata.path;
|
||||
- struct _pathheader
|
||||
- {
|
||||
- DWORD size;
|
||||
- DWORD magic;
|
||||
- DWORD count;
|
||||
- DWORD flags;
|
||||
- } *pathheader;
|
||||
+ struct path_header *pathheader;
|
||||
|
||||
- pathheader = (struct _pathheader *)(buffer + *filled);
|
||||
+ pathheader = (struct path_header *)(buffer + *filled);
|
||||
|
||||
pathheader->flags = is_integer_path(path) ? FLAGS_INTPATH : FLAGS_NOFLAGS;
|
||||
/* 3 for headers, once again size doesn't count itself */
|
||||
@@ -823,13 +1049,7 @@ static void write_element(const region_element* element, DWORD *buffer,
|
||||
GpStatus WINGDIPAPI GdipGetRegionData(GpRegion *region, BYTE *buffer, UINT size,
|
||||
UINT *needed)
|
||||
{
|
||||
- struct _region_header
|
||||
- {
|
||||
- DWORD size;
|
||||
- DWORD checksum;
|
||||
- DWORD magic;
|
||||
- DWORD num_children;
|
||||
- } *region_header;
|
||||
+ struct region_header *region_header;
|
||||
INT filled = 0;
|
||||
UINT required;
|
||||
GpStatus status;
|
||||
@@ -847,7 +1067,7 @@ GpStatus WINGDIPAPI GdipGetRegionData(GpRegion *region, BYTE *buffer, UINT size,
|
||||
return InsufficientBuffer;
|
||||
}
|
||||
|
||||
- region_header = (struct _region_header *)buffer;
|
||||
+ region_header = (struct region_header *)buffer;
|
||||
region_header->size = sizeheader_size + get_element_size(®ion->node);
|
||||
region_header->checksum = 0;
|
||||
region_header->magic = VERSION_MAGIC;
|
||||
- status = read_element(*region, &(*region)->node, &buffer, &size);
|
||||
if (status != Ok)
|
||||
{
|
||||
GdipDeleteRegion(*region);
|
||||
diff --git a/dlls/gdiplus/tests/region.c b/dlls/gdiplus/tests/region.c
|
||||
index 5632e4d..a718a5c 100644
|
||||
index 92569c7..0c70ccd 100644
|
||||
--- a/dlls/gdiplus/tests/region.c
|
||||
+++ b/dlls/gdiplus/tests/region.c
|
||||
@@ -102,6 +102,56 @@ static void verify_region(HRGN hrgn, const RECT *rc)
|
||||
@ -497,5 +512,5 @@ index 5632e4d..a718a5c 100644
|
||||
status = GdipDeletePath(path);
|
||||
expect(Ok, status);
|
||||
--
|
||||
2.1.2
|
||||
2.4.2
|
||||
|
||||
|
@ -55,7 +55,7 @@ version()
|
||||
echo "Copyright (C) 2014-2015 the Wine Staging project authors."
|
||||
echo ""
|
||||
echo "Patchset to be applied on upstream Wine:"
|
||||
echo " commit 42cbc05e59d32228f4edd171ca66e4cbe5645d1d"
|
||||
echo " commit 714abcb7cdd8cab7d9383bded5b5426e55d98791"
|
||||
echo ""
|
||||
}
|
||||
|
||||
@ -256,7 +256,6 @@ patch_enable_all ()
|
||||
enable_wineboot_HKEY_DYN_DATA="$1"
|
||||
enable_wineboot_MachineGuid="$1"
|
||||
enable_wineboot_drivers_etc_Stubs="$1"
|
||||
enable_winebuild_LinkerVersion="$1"
|
||||
enable_winecfg_Libraries="$1"
|
||||
enable_winecfg_Staging="$1"
|
||||
enable_winecfg_Unmounted_Devices="$1"
|
||||
@ -266,7 +265,6 @@ patch_enable_all ()
|
||||
enable_wined3d_CSMT_Main="$1"
|
||||
enable_wined3d_DXTn="$1"
|
||||
enable_wined3d_Multisampling="$1"
|
||||
enable_wined3d_Revert_DepthStencil_Location="$1"
|
||||
enable_wined3d_Revert_PixelFormat="$1"
|
||||
enable_wined3d_UnhandledBlendFactor="$1"
|
||||
enable_wined3d_resource_check_usage="$1"
|
||||
@ -852,9 +850,6 @@ patch_enable ()
|
||||
wineboot-drivers_etc_Stubs)
|
||||
enable_wineboot_drivers_etc_Stubs="$2"
|
||||
;;
|
||||
winebuild-LinkerVersion)
|
||||
enable_winebuild_LinkerVersion="$2"
|
||||
;;
|
||||
winecfg-Libraries)
|
||||
enable_winecfg_Libraries="$2"
|
||||
;;
|
||||
@ -882,9 +877,6 @@ patch_enable ()
|
||||
wined3d-Multisampling)
|
||||
enable_wined3d_Multisampling="$2"
|
||||
;;
|
||||
wined3d-Revert_DepthStencil_Location)
|
||||
enable_wined3d_Revert_DepthStencil_Location="$2"
|
||||
;;
|
||||
wined3d-Revert_PixelFormat)
|
||||
enable_wined3d_Revert_PixelFormat="$2"
|
||||
;;
|
||||
@ -1521,9 +1513,6 @@ if test "$enable_category_stable" -eq 1; then
|
||||
if test "$enable_wineboot_HKEY_DYN_DATA" -gt 1; then
|
||||
abort "Patchset wineboot-HKEY_DYN_DATA disabled, but category-stable depends on that."
|
||||
fi
|
||||
if test "$enable_winebuild_LinkerVersion" -gt 1; then
|
||||
abort "Patchset winebuild-LinkerVersion disabled, but category-stable depends on that."
|
||||
fi
|
||||
if test "$enable_winecfg_Libraries" -gt 1; then
|
||||
abort "Patchset winecfg-Libraries disabled, but category-stable depends on that."
|
||||
fi
|
||||
@ -1643,7 +1632,6 @@ if test "$enable_category_stable" -eq 1; then
|
||||
enable_wine_inf_Performance=1
|
||||
enable_wine_inf_ProfileList_UserSID=1
|
||||
enable_wineboot_HKEY_DYN_DATA=1
|
||||
enable_winebuild_LinkerVersion=1
|
||||
enable_winecfg_Libraries=1
|
||||
enable_wined3d_Multisampling=1
|
||||
enable_wined3d_Revert_PixelFormat=1
|
||||
@ -1680,13 +1668,9 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
|
||||
if test "$enable_wined3d_DXTn" -gt 1; then
|
||||
abort "Patchset wined3d-DXTn disabled, but wined3d-CSMT_Helper depends on that."
|
||||
fi
|
||||
if test "$enable_wined3d_Revert_DepthStencil_Location" -gt 1; then
|
||||
abort "Patchset wined3d-Revert_DepthStencil_Location disabled, but wined3d-CSMT_Helper depends on that."
|
||||
fi
|
||||
enable_makedep_PARENTSPEC=1
|
||||
enable_ntdll_DllRedirects=1
|
||||
enable_wined3d_DXTn=1
|
||||
enable_wined3d_Revert_DepthStencil_Location=1
|
||||
fi
|
||||
|
||||
if test "$enable_shell32_SHFileOperation" -eq 1; then
|
||||
@ -5083,21 +5067,6 @@ if test "$enable_wineboot_drivers_etc_Stubs" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset winebuild-LinkerVersion
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#28768] Games For Windows Live 1.x expects a valid linker version in the PE header
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * tools/winebuild/spec32.c
|
||||
# |
|
||||
if test "$enable_winebuild_LinkerVersion" -eq 1; then
|
||||
patch_apply winebuild-LinkerVersion/0001-winebuild-Set-a-valid-major-and-minor-linker-version.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "winebuild: Set a valid major and minor linker version.", 2 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset winecfg-Libraries
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -5156,21 +5125,6 @@ if test "$enable_wined3d_Accounting" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Revert_DepthStencil_Location
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#38654] Revert patch which causes broken rendering in various games
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/context.c, dlls/wined3d/wined3d_private.h
|
||||
# |
|
||||
if test "$enable_wined3d_Revert_DepthStencil_Location" -eq 1; then
|
||||
patch_apply wined3d-Revert_DepthStencil_Location/0001-Revert-wined3d-Allow-specifying-a-different-depth-st.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Allow specifying a different depth stencil location.\".", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-CSMT_Helper
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -5187,37 +5141,18 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Revert_PixelFormat
|
||||
# Patchset wined3d-Multisampling
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#35655] Fix wined3d performance drop introduced by pixelformat changes.
|
||||
# | * [#35718] Fix flickering introduced by pixelformat changes.
|
||||
# | * [#35950] Fix black screen on startup introduced by pixelformat changes.
|
||||
# | * [#35975] Fix gray screen on startup introduced by pixelformat changes.
|
||||
# | * [#36900] Fix missing video introduced by pixelformat changes.
|
||||
# | * [#12652] Allow to override number of quality levels for D3DMULTISAMPLE_NONMASKABLE.
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3d8/tests/device.c, dlls/d3d9/tests/device.c, dlls/ddraw/tests/ddraw1.c, dlls/ddraw/tests/ddraw2.c,
|
||||
# | dlls/ddraw/tests/ddraw4.c, dlls/ddraw/tests/ddraw7.c, dlls/wined3d/context.c, dlls/wined3d/wined3d_private.h
|
||||
# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_main.c, dlls/wined3d/wined3d_private.h
|
||||
# |
|
||||
if test "$enable_wined3d_Revert_PixelFormat" -eq 1; then
|
||||
patch_apply wined3d-Revert_PixelFormat/0001-Revert-wined3d-Track-if-a-context-s-private-hdc-has-.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0002-Revert-wined3d-Track-if-a-context-s-hdc-is-private-s.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0003-Revert-wined3d-When-restoring-pixel-format-in-contex.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0004-Revert-wined3d-Don-t-call-GetPixelFormat-to-set-a-fl.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0005-Revert-wined3d-Restore-the-pixel-format-of-the-windo.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0006-d3d8-Mark-tests-which-no-longer-pass-due-to-reverts-.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0007-d3d9-Mark-tests-which-no-longer-pass-due-to-reverts-.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0008-ddraw-Mark-tests-which-no-longer-pass-due-to-reverts.patch
|
||||
if test "$enable_wined3d_Multisampling" -eq 1; then
|
||||
patch_apply wined3d-Multisampling/0001-wined3d-Allow-to-specify-multisampling-AA-quality-le.patch
|
||||
(
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: Track if a context'\''s private hdc has had its pixel format set, so we don'\''t need to check it.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: Track if a context'\''s hdc is private so we never need to restore its pixel format.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: When restoring pixel format in context_release(), mark the context as needing to be set on the next context_acquire().\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: Don'\''t call GetPixelFormat() to set a flag that'\''s already set.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: Restore the pixel format of the window whose pixel format was actually changed.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "d3d8: Mark tests which no longer pass due to reverts as todo_wine.", 1 },';
|
||||
echo '+ { "Ken Thomases", "d3d9: Mark tests which no longer pass due to reverts as todo_wine.", 1 },';
|
||||
echo '+ { "Ken Thomases", "ddraw: Mark tests which no longer pass due to reverts as todo_wine.", 1 },';
|
||||
echo '+ { "Austin English", "wined3d: Allow to specify multisampling AA quality levels via registry.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
@ -5257,18 +5192,37 @@ if test "$enable_wined3d_wined3d_swapchain_present" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Multisampling
|
||||
# Patchset wined3d-Revert_PixelFormat
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#12652] Allow to override number of quality levels for D3DMULTISAMPLE_NONMASKABLE.
|
||||
# | * [#35655] Fix wined3d performance drop introduced by pixelformat changes.
|
||||
# | * [#35718] Fix flickering introduced by pixelformat changes.
|
||||
# | * [#35950] Fix black screen on startup introduced by pixelformat changes.
|
||||
# | * [#35975] Fix gray screen on startup introduced by pixelformat changes.
|
||||
# | * [#36900] Fix missing video introduced by pixelformat changes.
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_main.c, dlls/wined3d/wined3d_private.h
|
||||
# | * dlls/d3d8/tests/device.c, dlls/d3d9/tests/device.c, dlls/ddraw/tests/ddraw1.c, dlls/ddraw/tests/ddraw2.c,
|
||||
# | dlls/ddraw/tests/ddraw4.c, dlls/ddraw/tests/ddraw7.c, dlls/wined3d/context.c, dlls/wined3d/wined3d_private.h
|
||||
# |
|
||||
if test "$enable_wined3d_Multisampling" -eq 1; then
|
||||
patch_apply wined3d-Multisampling/0001-wined3d-Allow-to-specify-multisampling-AA-quality-le.patch
|
||||
if test "$enable_wined3d_Revert_PixelFormat" -eq 1; then
|
||||
patch_apply wined3d-Revert_PixelFormat/0001-Revert-wined3d-Track-if-a-context-s-private-hdc-has-.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0002-Revert-wined3d-Track-if-a-context-s-hdc-is-private-s.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0003-Revert-wined3d-When-restoring-pixel-format-in-contex.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0004-Revert-wined3d-Don-t-call-GetPixelFormat-to-set-a-fl.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0005-Revert-wined3d-Restore-the-pixel-format-of-the-windo.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0006-d3d8-Mark-tests-which-no-longer-pass-due-to-reverts-.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0007-d3d9-Mark-tests-which-no-longer-pass-due-to-reverts-.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0008-ddraw-Mark-tests-which-no-longer-pass-due-to-reverts.patch
|
||||
(
|
||||
echo '+ { "Austin English", "wined3d: Allow to specify multisampling AA quality levels via registry.", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: Track if a context'\''s private hdc has had its pixel format set, so we don'\''t need to check it.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: Track if a context'\''s hdc is private so we never need to restore its pixel format.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: When restoring pixel format in context_release(), mark the context as needing to be set on the next context_acquire().\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: Don'\''t call GetPixelFormat() to set a flag that'\''s already set.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: Restore the pixel format of the window whose pixel format was actually changed.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "d3d8: Mark tests which no longer pass due to reverts as todo_wine.", 1 },';
|
||||
echo '+ { "Ken Thomases", "d3d9: Mark tests which no longer pass due to reverts as todo_wine.", 1 },';
|
||||
echo '+ { "Ken Thomases", "ddraw: Mark tests which no longer pass due to reverts as todo_wine.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
|
@ -1,38 +0,0 @@
|
||||
From be7a50ab68ad481de086a845d3b70f9fa11824cb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 21 Aug 2014 05:57:24 +0200
|
||||
Subject: winebuild: Set a valid major and minor linker version. (v2)
|
||||
|
||||
---
|
||||
tools/winebuild/spec32.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
|
||||
index 98060b5..0f4fdbc 100644
|
||||
--- a/tools/winebuild/spec32.c
|
||||
+++ b/tools/winebuild/spec32.c
|
||||
@@ -529,8 +529,8 @@ void output_module( DLLSPEC *spec )
|
||||
spec->characteristics );
|
||||
output( "\t.short 0x%04x\n", /* Magic */
|
||||
get_ptr_size() == 8 ? IMAGE_NT_OPTIONAL_HDR64_MAGIC : IMAGE_NT_OPTIONAL_HDR32_MAGIC );
|
||||
- output( "\t.byte 0\n" ); /* MajorLinkerVersion */
|
||||
- output( "\t.byte 0\n" ); /* MinorLinkerVersion */
|
||||
+ output( "\t.byte 7\n" ); /* MajorLinkerVersion */
|
||||
+ output( "\t.byte 10\n" ); /* MinorLinkerVersion */
|
||||
output( "\t.long 0\n" ); /* SizeOfCode */
|
||||
output( "\t.long 0\n" ); /* SizeOfInitializedData */
|
||||
output( "\t.long 0\n" ); /* SizeOfUninitializedData */
|
||||
@@ -710,8 +710,8 @@ void output_fake_module( DLLSPEC *spec )
|
||||
put_word( get_ptr_size() == 8 ?
|
||||
IMAGE_NT_OPTIONAL_HDR64_MAGIC :
|
||||
IMAGE_NT_OPTIONAL_HDR32_MAGIC ); /* Magic */
|
||||
- put_byte( 0 ); /* MajorLinkerVersion */
|
||||
- put_byte( 0 ); /* MinorLinkerVersion */
|
||||
+ put_byte( 7 ); /* MajorLinkerVersion */
|
||||
+ put_byte( 10 ); /* MinorLinkerVersion */
|
||||
put_dword( text_size ); /* SizeOfCode */
|
||||
put_dword( 0 ); /* SizeOfInitializedData */
|
||||
put_dword( 0 ); /* SizeOfUninitializedData */
|
||||
--
|
||||
2.3.5
|
||||
|
@ -1,2 +0,0 @@
|
||||
Fixes: [28768] Games For Windows Live 1.x expects a valid linker version in the PE header
|
||||
Category: stable
|
@ -1,4 +1,3 @@
|
||||
Depends: wined3d-DXTn
|
||||
Depends: makedep-PARENTSPEC
|
||||
Depends: ntdll-DllRedirects
|
||||
Depends: wined3d-Revert_DepthStencil_Location
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e898d6d1944694f979f3f7415a4632a190d6dd79 Mon Sep 17 00:00:00 2001
|
||||
From 99ec63d5b866c832fd8dce4b249a338dd80a505e 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
|
||||
@ -20,7 +20,7 @@ Subject: wined3d: Move the framebuffer into wined3d_state
|
||||
13 files changed, 172 insertions(+), 127 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index 7138ad1..1a09c2a 100644
|
||||
index eb46f8c..34e210a 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -684,7 +684,7 @@ static void shader_arb_load_constants_internal(struct shader_arb_priv *priv,
|
||||
@ -32,7 +32,7 @@ index 7138ad1..1a09c2a 100644
|
||||
|
||||
/* Load DirectX 9 float constants for pixel shader */
|
||||
priv->highest_dirty_ps_const = shader_arb_load_constantsF(pshader, gl_info, GL_FRAGMENT_PROGRAM_ARB,
|
||||
@@ -4694,7 +4694,7 @@ static void shader_arb_select(void *shader_priv, struct wined3d_context *context
|
||||
@@ -4702,7 +4702,7 @@ static void shader_arb_select(void *shader_priv, struct wined3d_context *context
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -42,10 +42,10 @@ index 7138ad1..1a09c2a 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 724bac9..07db94c 100644
|
||||
index fb065cd..42a221c 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -1453,6 +1453,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
@@ -1475,6 +1475,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ index 724bac9..07db94c 100644
|
||||
/* Initialize the texture unit mapping to a 1:1 mapping */
|
||||
for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s)
|
||||
{
|
||||
@@ -1771,6 +1777,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
@@ -1793,6 +1799,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
out:
|
||||
device->shader_backend->shader_free_context_data(ret);
|
||||
device->adapter->fragment_pipe->free_context_data(ret);
|
||||
@ -66,7 +66,7 @@ index 724bac9..07db94c 100644
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_event_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries);
|
||||
@@ -1805,6 +1812,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
@@ -1827,6 +1834,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
|
||||
device->shader_backend->shader_free_context_data(context);
|
||||
device->adapter->fragment_pipe->free_context_data(context);
|
||||
@ -74,7 +74,7 @@ index 724bac9..07db94c 100644
|
||||
HeapFree(GetProcessHeap(), 0, context->draw_buffers);
|
||||
HeapFree(GetProcessHeap(), 0, context->blit_targets);
|
||||
device_context_remove(device, context);
|
||||
@@ -2319,7 +2327,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2342,7 +2350,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
DWORD rt_mask = 0, *cur_mask;
|
||||
UINT i;
|
||||
|
||||
@ -82,8 +82,8 @@ index 724bac9..07db94c 100644
|
||||
+ if (isStateDirty(context, STATE_FRAMEBUFFER) || !wined3d_fb_equal(fb, &context->current_fb)
|
||||
|| rt_count != context->gl_info->limits.buffers)
|
||||
{
|
||||
if (!context_validate_rt_config(rt_count, rts, fb->depth_stencil))
|
||||
@@ -2362,6 +2370,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
if (!context_validate_rt_config(rt_count, rts, dsv))
|
||||
@@ -2387,6 +2395,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
rt_mask = context_generate_rt_mask_no_fbo(device,
|
||||
rt_count ? wined3d_rendertarget_view_get_surface(rts[0]) : NULL);
|
||||
}
|
||||
@ -92,7 +92,7 @@ index 724bac9..07db94c 100644
|
||||
}
|
||||
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
|
||||
&& (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource)))
|
||||
@@ -2412,7 +2422,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2437,7 +2447,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_device *device)
|
||||
{
|
||||
const struct wined3d_state *state = &device->state;
|
||||
@ -101,7 +101,7 @@ index 724bac9..07db94c 100644
|
||||
struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL];
|
||||
DWORD rt_mask, rt_mask_bits;
|
||||
unsigned int i;
|
||||
@@ -2442,7 +2452,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
@@ -2467,7 +2477,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
const struct wined3d_device *device = context->swapchain->device;
|
||||
@ -110,7 +110,7 @@ index 724bac9..07db94c 100644
|
||||
DWORD rt_mask = find_draw_buffers_mask(context, device);
|
||||
DWORD *cur_mask;
|
||||
|
||||
@@ -2472,6 +2482,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
@@ -2499,6 +2509,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
context_apply_draw_buffers(context, rt_mask);
|
||||
*cur_mask = rt_mask;
|
||||
}
|
||||
@ -119,7 +119,7 @@ index 724bac9..07db94c 100644
|
||||
}
|
||||
|
||||
static void context_map_stage(struct wined3d_context *context, DWORD stage, DWORD unit)
|
||||
@@ -3060,7 +3072,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
|
||||
@@ -3087,7 +3099,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
|
||||
{
|
||||
const struct wined3d_state *state = &device->state;
|
||||
const struct StateEntry *state_table = context->state_table;
|
||||
@ -205,7 +205,7 @@ index 874129a..22a2de8 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
}
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 0c62b4e..9119420 100644
|
||||
index a13fb54..990545d 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -860,7 +860,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
|
||||
@ -577,10 +577,10 @@ index f2c2f42..c6a72fc 100644
|
||||
|
||||
surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy);
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 87ff576..76d2c35 100644
|
||||
index 5ba246e..4775ff9 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -1501,7 +1501,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
@@ -1531,7 +1531,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
const struct vs_compile_args *vs_args = ctx_priv->cur_vs_args;
|
||||
const struct ps_compile_args *ps_args = ctx_priv->cur_ps_args;
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
@ -590,7 +590,7 @@ index 87ff576..76d2c35 100644
|
||||
const struct wined3d_shader_lconst *lconst;
|
||||
const char *prefix;
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
index 02b0aff..f27a09c 100644
|
||||
index 5b32528..1c401c4 100644
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -2411,7 +2411,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
@ -603,7 +603,7 @@ index 02b0aff..f27a09c 100644
|
||||
{
|
||||
static unsigned int warned = 0;
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index e042add..d8883b3 100644
|
||||
index b7d7f92..59f9fd8 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_
|
||||
@ -653,7 +653,7 @@ index e042add..d8883b3 100644
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
gl_info->gl_ops.gl.p_glStencilMask(mask);
|
||||
@@ -1683,7 +1683,7 @@ static void state_depthbias(struct wined3d_context *context, const struct wined3
|
||||
@@ -1644,7 +1644,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])
|
||||
{
|
||||
@ -662,7 +662,7 @@ index e042add..d8883b3 100644
|
||||
float scale;
|
||||
|
||||
union
|
||||
@@ -4581,7 +4581,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
|
||||
@@ -4542,7 +4542,7 @@ 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)
|
||||
{
|
||||
@ -671,7 +671,7 @@ index e042add..d8883b3 100644
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
struct wined3d_viewport vp = state->viewport;
|
||||
|
||||
@@ -4759,7 +4759,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
@@ -4720,7 +4720,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -680,7 +680,7 @@ index e042add..d8883b3 100644
|
||||
UINT height;
|
||||
UINT width;
|
||||
|
||||
@@ -4823,7 +4823,7 @@ static void psorigin(struct wined3d_context *context, const struct wined3d_state
|
||||
@@ -4784,7 +4784,7 @@ static void psorigin(struct wined3d_context *context, const struct wined3d_state
|
||||
|
||||
void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@ -690,7 +690,7 @@ index e042add..d8883b3 100644
|
||||
|
||||
TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id);
|
||||
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
|
||||
index 62b1841..76a80e2 100644
|
||||
index 763a5f9..790d769 100644
|
||||
--- a/dlls/wined3d/stateblock.c
|
||||
+++ b/dlls/wined3d/stateblock.c
|
||||
@@ -464,6 +464,7 @@ void state_unbind_resources(struct wined3d_state *state)
|
||||
@ -790,7 +790,7 @@ index 62b1841..76a80e2 100644
|
||||
|
||||
if (FAILED(hr = stateblock_allocate_shader_constants(stateblock)))
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 0091052..dcfcb7f 100644
|
||||
index f415b56..1808153 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -3418,8 +3418,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
@ -817,10 +817,10 @@ index 1ac5e7a..454cb21 100644
|
||||
struct wined3d_context *context;
|
||||
struct wined3d_surface *front;
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index 5ad82bd..5106cd5 100644
|
||||
index 44ba7ad..ade92b2 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -3427,7 +3427,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
@@ -3514,7 +3514,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;
|
||||
@ -829,7 +829,7 @@ index 5ad82bd..5106cd5 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;
|
||||
@@ -3972,7 +3972,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
@@ -4104,7 +4104,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
unsigned int i;
|
||||
DWORD ttff;
|
||||
DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2;
|
||||
@ -839,10 +839,10 @@ index 5ad82bd..5106cd5 100644
|
||||
const struct wined3d_d3d_info *d3d_info = context->d3d_info;
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index a7c44e8..35ca5da 100644
|
||||
index 7f9436a..a19fabe 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1134,6 +1134,36 @@ struct wined3d_timestamp_query
|
||||
@@ -1137,6 +1137,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;
|
||||
|
||||
@ -879,7 +879,7 @@ index a7c44e8..35ca5da 100644
|
||||
struct wined3d_context
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
@@ -1148,6 +1178,7 @@ struct wined3d_context
|
||||
@@ -1151,6 +1181,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 */
|
||||
@ -887,7 +887,7 @@ index a7c44e8..35ca5da 100644
|
||||
|
||||
struct wined3d_swapchain *swapchain;
|
||||
struct wined3d_surface *current_rt;
|
||||
@@ -1249,12 +1280,6 @@ struct wined3d_context
|
||||
@@ -1252,12 +1283,6 @@ struct wined3d_context
|
||||
GLuint dummy_arbfp_prog;
|
||||
};
|
||||
|
||||
@ -900,7 +900,7 @@ index a7c44e8..35ca5da 100644
|
||||
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
|
||||
|
||||
struct StateEntry
|
||||
@@ -1938,7 +1963,7 @@ struct wined3d_stream_state
|
||||
@@ -1941,7 +1966,7 @@ struct wined3d_stream_state
|
||||
struct wined3d_state
|
||||
{
|
||||
DWORD flags;
|
||||
@ -909,7 +909,7 @@ index a7c44e8..35ca5da 100644
|
||||
|
||||
struct wined3d_vertex_declaration *vertex_declaration;
|
||||
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
|
||||
@@ -2044,7 +2069,6 @@ struct wined3d_device
|
||||
@@ -2047,7 +2072,6 @@ struct wined3d_device
|
||||
struct wine_rb_tree samplers;
|
||||
|
||||
/* Render Target Support */
|
||||
@ -917,7 +917,7 @@ index a7c44e8..35ca5da 100644
|
||||
struct wined3d_surface *onscreen_depth_stencil;
|
||||
struct wined3d_rendertarget_view *auto_depth_stencil_view;
|
||||
|
||||
@@ -2550,9 +2574,8 @@ struct wined3d_stateblock
|
||||
@@ -2553,9 +2577,8 @@ struct wined3d_stateblock
|
||||
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
|
||||
|
||||
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@ -929,7 +929,7 @@ index a7c44e8..35ca5da 100644
|
||||
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
|
||||
struct wined3d_cs_ops
|
||||
@@ -2565,7 +2588,6 @@ struct wined3d_cs
|
||||
@@ -2568,7 +2591,6 @@ struct wined3d_cs
|
||||
{
|
||||
const struct wined3d_cs_ops *ops;
|
||||
struct wined3d_device *device;
|
||||
|
@ -1291,7 +1291,7 @@ diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -1453,6 +1453,7 @@
|
||||
@@ -1475,6 +1475,7 @@
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -1299,7 +1299,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
ret->current_fb.render_targets = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||
sizeof(*ret->current_fb.render_targets) * gl_info->limits.buffers);
|
||||
ret->current_fb.rt_size = gl_info->limits.buffers;
|
||||
@@ -1461,6 +1462,7 @@
|
||||
@@ -1483,6 +1484,7 @@
|
||||
if (device->context_count)
|
||||
ret->offscreenBuffer = device->contexts[0]->offscreenBuffer;
|
||||
|
||||
@ -1307,7 +1307,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
/* Initialize the texture unit mapping to a 1:1 mapping */
|
||||
for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s)
|
||||
{
|
||||
@@ -1779,7 +1781,9 @@
|
||||
@@ -1801,7 +1803,9 @@
|
||||
out:
|
||||
device->shader_backend->shader_free_context_data(ret);
|
||||
device->adapter->fragment_pipe->free_context_data(ret);
|
||||
@ -1317,7 +1317,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_event_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries);
|
||||
@@ -1814,7 +1818,9 @@
|
||||
@@ -1836,7 +1840,9 @@
|
||||
|
||||
device->shader_backend->shader_free_context_data(context);
|
||||
device->adapter->fragment_pipe->free_context_data(context);
|
||||
@ -1327,7 +1327,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
HeapFree(GetProcessHeap(), 0, context->draw_buffers);
|
||||
HeapFree(GetProcessHeap(), 0, context->blit_targets);
|
||||
device_context_remove(device, context);
|
||||
@@ -2222,7 +2228,11 @@
|
||||
@@ -2244,7 +2250,11 @@
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1339,7 +1339,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
const struct wined3d_rendertarget_view *depth_stencil)
|
||||
{
|
||||
@@ -2238,6 +2248,7 @@
|
||||
@@ -2260,6 +2270,7 @@
|
||||
WARN("Depth stencil format is not supported by WGL, rendering the backbuffer in an FBO\n");
|
||||
|
||||
/* The currently active context is the necessary context to access the swapchain's onscreen buffers */
|
||||
@ -1347,7 +1347,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
wined3d_resource_load_location(&context->current_rt->resource, context, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
swapchain->render_to_fbo = TRUE;
|
||||
swapchain_update_draw_bindings(swapchain);
|
||||
@@ -2252,6 +2263,22 @@
|
||||
@@ -2274,6 +2285,22 @@
|
||||
return context_generate_rt_mask_from_surface(rt);
|
||||
else
|
||||
return context_generate_rt_mask(context->offscreenBuffer);
|
||||
@ -1370,7 +1370,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -2283,7 +2310,11 @@
|
||||
@@ -2305,7 +2332,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1382,7 +1382,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
}
|
||||
|
||||
cur_mask = context->current_fbo ? &context->current_fbo->rt_mask : &context->draw_buffers_mask;
|
||||
@@ -2329,7 +2360,11 @@
|
||||
@@ -2352,7 +2383,11 @@
|
||||
DWORD rt_mask = 0, *cur_mask;
|
||||
UINT i;
|
||||
|
||||
@ -1393,8 +1393,8 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
+#endif /* STAGING_CSMT */
|
||||
|| rt_count != context->gl_info->limits.buffers)
|
||||
{
|
||||
if (!context_validate_rt_config(rt_count, rts, fb->depth_stencil))
|
||||
@@ -2369,11 +2404,17 @@
|
||||
if (!context_validate_rt_config(rt_count, rts, dsv))
|
||||
@@ -2394,11 +2429,17 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1412,7 +1412,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
}
|
||||
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
|
||||
&& (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource)))
|
||||
@@ -2386,7 +2427,11 @@
|
||||
@@ -2411,7 +2452,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1424,7 +1424,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
rt_count ? wined3d_rendertarget_view_get_surface(rts[0]) : NULL);
|
||||
}
|
||||
|
||||
@@ -2421,6 +2466,7 @@
|
||||
@@ -2446,6 +2491,7 @@
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1432,7 +1432,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_state *state)
|
||||
{
|
||||
struct wined3d_rendertarget_view **rts = state->fb.render_targets;
|
||||
@@ -2430,6 +2476,18 @@
|
||||
@@ -2455,6 +2501,18 @@
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO)
|
||||
return context_generate_rt_mask_no_fbo(context, wined3d_rendertarget_view_get_surface(rts[0]));
|
||||
@ -1451,7 +1451,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
else if (!context->render_offscreen)
|
||||
return context_generate_rt_mask_from_surface(wined3d_rendertarget_view_get_surface(rts[0]));
|
||||
|
||||
@@ -2452,8 +2510,14 @@
|
||||
@@ -2477,8 +2535,14 @@
|
||||
/* Context activation is done by the caller. */
|
||||
void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@ -1466,7 +1466,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
DWORD *cur_mask;
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
@@ -2482,8 +2546,10 @@
|
||||
@@ -2509,8 +2573,10 @@
|
||||
context_apply_draw_buffers(context, rt_mask);
|
||||
*cur_mask = rt_mask;
|
||||
}
|
||||
@ -1477,7 +1477,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
}
|
||||
|
||||
static void context_map_stage(struct wined3d_context *context, DWORD stage, DWORD unit)
|
||||
@@ -2721,12 +2787,22 @@
|
||||
@@ -2748,12 +2814,22 @@
|
||||
/* Context activation is done by the caller. */
|
||||
void context_state_drawbuf(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@ -1500,7 +1500,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
if (rt_mask != *cur_mask)
|
||||
{
|
||||
context_apply_draw_buffers(context, rt_mask);
|
||||
@@ -2927,7 +3003,11 @@
|
||||
@@ -2954,7 +3030,11 @@
|
||||
{
|
||||
if (state->vertex_declaration->half_float_conv_needed && !stream_info->all_vbo)
|
||||
{
|
||||
@ -1512,7 +1512,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
context->use_immediate_mode_draw = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -3067,11 +3147,19 @@
|
||||
@@ -3094,11 +3174,19 @@
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@ -1532,7 +1532,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
unsigned int i, j;
|
||||
WORD map;
|
||||
|
||||
@@ -3103,12 +3191,17 @@
|
||||
@@ -3130,12 +3218,17 @@
|
||||
for (i = 0, map = context->stream_info.use_map; map; map >>= 1, ++i)
|
||||
{
|
||||
if (map & 1)
|
||||
@ -1550,7 +1550,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
}
|
||||
if (state->index_buffer)
|
||||
{
|
||||
@@ -3212,7 +3305,11 @@
|
||||
@@ -3239,7 +3332,11 @@
|
||||
if (texture->texture_srgb.name)
|
||||
wined3d_texture_load(texture, context, TRUE);
|
||||
wined3d_texture_load(texture, context, FALSE);
|
||||
|
@ -1,235 +0,0 @@
|
||||
From 6cf7705ce1a955e590a9d6a6519a81eb13e6c0e4 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 30 May 2015 20:43:19 +0200
|
||||
Subject: Revert "wined3d: Allow specifying a different depth stencil
|
||||
location."
|
||||
|
||||
This reverts commit 90d8896826043bdf8c294018acc663c5d6684935.
|
||||
---
|
||||
dlls/wined3d/context.c | 60 ++++++++++++++++--------------------------
|
||||
dlls/wined3d/wined3d_private.h | 2 +-
|
||||
2 files changed, 24 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index a68d5d5..8dbfcb1 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -276,10 +276,8 @@ void context_check_fbo_status(const struct wined3d_context *context, GLenum targ
|
||||
return;
|
||||
}
|
||||
|
||||
- FIXME("\tColor Location %s (%#x).\n", wined3d_debug_location(context->current_fbo->color_location),
|
||||
- context->current_fbo->color_location);
|
||||
- FIXME("\tDepth Stencil Location %s (%#x).\n", wined3d_debug_location(context->current_fbo->ds_location),
|
||||
- context->current_fbo->ds_location);
|
||||
+ FIXME("\tLocation %s (%#x).\n", wined3d_debug_location(context->current_fbo->location),
|
||||
+ context->current_fbo->location);
|
||||
|
||||
/* Dump the FBO attachments */
|
||||
for (i = 0; i < gl_info->limits.buffers; ++i)
|
||||
@@ -314,8 +312,7 @@ static inline DWORD context_generate_rt_mask_from_surface(const struct wined3d_s
|
||||
}
|
||||
|
||||
static struct fbo_entry *context_create_fbo_entry(const struct wined3d_context *context,
|
||||
- struct wined3d_surface **render_targets, struct wined3d_surface *depth_stencil,
|
||||
- DWORD color_location, DWORD ds_location)
|
||||
+ struct wined3d_surface **render_targets, struct wined3d_surface *depth_stencil, DWORD location)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
struct fbo_entry *entry;
|
||||
@@ -324,8 +321,7 @@ static struct fbo_entry *context_create_fbo_entry(const struct wined3d_context *
|
||||
entry->render_targets = HeapAlloc(GetProcessHeap(), 0, gl_info->limits.buffers * sizeof(*entry->render_targets));
|
||||
memcpy(entry->render_targets, render_targets, gl_info->limits.buffers * sizeof(*entry->render_targets));
|
||||
entry->depth_stencil = depth_stencil;
|
||||
- entry->color_location = color_location;
|
||||
- entry->ds_location = ds_location;
|
||||
+ entry->location = location;
|
||||
entry->rt_mask = context_generate_rt_mask(GL_COLOR_ATTACHMENT0);
|
||||
entry->attached = FALSE;
|
||||
gl_info->fbo_ops.glGenFramebuffers(1, &entry->id);
|
||||
@@ -338,7 +334,7 @@ static struct fbo_entry *context_create_fbo_entry(const struct wined3d_context *
|
||||
/* Context activation is done by the caller. */
|
||||
static void context_reuse_fbo_entry(struct wined3d_context *context, GLenum target,
|
||||
struct wined3d_surface **render_targets, struct wined3d_surface *depth_stencil,
|
||||
- DWORD color_location, DWORD ds_location, struct fbo_entry *entry)
|
||||
+ DWORD location, struct fbo_entry *entry)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
@@ -347,8 +343,7 @@ static void context_reuse_fbo_entry(struct wined3d_context *context, GLenum targ
|
||||
|
||||
memcpy(entry->render_targets, render_targets, gl_info->limits.buffers * sizeof(*entry->render_targets));
|
||||
entry->depth_stencil = depth_stencil;
|
||||
- entry->color_location = color_location;
|
||||
- entry->ds_location = ds_location;
|
||||
+ entry->location = location;
|
||||
entry->attached = FALSE;
|
||||
}
|
||||
|
||||
@@ -368,8 +363,7 @@ static void context_destroy_fbo_entry(struct wined3d_context *context, struct fb
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
static struct fbo_entry *context_find_fbo_entry(struct wined3d_context *context, GLenum target,
|
||||
- struct wined3d_surface **render_targets, struct wined3d_surface *depth_stencil,
|
||||
- DWORD color_location, DWORD ds_location)
|
||||
+ struct wined3d_surface **render_targets, struct wined3d_surface *depth_stencil, DWORD location)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
struct fbo_entry *entry;
|
||||
@@ -388,8 +382,7 @@ static struct fbo_entry *context_find_fbo_entry(struct wined3d_context *context,
|
||||
{
|
||||
if (!memcmp(entry->render_targets,
|
||||
render_targets, gl_info->limits.buffers * sizeof(*entry->render_targets))
|
||||
- && entry->depth_stencil == depth_stencil && entry->color_location == color_location
|
||||
- && entry->ds_location == ds_location)
|
||||
+ && entry->depth_stencil == depth_stencil && entry->location == location)
|
||||
{
|
||||
list_remove(&entry->entry);
|
||||
list_add_head(&context->fbo_list, &entry->entry);
|
||||
@@ -399,14 +392,14 @@ static struct fbo_entry *context_find_fbo_entry(struct wined3d_context *context,
|
||||
|
||||
if (context->fbo_entry_count < WINED3D_MAX_FBO_ENTRIES)
|
||||
{
|
||||
- entry = context_create_fbo_entry(context, render_targets, depth_stencil, color_location, ds_location);
|
||||
+ entry = context_create_fbo_entry(context, render_targets, depth_stencil, location);
|
||||
list_add_head(&context->fbo_list, &entry->entry);
|
||||
++context->fbo_entry_count;
|
||||
}
|
||||
else
|
||||
{
|
||||
entry = LIST_ENTRY(list_tail(&context->fbo_list), struct fbo_entry, entry);
|
||||
- context_reuse_fbo_entry(context, target, render_targets, depth_stencil, color_location, ds_location, entry);
|
||||
+ context_reuse_fbo_entry(context, target, render_targets, depth_stencil, location, entry);
|
||||
list_remove(&entry->entry);
|
||||
list_add_head(&context->fbo_list, &entry->entry);
|
||||
}
|
||||
@@ -434,13 +427,13 @@ static void context_apply_fbo_entry(struct wined3d_context *context, GLenum targ
|
||||
/* Apply render targets */
|
||||
for (i = 0; i < gl_info->limits.buffers; ++i)
|
||||
{
|
||||
- context_attach_surface_fbo(context, target, i, entry->render_targets[i], entry->color_location);
|
||||
+ context_attach_surface_fbo(context, target, i, entry->render_targets[i], entry->location);
|
||||
}
|
||||
|
||||
/* Apply depth targets */
|
||||
if (entry->depth_stencil)
|
||||
surface_set_compatible_renderbuffer(entry->depth_stencil, entry->render_targets[0]);
|
||||
- context_attach_depth_stencil_fbo(context, target, entry->depth_stencil, entry->ds_location);
|
||||
+ context_attach_depth_stencil_fbo(context, target, entry->depth_stencil, entry->location);
|
||||
|
||||
/* Set valid read and draw buffer bindings to satisfy pedantic pre-ES2_compatibility
|
||||
* GL contexts requirements. */
|
||||
@@ -459,8 +452,7 @@ static void context_apply_fbo_entry(struct wined3d_context *context, GLenum targ
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
static void context_apply_fbo_state(struct wined3d_context *context, GLenum target,
|
||||
- struct wined3d_surface **render_targets, struct wined3d_surface *depth_stencil,
|
||||
- DWORD color_location, DWORD ds_location)
|
||||
+ struct wined3d_surface **render_targets, struct wined3d_surface *depth_stencil, DWORD location)
|
||||
{
|
||||
struct fbo_entry *entry, *entry2;
|
||||
|
||||
@@ -475,15 +467,14 @@ static void context_apply_fbo_state(struct wined3d_context *context, GLenum targ
|
||||
context->rebind_fbo = FALSE;
|
||||
}
|
||||
|
||||
- if (color_location == WINED3D_LOCATION_DRAWABLE)
|
||||
+ if (location == WINED3D_LOCATION_DRAWABLE)
|
||||
{
|
||||
context->current_fbo = NULL;
|
||||
context_bind_fbo(context, target, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
- context->current_fbo = context_find_fbo_entry(context, target, render_targets, depth_stencil,
|
||||
- color_location, ds_location);
|
||||
+ context->current_fbo = context_find_fbo_entry(context, target, render_targets, depth_stencil, location);
|
||||
context_apply_fbo_entry(context, target, context->current_fbo);
|
||||
}
|
||||
}
|
||||
@@ -497,7 +488,7 @@ void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target
|
||||
context->blit_targets[0] = render_target;
|
||||
if (clear_size)
|
||||
memset(&context->blit_targets[1], 0, clear_size);
|
||||
- context_apply_fbo_state(context, target, context->blit_targets, depth_stencil, location, location);
|
||||
+ context_apply_fbo_state(context, target, context->blit_targets, depth_stencil, location);
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -2323,7 +2314,6 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
UINT rt_count, const struct wined3d_fb_state *fb)
|
||||
{
|
||||
struct wined3d_rendertarget_view **rts = fb->render_targets;
|
||||
- struct wined3d_rendertarget_view *dsv = fb->depth_stencil;
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
DWORD rt_mask = 0, *cur_mask;
|
||||
UINT i;
|
||||
@@ -2331,12 +2321,12 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
if (isStateDirty(context, STATE_FRAMEBUFFER) || fb != &device->fb
|
||||
|| rt_count != context->gl_info->limits.buffers)
|
||||
{
|
||||
- if (!context_validate_rt_config(rt_count, rts, dsv))
|
||||
+ if (!context_validate_rt_config(rt_count, rts, fb->depth_stencil))
|
||||
return FALSE;
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
{
|
||||
- context_validate_onscreen_formats(context, dsv);
|
||||
+ context_validate_onscreen_formats(context, fb->depth_stencil);
|
||||
|
||||
if (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource))
|
||||
{
|
||||
@@ -2352,14 +2342,12 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
++i;
|
||||
}
|
||||
context_apply_fbo_state(context, GL_FRAMEBUFFER, context->blit_targets,
|
||||
- wined3d_rendertarget_view_get_surface(dsv),
|
||||
- rt_count ? rts[0]->resource->draw_binding : 0,
|
||||
- dsv ? dsv->resource->draw_binding : 0);
|
||||
+ wined3d_rendertarget_view_get_surface(fb->depth_stencil),
|
||||
+ rt_count ? rts[0]->resource->draw_binding : WINED3D_LOCATION_TEXTURE_RGB);
|
||||
}
|
||||
else
|
||||
{
|
||||
- context_apply_fbo_state(context, GL_FRAMEBUFFER, NULL, NULL,
|
||||
- WINED3D_LOCATION_DRAWABLE, WINED3D_LOCATION_DRAWABLE);
|
||||
+ context_apply_fbo_state(context, GL_FRAMEBUFFER, NULL, NULL, WINED3D_LOCATION_DRAWABLE);
|
||||
rt_mask = context_generate_rt_mask_from_surface(wined3d_rendertarget_view_get_surface(rts[0]));
|
||||
}
|
||||
|
||||
@@ -2461,8 +2449,7 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
{
|
||||
if (!context->render_offscreen)
|
||||
{
|
||||
- context_apply_fbo_state(context, GL_FRAMEBUFFER, NULL, NULL,
|
||||
- WINED3D_LOCATION_DRAWABLE, WINED3D_LOCATION_DRAWABLE);
|
||||
+ context_apply_fbo_state(context, GL_FRAMEBUFFER, NULL, NULL, WINED3D_LOCATION_DRAWABLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2474,8 +2461,7 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
}
|
||||
context_apply_fbo_state(context, GL_FRAMEBUFFER, context->blit_targets,
|
||||
wined3d_rendertarget_view_get_surface(fb->depth_stencil),
|
||||
- fb->render_targets[0]->resource->draw_binding,
|
||||
- fb->depth_stencil ? fb->depth_stencil->resource->draw_binding : 0);
|
||||
+ fb->render_targets[0]->resource->draw_binding);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 75fc2be..142e4de 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2319,7 +2319,7 @@ struct fbo_entry
|
||||
struct list entry;
|
||||
struct wined3d_surface **render_targets;
|
||||
struct wined3d_surface *depth_stencil;
|
||||
- DWORD color_location, ds_location;
|
||||
+ DWORD location;
|
||||
DWORD rt_mask;
|
||||
BOOL attached;
|
||||
GLuint id;
|
||||
--
|
||||
2.4.2
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [38654] Revert patch which causes broken rendering in various games
|
Loading…
x
Reference in New Issue
Block a user