mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against 54633e3956e6b3c4d8ebbd5d721efa294e9602fb.
This commit is contained in:
parent
d014e899bc
commit
5acbd17da2
@ -34,9 +34,8 @@ Wine. All those differences are also documented on the
|
||||
Included bug fixes and improvements
|
||||
-----------------------------------
|
||||
|
||||
**Bug fixes and features included in the next upcoming release [5]:**
|
||||
**Bug fixes and features included in the next upcoming release [4]:**
|
||||
|
||||
* Add implementation for additional HSTRING functions
|
||||
* Do not allow interruption of system APC in server_select ([Wine Bug #14697](https://bugs.winehq.org/show_bug.cgi?id=14697))
|
||||
* Implement FileNamesInformation class support for NtQueryDirectoryFile
|
||||
* Implement hal.KeQueryPerformanceCounter ([Wine Bug #39500](https://bugs.winehq.org/show_bug.cgi?id=39500))
|
||||
|
@ -1,80 +0,0 @@
|
||||
From 0e973b890161d9b50dac9784b33c9a8580223fd4 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 24 Oct 2015 22:30:21 +0200
|
||||
Subject: combase: Implement WindowsConcatString.
|
||||
|
||||
---
|
||||
.../api-ms-win-core-winrt-string-l1-1-0.spec | 2 +-
|
||||
dlls/combase/combase.spec | 2 +-
|
||||
dlls/combase/string.c | 29 ++++++++++++++++++++++
|
||||
3 files changed, 31 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/api-ms-win-core-winrt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec b/dlls/api-ms-win-core-winrt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec
|
||||
index dc67deb..fa048d8 100644
|
||||
--- a/dlls/api-ms-win-core-winrt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec
|
||||
+++ b/dlls/api-ms-win-core-winrt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec
|
||||
@@ -7,7 +7,7 @@
|
||||
@ stub HSTRING_UserUnmarshal
|
||||
@ stub HSTRING_UserUnmarshal64
|
||||
@ stub WindowsCompareStringOrdinal
|
||||
-@ stub WindowsConcatString
|
||||
+@ stdcall WindowsConcatString(ptr ptr ptr) combase.WindowsConcatString
|
||||
@ stdcall WindowsCreateString(wstr long ptr) combase.WindowsCreateString
|
||||
@ stdcall WindowsCreateStringReference(wstr long ptr ptr) combase.WindowsCreateStringReference
|
||||
@ stdcall WindowsDeleteString(ptr) combase.WindowsDeleteString
|
||||
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec
|
||||
index fcd5947..6a76b2d 100644
|
||||
--- a/dlls/combase/combase.spec
|
||||
+++ b/dlls/combase/combase.spec
|
||||
@@ -288,7 +288,7 @@
|
||||
@ stdcall WdtpInterfacePointer_UserUnmarshal(ptr ptr ptr ptr) ole32.WdtpInterfacePointer_UserUnmarshal
|
||||
@ stub WdtpInterfacePointer_UserUnmarshal64
|
||||
@ stub WindowsCompareStringOrdinal
|
||||
-@ stub WindowsConcatString
|
||||
+@ stdcall WindowsConcatString(ptr ptr ptr)
|
||||
@ stdcall WindowsCreateString(wstr long ptr)
|
||||
@ stdcall WindowsCreateStringReference(wstr long ptr ptr)
|
||||
@ stdcall WindowsDeleteString(ptr)
|
||||
diff --git a/dlls/combase/string.c b/dlls/combase/string.c
|
||||
index 49d7695..d84f940 100644
|
||||
--- a/dlls/combase/string.c
|
||||
+++ b/dlls/combase/string.c
|
||||
@@ -330,6 +330,35 @@ HRESULT WINAPI WindowsSubstringWithSpecifiedLength(HSTRING str, UINT32 start, UI
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
+ * WindowsConcatString (combase.@)
|
||||
+ */
|
||||
+HRESULT WINAPI WindowsConcatString(HSTRING str1, HSTRING str2, HSTRING *out)
|
||||
+{
|
||||
+ struct hstring_private *priv1 = impl_from_HSTRING(str1);
|
||||
+ struct hstring_private *priv2 = impl_from_HSTRING(str2);
|
||||
+ struct hstring_private *priv;
|
||||
+
|
||||
+ TRACE("(%p, %p, %p)\n", str1, str2, out);
|
||||
+
|
||||
+ if (str1 == NULL)
|
||||
+ return WindowsDuplicateString(str2, out);
|
||||
+ if (str2 == NULL)
|
||||
+ return WindowsDuplicateString(str1, out);
|
||||
+ if (priv1->length + priv2->length == 0)
|
||||
+ {
|
||||
+ *out = NULL;
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+
|
||||
+ if (!alloc_string(priv1->length + priv2->length, out))
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ priv = impl_from_HSTRING(*out);
|
||||
+ memcpy(priv->buffer, priv1->buffer, priv1->length * sizeof(*priv1->buffer));
|
||||
+ memcpy(priv->buffer + priv1->length, priv2->buffer, priv2->length * sizeof(*priv2->buffer));
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
* WindowsIsStringEmpty (combase.@)
|
||||
*/
|
||||
BOOL WINAPI WindowsIsStringEmpty(HSTRING str)
|
||||
--
|
||||
2.6.1
|
||||
|
@ -1,109 +0,0 @@
|
||||
From 1f8fc65e3edcc8265b20faeffc18123b7b6f4fb5 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 24 Oct 2015 22:35:06 +0200
|
||||
Subject: combase/tests: Add tests for WindowsConcatString.
|
||||
|
||||
---
|
||||
dlls/combase/tests/string.c | 60 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 60 insertions(+)
|
||||
|
||||
diff --git a/dlls/combase/tests/string.c b/dlls/combase/tests/string.c
|
||||
index 5a59b50..43ce2d0 100644
|
||||
--- a/dlls/combase/tests/string.c
|
||||
+++ b/dlls/combase/tests/string.c
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "wine/test.h"
|
||||
|
||||
+static HRESULT (WINAPI *pWindowsConcatString)(HSTRING, HSTRING, HSTRING *);
|
||||
static HRESULT (WINAPI *pWindowsCreateString)(LPCWSTR, UINT32, HSTRING *);
|
||||
static HRESULT (WINAPI *pWindowsCreateStringReference)(LPCWSTR, UINT32, HSTRING_HEADER *, HSTRING *);
|
||||
static HRESULT (WINAPI *pWindowsDeleteString)(HSTRING);
|
||||
@@ -51,6 +52,7 @@ static BOOL init_functions(void)
|
||||
win_skip("Failed to load combase.dll, skipping tests\n");
|
||||
return FALSE;
|
||||
}
|
||||
+ SET(WindowsConcatString);
|
||||
SET(WindowsCreateString);
|
||||
SET(WindowsCreateStringReference);
|
||||
SET(WindowsDeleteString);
|
||||
@@ -94,6 +96,8 @@ static void _check_string(int line, HSTRING str, LPCWSTR content, UINT32 length,
|
||||
}
|
||||
|
||||
static const WCHAR input_string[] = { 'a', 'b', 'c', 'd', 'e', 'f', '\0', '\0' };
|
||||
+static const WCHAR input_string1[] = { 'a', 'b', 'c', '\0' };
|
||||
+static const WCHAR input_string2[] = { 'd', 'e', 'f', '\0' };
|
||||
static const WCHAR input_empty_string[] = { '\0' };
|
||||
static const WCHAR input_embed_null[] = { 'a', '\0', 'c', '\0', 'e', 'f', '\0' };
|
||||
static const WCHAR output_substring[] = { 'c', 'd', 'e', 'f', '\0' };
|
||||
@@ -319,6 +323,61 @@ static void test_substring(void)
|
||||
ok(pWindowsDeleteString(str) == S_OK, "Failed to delete string\n");
|
||||
}
|
||||
|
||||
+static void test_concat(void)
|
||||
+{
|
||||
+ HSTRING str1, str2, concat;
|
||||
+ HSTRING_HEADER header1, header2;
|
||||
+
|
||||
+ /* Test concatenation of string buffers */
|
||||
+ ok(pWindowsCreateString(input_string1, 3, &str1) == S_OK, "Failed to create string\n");
|
||||
+ ok(pWindowsCreateString(input_string2, 3, &str2) == S_OK, "Failed to create string\n");
|
||||
+
|
||||
+ ok(pWindowsConcatString(str1, NULL, &concat) == S_OK, "Failed to concatenate string\n");
|
||||
+ ok(str1 == concat, "Concatenate created new string\n");
|
||||
+ check_string(concat, input_string1, 3, FALSE);
|
||||
+ ok(pWindowsDeleteString(concat) == S_OK, "Failed to delete string\n");
|
||||
+
|
||||
+ ok(pWindowsConcatString(NULL, str2, &concat) == S_OK, "Failed to concatenate string\n");
|
||||
+ ok(str2 == concat, "Concatenate created new string\n");
|
||||
+ check_string(concat, input_string2, 3, FALSE);
|
||||
+ ok(pWindowsDeleteString(concat) == S_OK, "Failed to delete string\n");
|
||||
+
|
||||
+ ok(pWindowsConcatString(str1, str2, &concat) == S_OK, "Failed to concatenate string\n");
|
||||
+ check_string(concat, input_string, 6, FALSE);
|
||||
+ ok(pWindowsDeleteString(concat) == S_OK, "Failed to delete string\n");
|
||||
+
|
||||
+ ok(pWindowsDeleteString(str2) == S_OK, "Failed to delete string\n");
|
||||
+ ok(pWindowsDeleteString(str1) == S_OK, "Failed to delete string\n");
|
||||
+
|
||||
+ /* Test concatenation of string references */
|
||||
+ ok(pWindowsCreateStringReference(input_string1, 3, &header1, &str1) == S_OK, "Failed to create string ref\n");
|
||||
+ ok(pWindowsCreateStringReference(input_string2, 3, &header2, &str2) == S_OK, "Failed to create string ref\n");
|
||||
+
|
||||
+ ok(pWindowsConcatString(str1, NULL, &concat) == S_OK, "Failed to concatenate string\n");
|
||||
+ ok(str1 != concat, "Concatenate string ref didn't create new string\n");
|
||||
+ check_string(concat, input_string1, 3, FALSE);
|
||||
+ ok(pWindowsDeleteString(concat) == S_OK, "Failed to delete string\n");
|
||||
+
|
||||
+ ok(pWindowsConcatString(NULL, str2, &concat) == S_OK, "Failed to concatenate string\n");
|
||||
+ ok(str2 != concat, "Concatenate string ref didn't create new string\n");
|
||||
+ check_string(concat, input_string2, 3, FALSE);
|
||||
+ ok(pWindowsDeleteString(concat) == S_OK, "Failed to delete string\n");
|
||||
+
|
||||
+ ok(pWindowsConcatString(str1, str2, &concat) == S_OK, "Failed to concatenate string\n");
|
||||
+ check_string(concat, input_string, 6, FALSE);
|
||||
+ ok(pWindowsDeleteString(concat) == S_OK, "Failed to delete string\n");
|
||||
+
|
||||
+ ok(pWindowsDeleteString(str2) == S_OK, "Failed to delete string ref\n");
|
||||
+ ok(pWindowsDeleteString(str1) == S_OK, "Failed to delete string ref\n");
|
||||
+
|
||||
+ /* Test concatenation of two empty strings */
|
||||
+ ok(pWindowsConcatString(NULL, NULL, &concat) == S_OK, "Failed to concatenate string\n");
|
||||
+ ok(concat == NULL, "Concatenate created new string\n");
|
||||
+
|
||||
+ /* Test handling of a NULL string */
|
||||
+ ok(pWindowsConcatString(NULL, NULL, NULL) == E_INVALIDARG, "Incorrect error handling\n");
|
||||
+}
|
||||
+
|
||||
START_TEST(string)
|
||||
{
|
||||
if (!init_functions())
|
||||
@@ -328,4 +387,5 @@ START_TEST(string)
|
||||
test_access();
|
||||
test_string_buffer();
|
||||
test_substring();
|
||||
+ test_concat();
|
||||
}
|
||||
--
|
||||
2.6.1
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: Add implementation for additional HSTRING functions
|
@ -1,77 +0,0 @@
|
||||
From a6febdb275f477877e886c8a99a0426061a22ff0 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 21 Oct 2015 00:53:12 +0200
|
||||
Subject: gdiplus: Use helper function for HeapAlloc calls.
|
||||
|
||||
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/gdiplus/font.c | 2 +-
|
||||
dlls/gdiplus/gdiplus_private.h | 6 ++++++
|
||||
dlls/gdiplus/image.c | 6 +++---
|
||||
3 files changed, 10 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
|
||||
index cd9041e..dffba1e 100644
|
||||
--- a/dlls/gdiplus/font.c
|
||||
+++ b/dlls/gdiplus/font.c
|
||||
@@ -1612,7 +1612,7 @@ static INT CALLBACK add_font_proc(const LOGFONTW *lfw, const TEXTMETRICW *ntm,
|
||||
if (fonts->allocated == fonts->count)
|
||||
{
|
||||
INT new_alloc_count = fonts->allocated+50;
|
||||
- GpFontFamily** new_family_list = HeapAlloc(GetProcessHeap(), 0, new_alloc_count*sizeof(void*));
|
||||
+ GpFontFamily** new_family_list = heap_alloc(new_alloc_count*sizeof(void*));
|
||||
|
||||
if (!new_family_list)
|
||||
return 0;
|
||||
diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h
|
||||
index 4b7e4c8..d0faac2 100644
|
||||
--- a/dlls/gdiplus/gdiplus_private.h
|
||||
+++ b/dlls/gdiplus/gdiplus_private.h
|
||||
@@ -48,6 +48,12 @@
|
||||
#define GIF_DISPOSE_RESTORE_TO_BKGND 2
|
||||
#define GIF_DISPOSE_RESTORE_TO_PREV 3
|
||||
|
||||
+static void *heap_alloc(size_t len) __WINE_ALLOC_SIZE(1);
|
||||
+static inline void *heap_alloc(size_t len)
|
||||
+{
|
||||
+ return HeapAlloc(GetProcessHeap(), 0, len);
|
||||
+}
|
||||
+
|
||||
static void *heap_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1);
|
||||
static inline void *heap_alloc_zero(size_t len)
|
||||
{
|
||||
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
|
||||
index 06cf633..5777cf7 100644
|
||||
--- a/dlls/gdiplus/image.c
|
||||
+++ b/dlls/gdiplus/image.c
|
||||
@@ -92,7 +92,7 @@ static ColorPalette *get_palette(IWICBitmapFrameDecode *frame, WICBitmapPaletteT
|
||||
UINT count;
|
||||
|
||||
IWICPalette_GetColorCount(wic_palette, &count);
|
||||
- palette = HeapAlloc(GetProcessHeap(), 0, 2 * sizeof(UINT) + count * sizeof(ARGB));
|
||||
+ palette = heap_alloc(2 * sizeof(UINT) + count * sizeof(ARGB));
|
||||
IWICPalette_GetColors(wic_palette, count, palette->Entries, &palette->Count);
|
||||
|
||||
IWICPalette_GetType(wic_palette, &type);
|
||||
@@ -1692,7 +1692,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHICON(HICON hicon, GpBitmap** bitmap)
|
||||
{
|
||||
if (iinfo.hbmMask)
|
||||
{
|
||||
- BYTE *bits = HeapAlloc(GetProcessHeap(), 0, height * stride);
|
||||
+ BYTE *bits = heap_alloc(height * stride);
|
||||
|
||||
/* read alpha data from the mask */
|
||||
if (iinfo.hbmColor)
|
||||
@@ -2874,7 +2874,7 @@ GpStatus WINGDIPAPI GdipGetAllPropertyItems(GpImage *image, UINT size,
|
||||
item_size = propvariant_size(&value);
|
||||
if (item_size)
|
||||
{
|
||||
- item = HeapAlloc(GetProcessHeap(), 0, item_size + sizeof(*item));
|
||||
+ item = heap_alloc(item_size + sizeof(*item));
|
||||
|
||||
propvariant_to_item(&value, item, item_size + sizeof(*item), id.u.uiVal);
|
||||
buf[i].id = item->id;
|
||||
--
|
||||
2.6.1
|
||||
|
@ -1,65 +0,0 @@
|
||||
From 94bb0566b681365ee04cf6ac08d97ef05003f0ed Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 21 Oct 2015 00:53:31 +0200
|
||||
Subject: gdiplus: Use helper function for HeapReAlloc calls.
|
||||
|
||||
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/gdiplus/gdiplus.c | 6 ++----
|
||||
dlls/gdiplus/gdiplus_private.h | 6 ++++++
|
||||
dlls/gdiplus/stringformat.c | 2 +-
|
||||
3 files changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/gdiplus/gdiplus.c b/dlls/gdiplus/gdiplus.c
|
||||
index 32f20d8..1281455 100644
|
||||
--- a/dlls/gdiplus/gdiplus.c
|
||||
+++ b/dlls/gdiplus/gdiplus.c
|
||||
@@ -420,12 +420,10 @@ BOOL lengthen_path(GpPath *path, INT len)
|
||||
while(path->datalen - path->pathdata.Count < len)
|
||||
path->datalen *= 2;
|
||||
|
||||
- path->pathdata.Points = HeapReAlloc(GetProcessHeap(), 0,
|
||||
- path->pathdata.Points, path->datalen * sizeof(PointF));
|
||||
+ path->pathdata.Points = heap_realloc(path->pathdata.Points, path->datalen * sizeof(PointF));
|
||||
if(!path->pathdata.Points) return FALSE;
|
||||
|
||||
- path->pathdata.Types = HeapReAlloc(GetProcessHeap(), 0,
|
||||
- path->pathdata.Types, path->datalen);
|
||||
+ path->pathdata.Types = heap_realloc(path->pathdata.Types, path->datalen);
|
||||
if(!path->pathdata.Types) return FALSE;
|
||||
}
|
||||
|
||||
diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h
|
||||
index d0faac2..1af0bd0 100644
|
||||
--- a/dlls/gdiplus/gdiplus_private.h
|
||||
+++ b/dlls/gdiplus/gdiplus_private.h
|
||||
@@ -60,6 +60,12 @@ static inline void *heap_alloc_zero(size_t len)
|
||||
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
|
||||
}
|
||||
|
||||
+static void *heap_realloc(void *mem, size_t len) __WINE_ALLOC_SIZE(2);
|
||||
+static inline void *heap_realloc(void *mem, size_t len)
|
||||
+{
|
||||
+ return HeapReAlloc(GetProcessHeap(), 0, mem, len);
|
||||
+}
|
||||
+
|
||||
static inline BOOL heap_free(void *mem)
|
||||
{
|
||||
return HeapFree(GetProcessHeap(), 0, mem);
|
||||
diff --git a/dlls/gdiplus/stringformat.c b/dlls/gdiplus/stringformat.c
|
||||
index 8791ceb..b89458b 100644
|
||||
--- a/dlls/gdiplus/stringformat.c
|
||||
+++ b/dlls/gdiplus/stringformat.c
|
||||
@@ -291,7 +291,7 @@ GpStatus WINGDIPAPI GdipSetStringFormatTabStops(GpStringFormat *format, REAL fir
|
||||
/* reallocation */
|
||||
if((format->tabcount < count) && (format->tabcount > 0)){
|
||||
REAL *ptr;
|
||||
- ptr = HeapReAlloc(GetProcessHeap(), 0, format->tabs, sizeof(REAL)*count);
|
||||
+ ptr = heap_realloc(format->tabs, sizeof(REAL)*count);
|
||||
if(!ptr)
|
||||
return OutOfMemory;
|
||||
format->tabs = ptr;
|
||||
--
|
||||
2.6.1
|
||||
|
@ -1,59 +0,0 @@
|
||||
From 74a41170aaf163ed000ca63a606dfd55e56af87f Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 21 Oct 2015 00:53:48 +0200
|
||||
Subject: gdiplus: Use helper function for remaining HeapFree calls.
|
||||
|
||||
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/gdiplus/font.c | 4 ++--
|
||||
dlls/gdiplus/image.c | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
|
||||
index dffba1e..63eaed2 100644
|
||||
--- a/dlls/gdiplus/font.c
|
||||
+++ b/dlls/gdiplus/font.c
|
||||
@@ -1590,7 +1590,7 @@ void free_installed_fonts(void)
|
||||
{
|
||||
while (installedFontCollection.count)
|
||||
GdipDeleteFontFamily(installedFontCollection.FontFamilies[--installedFontCollection.count]);
|
||||
- HeapFree(GetProcessHeap(), 0, installedFontCollection.FontFamilies);
|
||||
+ heap_free(installedFontCollection.FontFamilies);
|
||||
installedFontCollection.FontFamilies = NULL;
|
||||
installedFontCollection.allocated = 0;
|
||||
}
|
||||
@@ -1618,7 +1618,7 @@ static INT CALLBACK add_font_proc(const LOGFONTW *lfw, const TEXTMETRICW *ntm,
|
||||
return 0;
|
||||
|
||||
memcpy(new_family_list, fonts->FontFamilies, fonts->count*sizeof(void*));
|
||||
- HeapFree(GetProcessHeap(), 0, fonts->FontFamilies);
|
||||
+ heap_free(fonts->FontFamilies);
|
||||
fonts->FontFamilies = new_family_list;
|
||||
fonts->allocated = new_alloc_count;
|
||||
}
|
||||
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
|
||||
index 5777cf7..19c7468 100644
|
||||
--- a/dlls/gdiplus/image.c
|
||||
+++ b/dlls/gdiplus/image.c
|
||||
@@ -1716,7 +1716,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHICON(HICON hicon, GpBitmap** bitmap)
|
||||
dst_row += lockeddata.Stride;
|
||||
}
|
||||
|
||||
- HeapFree(GetProcessHeap(), 0, bits);
|
||||
+ heap_free(bits);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2884,7 +2884,7 @@ GpStatus WINGDIPAPI GdipGetAllPropertyItems(GpImage *image, UINT size,
|
||||
memcpy(item_value, item->value, item_size);
|
||||
item_value += item_size;
|
||||
|
||||
- HeapFree(GetProcessHeap(), 0, item);
|
||||
+ heap_free(item);
|
||||
}
|
||||
|
||||
PropVariantClear(&id);
|
||||
--
|
||||
2.6.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From cefae7f0bda6322ac47ce7cf3bc1ee595f94394f Mon Sep 17 00:00:00 2001
|
||||
From 0a6a4d1aa5009c1e29508c34a32155cc5174984c Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 18 Jan 2015 05:42:10 +0100
|
||||
Subject: ntoskrnl.exe/tests: Add initial driver testing framework and
|
||||
@ -530,7 +530,7 @@ index 0000000..9b8a6a7
|
||||
+ unload_driver(service, filename);
|
||||
+}
|
||||
diff --git a/tools/make_makefiles b/tools/make_makefiles
|
||||
index 069d0ae..b1d77ab 100755
|
||||
index 4b539cd..2bea0a4 100755
|
||||
--- a/tools/make_makefiles
|
||||
+++ b/tools/make_makefiles
|
||||
@@ -258,7 +258,7 @@ sub parse_makefile($)
|
||||
@ -542,7 +542,7 @@ index 069d0ae..b1d77ab 100755
|
||||
{
|
||||
my $var = $1;
|
||||
$make{$var} = $2;
|
||||
@@ -481,6 +481,13 @@ sub update_makefiles(@)
|
||||
@@ -486,6 +486,13 @@ sub update_makefiles(@)
|
||||
(my $dir = $file) =~ s/^(.*)\/Makefile/$1/;
|
||||
push @lines, "WINE_CONFIG_TEST($dir$flag_args)\n";
|
||||
}
|
||||
@ -557,16 +557,16 @@ index 069d0ae..b1d77ab 100755
|
||||
{
|
||||
die "MODULE should not be defined as static lib in $file" unless $file =~ /^dlls\//;
|
||||
diff --git a/tools/makedep.c b/tools/makedep.c
|
||||
index 295e5e8..89af38d 100644
|
||||
index 30bbc3e..de5ca59 100644
|
||||
--- a/tools/makedep.c
|
||||
+++ b/tools/makedep.c
|
||||
@@ -165,4 +165,5 @@ struct makefile
|
||||
@@ -170,4 +170,5 @@ struct makefile
|
||||
const char *module;
|
||||
const char *testdll;
|
||||
+ const char *resource;
|
||||
const char *staticlib;
|
||||
const char *importlib;
|
||||
@@ -467,6 +468,30 @@ static char *get_extension( char *filename )
|
||||
@@ -472,6 +473,30 @@ static char *get_extension( char *filename )
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
@ -597,7 +597,7 @@ index 295e5e8..89af38d 100644
|
||||
* replace_extension
|
||||
*/
|
||||
static char *replace_extension( const char *name, const char *old_ext, const char *new_ext )
|
||||
@@ -1778,6 +1803,7 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t
|
||||
@@ -1872,6 +1897,7 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t
|
||||
struct strarray subdirs = empty_strarray;
|
||||
struct strarray phony_targets = empty_strarray;
|
||||
struct strarray all_targets = empty_strarray;
|
||||
@ -605,7 +605,7 @@ index 295e5e8..89af38d 100644
|
||||
char *ldrpath_local = get_expanded_make_variable( make, "LDRPATH_LOCAL" );
|
||||
char *ldrpath_install = get_expanded_make_variable( make, "LDRPATH_INSTALL" );
|
||||
|
||||
@@ -2014,7 +2040,7 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t
|
||||
@@ -2097,7 +2123,7 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -614,7 +614,7 @@ index 295e5e8..89af38d 100644
|
||||
(source->file->flags & FLAG_C_IMPLIB) ||
|
||||
(make->module && make->staticlib);
|
||||
|
||||
@@ -2028,7 +2054,7 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t
|
||||
@@ -2111,7 +2137,7 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t
|
||||
output_filenames( includes );
|
||||
output_filenames( make->define_args );
|
||||
output_filenames( extradefs );
|
||||
@ -623,7 +623,7 @@ index 295e5e8..89af38d 100644
|
||||
{
|
||||
output_filenames( dll_flags );
|
||||
if (make->use_msvcrt) output_filenames( msvcrt_flags );
|
||||
@@ -2108,6 +2134,72 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t
|
||||
@@ -2191,6 +2217,72 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t
|
||||
output( "\n" );
|
||||
}
|
||||
|
||||
@ -696,9 +696,9 @@ index 295e5e8..89af38d 100644
|
||||
if (make->module && !make->staticlib)
|
||||
{
|
||||
struct strarray all_libs = empty_strarray;
|
||||
@@ -2411,6 +2503,83 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t
|
||||
strarray_add( &all_targets, program );
|
||||
}
|
||||
@@ -2514,6 +2606,83 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t
|
||||
add_install_rule( make, make->scripts.str[i], make->scripts.str[i],
|
||||
strmake( "S$(bindir)/%s", make->scripts.str[i] ));
|
||||
|
||||
+ if (make->resource)
|
||||
+ {
|
||||
@ -780,7 +780,7 @@ index 295e5e8..89af38d 100644
|
||||
if (all_targets.count)
|
||||
{
|
||||
output( "all:" );
|
||||
@@ -2692,4 +2861,5 @@ static void update_makefile( const char *path )
|
||||
@@ -2798,4 +2967,5 @@ static void update_makefile( const char *path )
|
||||
make->module = get_expanded_make_variable( make, "MODULE" );
|
||||
make->testdll = get_expanded_make_variable( make, "TESTDLL" );
|
||||
+ make->resource = get_expanded_make_variable( make, "RESOURCE" );
|
||||
|
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "79c59085b1b1f487e91c2695028dd3d1d257a468"
|
||||
echo "54633e3956e6b3c4d8ebbd5d721efa294e9602fb"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -92,7 +92,6 @@ patch_enable_all ()
|
||||
enable_api_ms_win_crt_Stub_DLLs="$1"
|
||||
enable_authz_Stub_Functions="$1"
|
||||
enable_browseui_Progress_Dialog="$1"
|
||||
enable_combase_Strings="$1"
|
||||
enable_comctl32_Button_Theming="$1"
|
||||
enable_comctl32_PROPSHEET_InsertPage="$1"
|
||||
enable_comctl32_TVM_GETITEM="$1"
|
||||
@ -140,7 +139,6 @@ patch_enable_all ()
|
||||
enable_gdi32_Lazy_Font_Initialization="$1"
|
||||
enable_gdi32_MaxPixelFormats="$1"
|
||||
enable_gdi32_MultiMonitor="$1"
|
||||
enable_gdiplus_Memory_Allocation="$1"
|
||||
enable_hal_KeQueryPerformanceCounter="$1"
|
||||
enable_ieframe_IViewObject_Draw="$1"
|
||||
enable_imagehlp_BindImageEx="$1"
|
||||
@ -374,9 +372,6 @@ patch_enable ()
|
||||
category-stable)
|
||||
enable_category_stable="$2"
|
||||
;;
|
||||
combase-Strings)
|
||||
enable_combase_Strings="$2"
|
||||
;;
|
||||
comctl32-Button_Theming)
|
||||
enable_comctl32_Button_Theming="$2"
|
||||
;;
|
||||
@ -518,9 +513,6 @@ patch_enable ()
|
||||
gdi32-MultiMonitor)
|
||||
enable_gdi32_MultiMonitor="$2"
|
||||
;;
|
||||
gdiplus-Memory_Allocation)
|
||||
enable_gdiplus_Memory_Allocation="$2"
|
||||
;;
|
||||
hal-KeQueryPerformanceCounter)
|
||||
enable_hal_KeQueryPerformanceCounter="$2"
|
||||
;;
|
||||
@ -2334,21 +2326,6 @@ if test "$enable_browseui_Progress_Dialog" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset combase-Strings
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/api-ms-win-core-winrt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec, dlls/combase/combase.spec,
|
||||
# | dlls/combase/string.c, dlls/combase/tests/string.c
|
||||
# |
|
||||
if test "$enable_combase_Strings" -eq 1; then
|
||||
patch_apply combase-Strings/0001-combase-Implement-WindowsConcatString.patch
|
||||
patch_apply combase-Strings/0002-combase-tests-Add-tests-for-WindowsConcatString.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "combase: Implement WindowsConcatString.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "combase/tests: Add tests for WindowsConcatString.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset comctl32-Button_Theming
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
@ -3189,23 +3166,6 @@ if test "$enable_gdi32_MultiMonitor" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset gdiplus-Memory_Allocation
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/gdiplus/font.c, dlls/gdiplus/gdiplus.c, dlls/gdiplus/gdiplus_private.h, dlls/gdiplus/image.c,
|
||||
# | dlls/gdiplus/stringformat.c
|
||||
# |
|
||||
if test "$enable_gdiplus_Memory_Allocation" -eq 1; then
|
||||
patch_apply gdiplus-Memory_Allocation/0001-gdiplus-Use-helper-function-for-HeapAlloc-calls.patch
|
||||
patch_apply gdiplus-Memory_Allocation/0002-gdiplus-Use-helper-function-for-HeapReAlloc-calls.patch
|
||||
patch_apply gdiplus-Memory_Allocation/0003-gdiplus-Use-helper-function-for-remaining-HeapFree-c.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "gdiplus: Use helper function for HeapAlloc calls.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "gdiplus: Use helper function for HeapReAlloc calls.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "gdiplus: Use helper function for remaining HeapFree calls.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset hal-KeQueryPerformanceCounter
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 70bb2cad6678981c4690dcbb618d4cfaf4ec097d Mon Sep 17 00:00:00 2001
|
||||
From 4d0561f1b3bbf5d72e49ddeb14f7ed25eb9c2d01 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 17 Apr 2015 12:40:38 +0200
|
||||
Subject: server: Fix handling of opening read-only files with
|
||||
@ -11,21 +11,21 @@ Subject: server: Fix handling of opening read-only files with
|
||||
3 files changed, 10 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c
|
||||
index e43829e..d4111b9 100644
|
||||
index 5ea024f..f6ee97e 100644
|
||||
--- a/dlls/kernel32/file.c
|
||||
+++ b/dlls/kernel32/file.c
|
||||
@@ -1664,8 +1664,7 @@ BOOL WINAPI DeleteFileW( LPCWSTR path )
|
||||
@@ -1683,8 +1683,7 @@ BOOL WINAPI DeleteFileW( LPCWSTR path )
|
||||
attr.SecurityDescriptor = NULL;
|
||||
attr.SecurityQualityOfService = NULL;
|
||||
|
||||
- status = NtCreateFile(&hFile, GENERIC_READ | GENERIC_WRITE | DELETE,
|
||||
- status = NtCreateFile(&hFile, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE | DELETE,
|
||||
- &attr, &io, NULL, 0,
|
||||
+ status = NtCreateFile(&hFile, DELETE, &attr, &io, NULL, 0,
|
||||
+ status = NtCreateFile(&hFile, SYNCHRONIZE | DELETE, &attr, &io, NULL, 0,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||
FILE_OPEN, FILE_DELETE_ON_CLOSE | FILE_NON_DIRECTORY_FILE, NULL, 0);
|
||||
if (status == STATUS_SUCCESS) status = NtClose(hFile);
|
||||
diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c
|
||||
index dd64c91..3a950f1 100644
|
||||
index ca49863..134f877 100644
|
||||
--- a/dlls/kernel32/tests/file.c
|
||||
+++ b/dlls/kernel32/tests/file.c
|
||||
@@ -361,17 +361,13 @@ static void test__lcreat( void )
|
||||
@ -62,10 +62,10 @@ index dd64c91..3a950f1 100644
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index 6c78a0a..8d6067e 100644
|
||||
index fe778f1..500d273 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -1837,6 +1837,15 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
|
||||
@@ -1834,6 +1834,15 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
|
||||
list_add_head( &inode->open, &fd->inode_entry );
|
||||
closed_fd = NULL;
|
||||
|
||||
@ -82,5 +82,5 @@ index 6c78a0a..8d6067e 100644
|
||||
if ((options & FILE_DIRECTORY_FILE) && !S_ISDIR(st.st_mode))
|
||||
{
|
||||
--
|
||||
2.5.0
|
||||
2.6.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 58ff071aefe720abd2d0bb27b2c3f20b8604c279 Mon Sep 17 00:00:00 2001
|
||||
From 52759529f11102038adaa8501a44b03d9b0024ae Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 17 Nov 2013 20:25:01 +0100
|
||||
Subject: wined3d: Make surface_load_location return nothing.
|
||||
@ -9,10 +9,10 @@ Subject: wined3d: Make surface_load_location return nothing.
|
||||
2 files changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index f425b5a..b9c36d1 100644
|
||||
index 89c8ecf..0b10444 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -4251,7 +4251,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
@@ -4231,7 +4231,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. Context may be NULL in ddraw-only mode. */
|
||||
@ -21,7 +21,7 @@ index f425b5a..b9c36d1 100644
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
@@ -4263,26 +4263,26 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -4243,26 +4243,26 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
&& surface->locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_DISCARDED))
|
||||
{
|
||||
surface_load_ds_location(surface, context, location);
|
||||
@ -52,7 +52,7 @@ index f425b5a..b9c36d1 100644
|
||||
}
|
||||
|
||||
if (WARN_ON(d3d_surface))
|
||||
@@ -4297,7 +4297,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -4277,7 +4277,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
{
|
||||
ERR("Surface %p does not have any up to date location.\n", surface);
|
||||
surface->flags |= SFLAG_LOST;
|
||||
@ -61,7 +61,7 @@ index f425b5a..b9c36d1 100644
|
||||
}
|
||||
|
||||
switch (location)
|
||||
@@ -4311,7 +4311,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -4291,7 +4291,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
|
||||
case WINED3D_LOCATION_DRAWABLE:
|
||||
if (FAILED(hr = surface_load_drawable(surface, context)))
|
||||
@ -70,7 +70,7 @@ index f425b5a..b9c36d1 100644
|
||||
break;
|
||||
|
||||
case WINED3D_LOCATION_RB_RESOLVED:
|
||||
@@ -4322,7 +4322,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -4302,7 +4302,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
case WINED3D_LOCATION_TEXTURE_SRGB:
|
||||
if (FAILED(hr = surface_load_texture(surface, context,
|
||||
location == WINED3D_LOCATION_TEXTURE_SRGB)))
|
||||
@ -79,7 +79,7 @@ index f425b5a..b9c36d1 100644
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -4335,7 +4335,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -4315,7 +4315,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
if (location != WINED3D_LOCATION_SYSMEM && (surface->locations & WINED3D_LOCATION_SYSMEM))
|
||||
surface_evict_sysmem(surface);
|
||||
|
||||
@ -89,10 +89,10 @@ index f425b5a..b9c36d1 100644
|
||||
|
||||
static HRESULT ffp_blit_alloc(struct wined3d_device *device) { return WINED3D_OK; }
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 0634812..db2b974 100644
|
||||
index 8bbb1ab..9cff40e 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2451,7 +2451,7 @@ void surface_load_ds_location(struct wined3d_surface *surface,
|
||||
@@ -2457,7 +2457,7 @@ void surface_load_ds_location(struct wined3d_surface *surface,
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
|
||||
struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
@ -100,7 +100,7 @@ index 0634812..db2b974 100644
|
||||
+void surface_load_location(struct wined3d_surface *surface,
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
|
||||
void surface_prepare_rb(struct wined3d_surface *surface,
|
||||
void wined3d_surface_prepare(struct wined3d_surface *surface, struct wined3d_context *context,
|
||||
--
|
||||
2.6.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 781e34c449de14ef40eec0aec6e25d04d5808806 Mon Sep 17 00:00:00 2001
|
||||
From aaf34c4edb4e96dc735ca43288c26d46501b9a5d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 21 Jan 2014 12:22:30 +0100
|
||||
Subject: wined3d: Move surface locations into the resource.
|
||||
@ -25,7 +25,7 @@ index 9ac6666..d576869 100644
|
||||
&& !wined3d_resource_is_offscreen(&src_surface->container->resource))
|
||||
{
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 3a55e04..b3816e0 100644
|
||||
index d00f263..5e43d07 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -236,7 +236,7 @@ static void prepare_ds_clear(struct wined3d_surface *ds, struct wined3d_context
|
||||
@ -47,10 +47,10 @@ index 3a55e04..b3816e0 100644
|
||||
ds->ds_current_size.cx,
|
||||
ds->ds_current_size.cy);
|
||||
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
index d2d3bce..afccecd 100644
|
||||
index 3761830..943a829 100644
|
||||
--- a/dlls/wined3d/drawprim.c
|
||||
+++ b/dlls/wined3d/drawprim.c
|
||||
@@ -651,7 +651,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
@@ -655,7 +655,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
if (!context->render_offscreen && ds != device->onscreen_depth_stencil)
|
||||
device_switch_onscreen_ds(device, context, ds);
|
||||
|
||||
@ -60,7 +60,7 @@ index d2d3bce..afccecd 100644
|
||||
else
|
||||
SetRectEmpty(¤t_rect);
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index b9c36d1..ad94c1f 100644
|
||||
index 0b10444..8292ead 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -556,7 +556,7 @@ static void surface_prepare_system_memory(struct wined3d_surface *surface)
|
||||
@ -90,7 +90,7 @@ index b9c36d1..ad94c1f 100644
|
||||
{
|
||||
TRACE("Not dirtified, nothing to do.\n");
|
||||
return;
|
||||
@@ -1673,7 +1673,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1670,7 +1670,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
surface_load_location(dst_surface, context, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
|
||||
|
||||
@ -99,7 +99,7 @@ index b9c36d1..ad94c1f 100644
|
||||
wined3d_resource_get_pitch(&src_surface->resource, &src_row_pitch, &src_slice_pitch);
|
||||
|
||||
wined3d_surface_upload_data(dst_surface, gl_info, src_format, src_rect,
|
||||
@@ -1796,7 +1796,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
|
||||
@@ -1793,7 +1793,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
|
||||
if (surface->resource.pool == WINED3D_POOL_SCRATCH)
|
||||
ERR("Not supported on scratch surfaces.\n");
|
||||
|
||||
@ -108,7 +108,7 @@ index b9c36d1..ad94c1f 100644
|
||||
{
|
||||
TRACE("surface is already in texture\n");
|
||||
return;
|
||||
@@ -2062,7 +2062,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
@@ -2059,7 +2059,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
create_dib = TRUE;
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ index b9c36d1..ad94c1f 100644
|
||||
wined3d_resource_free_sysmem(&surface->resource);
|
||||
|
||||
width = texture_resource->width;
|
||||
@@ -3238,7 +3238,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -3235,7 +3235,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
checkGLcall("glEnable(texture_target)");
|
||||
|
||||
/* For now invalidate the texture copy of the back buffer. Drawable and sysmem copy are untouched */
|
||||
@ -126,7 +126,7 @@ index b9c36d1..ad94c1f 100644
|
||||
}
|
||||
|
||||
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
|
||||
@@ -3765,13 +3765,14 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
|
||||
@@ -3762,13 +3762,14 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
|
||||
{
|
||||
TRACE("surface %p, new location %#x, w %u, h %u.\n", surface, location, w, h);
|
||||
|
||||
@ -144,7 +144,7 @@ index b9c36d1..ad94c1f 100644
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -3786,7 +3787,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3783,7 +3784,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
/* TODO: Make this work for modes other than FBO */
|
||||
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return;
|
||||
|
||||
@ -153,7 +153,7 @@ index b9c36d1..ad94c1f 100644
|
||||
{
|
||||
w = surface->ds_current_size.cx;
|
||||
h = surface->ds_current_size.cy;
|
||||
@@ -3812,7 +3813,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3809,21 +3810,21 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
return;
|
||||
}
|
||||
|
||||
@ -161,11 +161,7 @@ index b9c36d1..ad94c1f 100644
|
||||
+ if (surface->resource.locations & WINED3D_LOCATION_DISCARDED)
|
||||
{
|
||||
TRACE("Surface was discarded, no need copy data.\n");
|
||||
switch (location)
|
||||
@@ -3832,17 +3833,17 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
default:
|
||||
FIXME("Unhandled location %#x\n", location);
|
||||
}
|
||||
wined3d_surface_prepare(surface, context, location);
|
||||
- surface->locations &= ~WINED3D_LOCATION_DISCARDED;
|
||||
- surface->locations |= location;
|
||||
+ surface->resource.locations &= ~WINED3D_LOCATION_DISCARDED;
|
||||
@ -184,7 +180,7 @@ index b9c36d1..ad94c1f 100644
|
||||
surface->ds_current_size.cx = surface->resource.width;
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
return;
|
||||
@@ -3931,7 +3932,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3911,7 +3912,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
ERR("Invalid location (%#x) specified.\n", location);
|
||||
}
|
||||
|
||||
@ -193,7 +189,7 @@ index b9c36d1..ad94c1f 100644
|
||||
surface->ds_current_size.cx = surface->resource.width;
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
}
|
||||
@@ -3940,7 +3941,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
|
||||
@@ -3920,7 +3921,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location)
|
||||
{
|
||||
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
|
||||
|
||||
@ -202,7 +198,7 @@ index b9c36d1..ad94c1f 100644
|
||||
}
|
||||
|
||||
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
|
||||
@@ -3949,9 +3950,9 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location
|
||||
@@ -3929,9 +3930,9 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location
|
||||
|
||||
if (location & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
wined3d_texture_set_dirty(surface->container);
|
||||
@ -214,7 +210,7 @@ index b9c36d1..ad94c1f 100644
|
||||
ERR("Surface %p does not have any up to date location.\n", surface);
|
||||
}
|
||||
|
||||
@@ -3987,7 +3988,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
|
||||
@@ -3967,7 +3968,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
|
||||
UINT size = surface->resource.size;
|
||||
|
||||
surface_get_memory(surface, &dst, location);
|
||||
@ -223,7 +219,7 @@ index b9c36d1..ad94c1f 100644
|
||||
|
||||
if (dst.buffer_object)
|
||||
{
|
||||
@@ -4020,33 +4021,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
@@ -4000,33 +4001,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
@ -263,7 +259,7 @@ index b9c36d1..ad94c1f 100644
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -4086,14 +4087,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4066,14 +4067,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
|
||||
&& wined3d_resource_is_offscreen(&texture->resource)
|
||||
@ -280,7 +276,7 @@ index b9c36d1..ad94c1f 100644
|
||||
&& (surface->container->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB)
|
||||
&& fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
|
||||
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format,
|
||||
@@ -4109,13 +4110,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4089,13 +4090,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@ -296,7 +292,7 @@ index b9c36d1..ad94c1f 100644
|
||||
WINED3D_LOCATION_RB_RESOLVED : WINED3D_LOCATION_RB_MULTISAMPLE;
|
||||
DWORD dst_location = srgb ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB;
|
||||
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
|
||||
@@ -4130,7 +4131,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4110,7 +4111,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
|
||||
if (srgb)
|
||||
{
|
||||
@ -305,7 +301,7 @@ index b9c36d1..ad94c1f 100644
|
||||
== WINED3D_LOCATION_TEXTURE_RGB)
|
||||
{
|
||||
/* Performance warning... */
|
||||
@@ -4141,7 +4142,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4121,7 +4122,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -314,7 +310,7 @@ index b9c36d1..ad94c1f 100644
|
||||
== WINED3D_LOCATION_TEXTURE_SRGB)
|
||||
{
|
||||
/* Performance warning... */
|
||||
@@ -4151,7 +4152,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4131,7 +4132,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
}
|
||||
}
|
||||
|
||||
@ -323,7 +319,7 @@ index b9c36d1..ad94c1f 100644
|
||||
{
|
||||
WARN("Trying to load a texture from sysmem, but no simple location is valid.\n");
|
||||
/* Lets hope we get it from somewhere... */
|
||||
@@ -4186,7 +4187,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4166,7 +4167,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
surface_remove_pbo(surface, gl_info);
|
||||
}
|
||||
|
||||
@ -332,7 +328,7 @@ index b9c36d1..ad94c1f 100644
|
||||
if (format.convert)
|
||||
{
|
||||
/* This code is entered for texture formats which need a fixup. */
|
||||
@@ -4242,7 +4243,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
@@ -4222,7 +4223,7 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
{
|
||||
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
|
||||
|
||||
@ -341,7 +337,7 @@ index b9c36d1..ad94c1f 100644
|
||||
ERR("Trying to resolve multisampled surface %p, but location WINED3D_LOCATION_RB_MULTISAMPLE not current.\n",
|
||||
surface);
|
||||
|
||||
@@ -4260,12 +4261,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4240,12 +4241,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
|
||||
{
|
||||
if (location == WINED3D_LOCATION_TEXTURE_RGB
|
||||
@ -356,7 +352,7 @@ index b9c36d1..ad94c1f 100644
|
||||
&& surface->container->resource.draw_binding != WINED3D_LOCATION_DRAWABLE)
|
||||
{
|
||||
/* Already up to date, nothing to do. */
|
||||
@@ -4274,12 +4275,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4254,12 +4255,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
else
|
||||
{
|
||||
FIXME("Unimplemented copy from %s to %s for depth/stencil buffers.\n",
|
||||
@ -371,7 +367,7 @@ index b9c36d1..ad94c1f 100644
|
||||
{
|
||||
TRACE("Location already up to date.\n");
|
||||
return;
|
||||
@@ -4293,7 +4294,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4273,7 +4274,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
required_access, surface->resource.access_flags);
|
||||
}
|
||||
|
||||
@ -380,7 +376,7 @@ index b9c36d1..ad94c1f 100644
|
||||
{
|
||||
ERR("Surface %p does not have any up to date location.\n", surface);
|
||||
surface->flags |= SFLAG_LOST;
|
||||
@@ -4332,7 +4333,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4312,7 +4313,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
|
||||
surface_validate_location(surface, location);
|
||||
|
||||
@ -389,7 +385,7 @@ index b9c36d1..ad94c1f 100644
|
||||
surface_evict_sysmem(surface);
|
||||
|
||||
return;
|
||||
@@ -5384,8 +5385,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5364,8 +5365,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
|
||||
/* In principle this would apply to depth blits as well, but we don't
|
||||
* implement those in the CPU blitter at the moment. */
|
||||
@ -400,7 +396,7 @@ index b9c36d1..ad94c1f 100644
|
||||
{
|
||||
if (scale)
|
||||
TRACE("Not doing sysmem blit because of scaling.\n");
|
||||
@@ -5425,8 +5426,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5405,8 +5406,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
color_key = &src_surface->container->async.src_blt_color_key;
|
||||
blit_op = WINED3D_BLIT_OP_COLOR_BLIT_CKEY;
|
||||
}
|
||||
@ -412,10 +408,10 @@ index b9c36d1..ad94c1f 100644
|
||||
/* Upload */
|
||||
if (scale)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 0d12529..299babb 100644
|
||||
index af6c46e..8e120df 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2395,7 +2395,6 @@ struct wined3d_surface
|
||||
@@ -2401,7 +2401,6 @@ struct wined3d_surface
|
||||
const struct wined3d_surface_ops *surface_ops;
|
||||
struct wined3d_texture *container;
|
||||
void *user_memory;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d63992004de850506b8f90ce5b80f9f73bcaad92 Mon Sep 17 00:00:00 2001
|
||||
From e8c231756407f3846d3247cd4f01955d9e5a757d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sat, 4 Jan 2014 01:02:15 +0100
|
||||
Subject: wined3d: Remove surface_invalidate_location.
|
||||
@ -15,10 +15,10 @@ Subject: wined3d: Remove surface_invalidate_location.
|
||||
8 files changed, 28 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index 582746c..79333e3 100644
|
||||
index d080585..9a882cc 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -7887,7 +7887,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
|
||||
@@ -7888,7 +7888,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
|
||||
context_release(context);
|
||||
|
||||
wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
|
||||
@ -28,10 +28,10 @@ index 582746c..79333e3 100644
|
||||
|
||||
static HRESULT arbfp_blit_color_fill(struct wined3d_device *device, struct wined3d_surface *dst_surface,
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 31fafca..0986050 100644
|
||||
index 978f7d7..8ec2964 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -3281,7 +3281,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
|
||||
@@ -3288,7 +3288,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
|
||||
if (texture->texture_srgb.name)
|
||||
wined3d_texture_load(texture, context, TRUE);
|
||||
wined3d_texture_load(texture, context, FALSE);
|
||||
@ -41,10 +41,10 @@ index 31fafca..0986050 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 8c995be..d2a08c4 100644
|
||||
index 2226f53..bb133c4 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -393,7 +393,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
@@ -398,7 +398,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
if (rt)
|
||||
{
|
||||
wined3d_resource_validate_location(&rt->resource, rt->container->resource.draw_binding);
|
||||
@ -53,7 +53,7 @@ index 8c995be..d2a08c4 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4042,7 +4042,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4016,7 +4016,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
context_release(context);
|
||||
|
||||
wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
@ -63,20 +63,20 @@ index 8c995be..d2a08c4 100644
|
||||
|
||||
HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
|
||||
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
index afccecd..d756182 100644
|
||||
index 943a829..95245a9 100644
|
||||
--- a/dlls/wined3d/drawprim.c
|
||||
+++ b/dlls/wined3d/drawprim.c
|
||||
@@ -629,7 +629,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
if (target)
|
||||
@@ -628,7 +628,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
if (state->render_states[WINED3D_RS_COLORWRITEENABLE])
|
||||
{
|
||||
surface_load_location(target, context, target->container->resource.draw_binding);
|
||||
- surface_invalidate_location(target, ~target->container->resource.draw_binding);
|
||||
+ wined3d_resource_invalidate_location(&target->resource, ~target->container->resource.draw_binding);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index bc31454..ad9310a 100644
|
||||
index ce3c439..237a6de 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -599,7 +599,7 @@ static void surface_evict_sysmem(struct wined3d_surface *surface)
|
||||
@ -88,7 +88,7 @@ index bc31454..ad9310a 100644
|
||||
}
|
||||
|
||||
static void surface_release_client_storage(struct wined3d_surface *surface)
|
||||
@@ -1131,7 +1131,7 @@ static void surface_remove_pbo(struct wined3d_surface *surface, const struct win
|
||||
@@ -1119,7 +1119,7 @@ static void surface_remove_pbo(struct wined3d_surface *surface, const struct win
|
||||
checkGLcall("glDeleteBuffers(1, &surface->pbo)");
|
||||
|
||||
surface->pbo = 0;
|
||||
@ -97,7 +97,7 @@ index bc31454..ad9310a 100644
|
||||
}
|
||||
|
||||
static ULONG surface_resource_incref(struct wined3d_resource *resource)
|
||||
@@ -1171,7 +1171,7 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
@@ -1159,7 +1159,7 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
surface_prepare_system_memory(surface);
|
||||
memset(surface->resource.heap_memory, 0, surface->resource.size);
|
||||
wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_SYSMEM);
|
||||
@ -106,7 +106,7 @@ index bc31454..ad9310a 100644
|
||||
|
||||
/* We also get here when the ddraw swapchain is destroyed, for example
|
||||
* for a mode switch. In this case this surface won't necessarily be
|
||||
@@ -1183,7 +1183,7 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
@@ -1171,7 +1171,7 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
{
|
||||
surface_prepare_map_memory(surface);
|
||||
surface_load_location(surface, context, surface->resource.map_binding);
|
||||
@ -115,7 +115,7 @@ index bc31454..ad9310a 100644
|
||||
}
|
||||
|
||||
/* Destroy PBOs, but load them into real sysmem before */
|
||||
@@ -1221,7 +1221,10 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
@@ -1209,7 +1209,10 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
|
||||
static void wined3d_surface_location_invalidated(struct wined3d_resource *resource, DWORD location)
|
||||
{
|
||||
@ -127,7 +127,7 @@ index bc31454..ad9310a 100644
|
||||
}
|
||||
|
||||
static const struct wined3d_resource_ops surface_resource_ops =
|
||||
@@ -1690,7 +1693,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1685,7 +1688,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
context_release(context);
|
||||
|
||||
wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
@ -136,7 +136,7 @@ index bc31454..ad9310a 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -2738,7 +2741,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2701,7 +2704,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
}
|
||||
|
||||
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
|
||||
@ -145,7 +145,7 @@ index bc31454..ad9310a 100644
|
||||
|
||||
switch (surface->resource.map_binding)
|
||||
{
|
||||
@@ -2854,7 +2857,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
@@ -2817,7 +2820,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
}
|
||||
|
||||
surface_load_location(surface, context, WINED3D_LOCATION_DIB);
|
||||
@ -154,7 +154,7 @@ index bc31454..ad9310a 100644
|
||||
|
||||
if (context)
|
||||
context_release(context);
|
||||
@@ -2903,7 +2906,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
|
||||
@@ -2866,7 +2869,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
|
||||
context = context_acquire(device, NULL);
|
||||
|
||||
surface_load_location(surface, context, surface->resource.map_binding);
|
||||
@ -163,7 +163,7 @@ index bc31454..ad9310a 100644
|
||||
if (context)
|
||||
context_release(context);
|
||||
}
|
||||
@@ -3213,7 +3216,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
|
||||
@@ -3173,7 +3176,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
|
||||
/* The texture is now most up to date - If the surface is a render target
|
||||
* and has a drawable, this path is never entered. */
|
||||
wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
@ -172,7 +172,7 @@ index bc31454..ad9310a 100644
|
||||
}
|
||||
|
||||
/* Uses the hardware to stretch and flip the image */
|
||||
@@ -3281,7 +3284,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -3241,7 +3244,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
checkGLcall("glEnable(texture_target)");
|
||||
|
||||
/* For now invalidate the texture copy of the back buffer. Drawable and sysmem copy are untouched */
|
||||
@ -181,7 +181,7 @@ index bc31454..ad9310a 100644
|
||||
}
|
||||
|
||||
/* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag
|
||||
@@ -3486,7 +3489,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -3446,7 +3449,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
/* The texture is now most up to date - If the surface is a render target
|
||||
* and has a drawable, this path is never entered. */
|
||||
wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
@ -190,7 +190,7 @@ index bc31454..ad9310a 100644
|
||||
}
|
||||
|
||||
/* Front buffer coordinates are always full screen coordinates, but our GL
|
||||
@@ -3991,18 +3994,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3923,18 +3926,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
}
|
||||
|
||||
@ -209,7 +209,7 @@ index bc31454..ad9310a 100644
|
||||
static DWORD resource_access_from_location(DWORD location)
|
||||
{
|
||||
switch (location)
|
||||
@@ -4553,7 +4544,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
|
||||
@@ -4485,7 +4476,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
|
||||
(old_color_key_flags & WINED3D_CKEY_SRC_BLT) ? &old_blt_key : NULL);
|
||||
|
||||
wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
|
||||
@ -218,7 +218,7 @@ index bc31454..ad9310a 100644
|
||||
}
|
||||
|
||||
const struct blit_shader ffp_blit = {
|
||||
@@ -5533,7 +5524,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5466,7 +5457,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
context_release(context);
|
||||
|
||||
wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
|
||||
@ -227,7 +227,7 @@ index bc31454..ad9310a 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -5655,7 +5646,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
|
||||
@@ -5588,7 +5579,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
|
||||
{
|
||||
wined3d_resource_free_sysmem(&surface->resource);
|
||||
wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_DIB);
|
||||
@ -237,10 +237,10 @@ index bc31454..ad9310a 100644
|
||||
|
||||
return hr;
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index bbe1b63..4f6be9e 100644
|
||||
index 45b69c8..e9fe241 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -512,7 +512,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
@@ -518,7 +518,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
if (!swapchain->render_to_fbo && render_to_fbo && wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
{
|
||||
surface_load_location(back_buffer, context, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
@ -249,7 +249,7 @@ index bbe1b63..4f6be9e 100644
|
||||
swapchain->render_to_fbo = TRUE;
|
||||
swapchain_update_draw_bindings(swapchain);
|
||||
}
|
||||
@@ -557,7 +557,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
@@ -563,7 +563,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
front = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0));
|
||||
|
||||
wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
@ -258,7 +258,7 @@ index bbe1b63..4f6be9e 100644
|
||||
/* If the swapeffect is DISCARD, the back buffer is undefined. That means the SYSMEM
|
||||
* and INTEXTURE copies can keep their old content if they have any defined content.
|
||||
* If the swapeffect is COPY, the content remains the same.
|
||||
@@ -830,7 +830,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
|
||||
@@ -836,7 +836,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
|
||||
if (!(device->wined3d->flags & WINED3D_NO3D))
|
||||
{
|
||||
wined3d_resource_validate_location(&front_buffer->resource, WINED3D_LOCATION_DRAWABLE);
|
||||
@ -268,10 +268,10 @@ index bbe1b63..4f6be9e 100644
|
||||
|
||||
/* MSDN says we're only allowed a single fullscreen swapchain per device,
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 0f06e55..f43929b 100644
|
||||
index 2f1df55..64d115c 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -775,7 +775,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
|
||||
@@ -776,7 +776,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
|
||||
context = context_acquire(surface->resource.device, NULL);
|
||||
surface_load_location(surface, context, surface->resource.map_binding);
|
||||
context_release(context);
|
||||
@ -280,7 +280,7 @@ index 0f06e55..f43929b 100644
|
||||
}
|
||||
|
||||
static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource)
|
||||
@@ -787,9 +787,7 @@ static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource
|
||||
@@ -788,9 +788,7 @@ static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource
|
||||
|
||||
static void texture2d_sub_resource_invalidate_location(struct wined3d_resource *sub_resource, DWORD location)
|
||||
{
|
||||
@ -292,10 +292,10 @@ index 0f06e55..f43929b 100644
|
||||
|
||||
static void texture2d_sub_resource_validate_location(struct wined3d_resource *sub_resource, DWORD location)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 2ada21f..9d2e40a 100644
|
||||
index 5b4ae99..3b02457 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2429,7 +2429,6 @@ HRESULT surface_color_fill(struct wined3d_surface *s,
|
||||
@@ -2452,7 +2452,6 @@ HRESULT surface_color_fill(struct wined3d_surface *s,
|
||||
GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context,
|
||||
unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN;
|
||||
@ -304,5 +304,5 @@ index 2ada21f..9d2e40a 100644
|
||||
void surface_load_ds_location(struct wined3d_surface *surface,
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.5.1
|
||||
2.6.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 03fcc50c5e40320fc211ce013ff5f3f8b9f5fd4a Mon Sep 17 00:00:00 2001
|
||||
From 38f75a5119e093e6a00849f76406aa0cd4f4b252 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 17 Nov 2013 20:33:17 +0100
|
||||
Subject: wined3d: Replace surface_load_location with resource_load_location.
|
||||
@ -15,10 +15,10 @@ FIXME: Check if this patch is complete enough to make sense.
|
||||
7 files changed, 44 insertions(+), 87 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 9cefa23..b65ac9d 100644
|
||||
index 8ec2964..4909344 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -2293,7 +2293,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
@@ -2286,7 +2286,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
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 */
|
||||
@ -28,19 +28,19 @@ index 9cefa23..b65ac9d 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 77a458b..749a517 100644
|
||||
index bb133c4..0d9debe 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -323,7 +323,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
if (rt && rt->resource.format->id != WINED3DFMT_NULL)
|
||||
{
|
||||
struct wined3d_surface *rt = wined3d_rendertarget_view_get_surface(fb->render_targets[i]);
|
||||
if (rt)
|
||||
if (flags & WINED3DCLEAR_TARGET && !is_full_clear(target, draw_rect, clear_rect))
|
||||
- surface_load_location(rt, context, rt->container->resource.draw_binding);
|
||||
+ wined3d_resource_load_location(&rt->resource, context, rt->container->resource.draw_binding);
|
||||
else
|
||||
wined3d_surface_prepare(rt, context, rt->container->resource.draw_binding);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4015,7 +4015,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4007,7 +4007,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
&& src_rect.bottom == sub_resource->height)
|
||||
wined3d_texture_prepare_texture(texture, context, FALSE);
|
||||
else
|
||||
@ -50,20 +50,20 @@ index 77a458b..749a517 100644
|
||||
|
||||
wined3d_surface_upload_data(surface, gl_info, resource->format,
|
||||
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
index d756182..0e1f4ec 100644
|
||||
index 95245a9..4b01b7d 100644
|
||||
--- a/dlls/wined3d/drawprim.c
|
||||
+++ b/dlls/wined3d/drawprim.c
|
||||
@@ -628,7 +628,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
struct wined3d_surface *target = wined3d_rendertarget_view_get_surface(device->fb.render_targets[i]);
|
||||
if (target)
|
||||
@@ -627,7 +627,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
{
|
||||
if (state->render_states[WINED3D_RS_COLORWRITEENABLE])
|
||||
{
|
||||
- surface_load_location(target, context, target->container->resource.draw_binding);
|
||||
+ wined3d_resource_load_location(&target->resource, context, target->container->resource.draw_binding);
|
||||
wined3d_resource_invalidate_location(&target->resource, ~target->container->resource.draw_binding);
|
||||
}
|
||||
}
|
||||
else
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 0e27348..83ed1e9 100644
|
||||
index 8efb896..acc210d 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -759,7 +759,7 @@ static void surface_unmap(struct wined3d_surface *surface)
|
||||
@ -84,10 +84,10 @@ index 0e27348..83ed1e9 100644
|
||||
if (!surface_is_full_rect(dst_surface, dst_rect))
|
||||
- surface_load_location(dst_surface, context, dst_location);
|
||||
+ wined3d_resource_load_location(&dst_surface->resource, context, dst_location);
|
||||
else
|
||||
wined3d_surface_prepare(dst_surface, context, dst_location);
|
||||
|
||||
gl_info = context->gl_info;
|
||||
|
||||
@@ -916,9 +916,9 @@ static void surface_blt_fbo(const struct wined3d_device *device,
|
||||
@@ -918,9 +918,9 @@ static void surface_blt_fbo(const struct wined3d_device *device,
|
||||
* surface isn't required if the entire surface is overwritten. (And is
|
||||
* in fact harmful if we're being called by surface_load_location() with
|
||||
* the purpose of loading the destination surface.) */
|
||||
@ -96,10 +96,10 @@ index 0e27348..83ed1e9 100644
|
||||
if (!surface_is_full_rect(dst_surface, &dst_rect))
|
||||
- surface_load_location(dst_surface, old_ctx, dst_location);
|
||||
+ wined3d_resource_load_location(&dst_surface->resource, old_ctx, dst_location);
|
||||
else
|
||||
wined3d_surface_prepare(dst_surface, old_ctx, dst_location);
|
||||
|
||||
if (src_location == WINED3D_LOCATION_DRAWABLE) required_rt = src_surface;
|
||||
else if (dst_location == WINED3D_LOCATION_DRAWABLE) required_rt = dst_surface;
|
||||
@@ -1173,7 +1173,7 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
@@ -1170,7 +1170,7 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
else
|
||||
{
|
||||
surface_prepare_map_memory(surface);
|
||||
@ -108,7 +108,7 @@ index 0e27348..83ed1e9 100644
|
||||
wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding);
|
||||
}
|
||||
|
||||
@@ -1218,22 +1218,6 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
|
||||
@@ -1215,22 +1215,6 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour
|
||||
wined3d_texture_set_dirty(surface->container);
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ index 0e27348..83ed1e9 100644
|
||||
static const struct wined3d_surface_ops surface_ops =
|
||||
{
|
||||
surface_private_setup,
|
||||
@@ -1687,7 +1671,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1684,7 +1668,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
if (update_w == dst_w && update_h == dst_h)
|
||||
wined3d_texture_prepare_texture(dst_surface->container, context, FALSE);
|
||||
else
|
||||
@ -140,7 +140,7 @@ index 0e27348..83ed1e9 100644
|
||||
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
|
||||
|
||||
surface_get_memory(src_surface, &data, src_surface->resource.locations);
|
||||
@@ -1820,7 +1804,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
|
||||
@@ -1817,7 +1801,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte
|
||||
}
|
||||
TRACE("Reloading because surface is dirty.\n");
|
||||
|
||||
@ -149,7 +149,7 @@ index 0e27348..83ed1e9 100644
|
||||
surface_evict_sysmem(surface);
|
||||
}
|
||||
|
||||
@@ -2709,7 +2693,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2706,7 +2690,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
|
||||
if (surface->resource.device->d3d_initialized)
|
||||
context = context_acquire(surface->resource.device, NULL);
|
||||
@ -158,7 +158,7 @@ index 0e27348..83ed1e9 100644
|
||||
if (context)
|
||||
context_release(context);
|
||||
}
|
||||
@@ -2814,7 +2798,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
@@ -2811,7 +2795,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
{
|
||||
if (surface->flags & SFLAG_CLIENT)
|
||||
{
|
||||
@ -167,7 +167,7 @@ index 0e27348..83ed1e9 100644
|
||||
surface_release_client_storage(surface);
|
||||
}
|
||||
hr = surface_create_dib_section(surface);
|
||||
@@ -2830,7 +2814,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
@@ -2827,7 +2811,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
|
||||
surface->resource.map_binding = WINED3D_LOCATION_DIB;
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ index 0e27348..83ed1e9 100644
|
||||
wined3d_resource_invalidate_location(&surface->resource, ~WINED3D_LOCATION_DIB);
|
||||
|
||||
if (context)
|
||||
@@ -2879,7 +2863,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
|
||||
@@ -2876,7 +2860,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
|
||||
if (device->d3d_initialized)
|
||||
context = context_acquire(device, NULL);
|
||||
|
||||
@ -185,7 +185,7 @@ index 0e27348..83ed1e9 100644
|
||||
wined3d_resource_invalidate_location(&surface->resource, WINED3D_LOCATION_DIB);
|
||||
if (context)
|
||||
context_release(context);
|
||||
@@ -3516,8 +3500,8 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
|
||||
@@ -3513,8 +3497,8 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
|
||||
gl_info = context->gl_info;
|
||||
|
||||
/* Make sure the surface is up-to-date. This should probably use
|
||||
@ -196,7 +196,7 @@ index 0e27348..83ed1e9 100644
|
||||
wined3d_texture_load(src_surface->container, context, FALSE);
|
||||
|
||||
/* Activate the destination context, set it up for blitting */
|
||||
@@ -3954,29 +3938,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
@@ -3934,29 +3918,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
|
||||
surface->ds_current_size.cy = surface->resource.height;
|
||||
}
|
||||
|
||||
@ -226,7 +226,7 @@ index 0e27348..83ed1e9 100644
|
||||
static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD location)
|
||||
{
|
||||
struct wined3d_device *device = surface->resource.device;
|
||||
@@ -4026,7 +3987,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
@@ -4006,7 +3967,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
|
||||
}
|
||||
|
||||
if (surface->resource.locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED))
|
||||
@ -235,7 +235,7 @@ index 0e27348..83ed1e9 100644
|
||||
|
||||
/* Download the surface to system memory. */
|
||||
if (surface->resource.locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
@@ -4062,7 +4023,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
|
||||
@@ -4042,7 +4003,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
|
||||
}
|
||||
|
||||
surface_get_rect(surface, NULL, &r);
|
||||
@ -244,7 +244,7 @@ index 0e27348..83ed1e9 100644
|
||||
surface_blt_to_drawable(surface->resource.device, context,
|
||||
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
|
||||
|
||||
@@ -4135,7 +4096,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4115,7 +4076,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
/* Performance warning... */
|
||||
FIXME("Downloading RGB surface %p to reload it as sRGB.\n", surface);
|
||||
surface_prepare_map_memory(surface);
|
||||
@ -253,7 +253,7 @@ index 0e27348..83ed1e9 100644
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -4146,7 +4107,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4126,7 +4087,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
/* Performance warning... */
|
||||
FIXME("Downloading sRGB surface %p to reload it as RGB.\n", surface);
|
||||
surface_prepare_map_memory(surface);
|
||||
@ -262,7 +262,7 @@ index 0e27348..83ed1e9 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4155,7 +4116,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4135,7 +4096,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
WARN("Trying to load a texture from sysmem, but no simple location is valid.\n");
|
||||
/* Lets hope we get it from somewhere... */
|
||||
surface_prepare_system_memory(surface);
|
||||
@ -271,7 +271,7 @@ index 0e27348..83ed1e9 100644
|
||||
}
|
||||
|
||||
wined3d_texture_prepare_texture(texture, context, srgb);
|
||||
@@ -4181,7 +4142,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -4161,7 +4122,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
surface->resource.map_binding = WINED3D_LOCATION_SYSMEM;
|
||||
|
||||
surface_prepare_map_memory(surface);
|
||||
@ -280,7 +280,7 @@ index 0e27348..83ed1e9 100644
|
||||
surface_remove_pbo(surface, gl_info);
|
||||
}
|
||||
|
||||
@@ -4249,9 +4210,11 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
@@ -4229,9 +4190,11 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct
|
||||
surface, WINED3D_LOCATION_RB_MULTISAMPLE, &rect, surface, WINED3D_LOCATION_RB_RESOLVED, &rect);
|
||||
}
|
||||
|
||||
@ -294,7 +294,7 @@ index 0e27348..83ed1e9 100644
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
|
||||
@@ -4278,20 +4241,6 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
@@ -4258,20 +4221,6 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
|
||||
}
|
||||
}
|
||||
|
||||
@ -315,7 +315,7 @@ index 0e27348..83ed1e9 100644
|
||||
if (!surface->resource.locations)
|
||||
{
|
||||
ERR("Surface %p does not have any up to date location.\n", surface);
|
||||
@@ -5441,7 +5390,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5421,7 +5370,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
if (!wined3d_resource_is_offscreen(&dst_surface->container->resource))
|
||||
{
|
||||
struct wined3d_context *context = context_acquire(device, dst_surface);
|
||||
@ -325,7 +325,7 @@ index 0e27348..83ed1e9 100644
|
||||
context_release(context);
|
||||
}
|
||||
return WINED3D_OK;
|
||||
@@ -5514,6 +5464,15 @@ cpu:
|
||||
@@ -5494,6 +5444,15 @@ cpu:
|
||||
return surface_cpu_blt(dst_surface, &dst_rect, src_surface, &src_rect, flags, fx, filter);
|
||||
}
|
||||
|
||||
@ -342,10 +342,10 @@ index 0e27348..83ed1e9 100644
|
||||
const struct wined3d_resource_desc *desc, GLenum target, unsigned int level, unsigned int layer, DWORD flags)
|
||||
{
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index d0b8cf0..cf2543e 100644
|
||||
index 50cd3ea..6ceac57 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -309,7 +309,7 @@ static void swapchain_blit(const struct wined3d_swapchain *swapchain,
|
||||
@@ -315,7 +315,7 @@ static void swapchain_blit(const struct wined3d_swapchain *swapchain,
|
||||
if (backbuffer->resource.multisample_type)
|
||||
{
|
||||
location = WINED3D_LOCATION_RB_RESOLVED;
|
||||
@ -354,7 +354,7 @@ index d0b8cf0..cf2543e 100644
|
||||
}
|
||||
|
||||
context_apply_fbo_state_blit(context, GL_READ_FRAMEBUFFER, backbuffer, NULL, location);
|
||||
@@ -511,14 +511,14 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
@@ -517,14 +517,14 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
*/
|
||||
if (!swapchain->render_to_fbo && render_to_fbo && wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
{
|
||||
@ -371,7 +371,7 @@ index d0b8cf0..cf2543e 100644
|
||||
}
|
||||
|
||||
if (swapchain->render_to_fbo)
|
||||
@@ -611,7 +611,7 @@ void x11_copy_to_screen(const struct wined3d_swapchain *swapchain, const RECT *r
|
||||
@@ -617,7 +617,7 @@ void x11_copy_to_screen(const struct wined3d_swapchain *swapchain, const RECT *r
|
||||
|
||||
TRACE("Copying surface %p to screen.\n", front);
|
||||
|
||||
@ -381,10 +381,10 @@ index d0b8cf0..cf2543e 100644
|
||||
src_dc = front->hDC;
|
||||
window = swapchain->win_handle;
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 7694035..0241309 100644
|
||||
index b38805e..f067a87 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -773,7 +773,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
|
||||
@@ -774,7 +774,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
|
||||
|
||||
surface_prepare_map_memory(surface);
|
||||
context = context_acquire(surface->resource.device, NULL);
|
||||
@ -394,18 +394,18 @@ index 7694035..0241309 100644
|
||||
wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding);
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index bb12fe6..1eeab9e 100644
|
||||
index 37b37f2..297bdda 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2454,8 +2454,6 @@ void surface_load_ds_location(struct wined3d_surface *surface,
|
||||
@@ -2460,8 +2460,6 @@ void surface_load_ds_location(struct wined3d_surface *surface,
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
|
||||
struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
-void surface_load_location(struct wined3d_surface *surface,
|
||||
- struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
|
||||
void surface_prepare_rb(struct wined3d_surface *surface,
|
||||
const struct wined3d_gl_info *gl_info, BOOL multisample) DECLSPEC_HIDDEN;
|
||||
void wined3d_surface_prepare(struct wined3d_surface *surface, struct wined3d_context *context,
|
||||
DWORD location) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.6.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b21f804efaddc89cdce137a0bba20c1d92f09279 Mon Sep 17 00:00:00 2001
|
||||
From 5aa0f038a7e25f3e260ad9efedf90fe26e28a91d 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 71c7c2e..51fe69f 100644
|
||||
index 9a882cc..df89a05 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 71c7c2e..51fe69f 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,
|
||||
@@ -4702,7 +4702,7 @@ static void shader_arb_select(void *shader_priv, struct wined3d_context *context
|
||||
@@ -4712,7 +4712,7 @@ static void shader_arb_select(void *shader_priv, struct wined3d_context *context
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -42,10 +42,10 @@ index 71c7c2e..51fe69f 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 5f70ce5..1be568c 100644
|
||||
index 4909344..b7085a5 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -1509,6 +1509,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
@@ -1516,6 +1516,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ index 5f70ce5..1be568c 100644
|
||||
/* Initialize the texture unit mapping to a 1:1 mapping */
|
||||
for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s)
|
||||
{
|
||||
@@ -1822,6 +1828,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
@@ -1829,6 +1835,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 5f70ce5..1be568c 100644
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_event_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries);
|
||||
@@ -1856,6 +1863,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
@@ -1863,6 +1870,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 5f70ce5..1be568c 100644
|
||||
HeapFree(GetProcessHeap(), 0, context->draw_buffers);
|
||||
HeapFree(GetProcessHeap(), 0, context->blit_targets);
|
||||
device_context_remove(device, context);
|
||||
@@ -2371,7 +2379,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2378,7 +2386,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
DWORD rt_mask = 0, *cur_mask;
|
||||
UINT i;
|
||||
|
||||
@ -83,7 +83,7 @@ index 5f70ce5..1be568c 100644
|
||||
|| rt_count != context->gl_info->limits.buffers)
|
||||
{
|
||||
if (!context_validate_rt_config(rt_count, rts, dsv))
|
||||
@@ -2416,6 +2424,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2423,6 +2431,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 5f70ce5..1be568c 100644
|
||||
}
|
||||
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
|
||||
&& (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource)))
|
||||
@@ -2466,7 +2476,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2473,7 +2483,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 5f70ce5..1be568c 100644
|
||||
struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL];
|
||||
DWORD rt_mask, rt_mask_bits;
|
||||
unsigned int i;
|
||||
@@ -2496,7 +2506,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
@@ -2503,7 +2513,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 5f70ce5..1be568c 100644
|
||||
DWORD rt_mask = find_draw_buffers_mask(context, device);
|
||||
DWORD *cur_mask;
|
||||
|
||||
@@ -2528,6 +2538,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
@@ -2535,6 +2545,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 5f70ce5..1be568c 100644
|
||||
}
|
||||
|
||||
static void context_map_stage(struct wined3d_context *context, DWORD stage, DWORD unit)
|
||||
@@ -3152,7 +3164,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
|
||||
@@ -3159,7 +3171,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;
|
||||
@ -129,7 +129,7 @@ index 5f70ce5..1be568c 100644
|
||||
WORD map;
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 459fd56..a07cc6c 100644
|
||||
index 3c4ea8c..72b46be 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -290,7 +290,7 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
@ -205,10 +205,10 @@ index 459fd56..a07cc6c 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
}
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 1da2df4..5200f3e 100644
|
||||
index 0d9debe..5a21510 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
|
||||
@@ -865,7 +865,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
|
||||
BOOL ds_enable = !!swapchain->desc.enable_auto_depth_stencil;
|
||||
unsigned int i;
|
||||
|
||||
@ -217,7 +217,7 @@ index 1da2df4..5200f3e 100644
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -878,7 +878,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -883,7 +883,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
struct wined3d_swapchain_desc *swapchain_desc)
|
||||
{
|
||||
static const struct wined3d_color black = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
@ -225,7 +225,7 @@ index 1da2df4..5200f3e 100644
|
||||
struct wined3d_swapchain *swapchain = NULL;
|
||||
struct wined3d_context *context;
|
||||
DWORD clear_flags = 0;
|
||||
@@ -891,9 +890,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -896,9 +895,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
if (device->wined3d->flags & WINED3D_NO3D)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
@ -235,7 +235,7 @@ index 1da2df4..5200f3e 100644
|
||||
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
|
||||
device->adapter->vertex_pipe, device->adapter->fragment_pipe)))
|
||||
{
|
||||
@@ -981,7 +977,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -986,7 +982,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
return WINED3D_OK;
|
||||
|
||||
err_out:
|
||||
@ -243,7 +243,7 @@ index 1da2df4..5200f3e 100644
|
||||
HeapFree(GetProcessHeap(), 0, device->swapchains);
|
||||
device->swapchain_count = 0;
|
||||
if (device->back_buffer_view)
|
||||
@@ -1060,8 +1055,25 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1065,8 +1060,25 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
if (device->cursor_texture)
|
||||
wined3d_texture_decref(device->cursor_texture);
|
||||
|
||||
@ -269,7 +269,7 @@ index 1da2df4..5200f3e 100644
|
||||
/* Unload resources */
|
||||
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
|
||||
{
|
||||
@@ -1092,37 +1104,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1097,37 +1109,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
* destroy the context. */
|
||||
context_release(context);
|
||||
|
||||
@ -307,7 +307,7 @@ index 1da2df4..5200f3e 100644
|
||||
if (device->back_buffer_view)
|
||||
{
|
||||
wined3d_rendertarget_view_decref(device->back_buffer_view);
|
||||
@@ -1140,9 +1121,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1145,9 +1126,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
device->swapchains = NULL;
|
||||
device->swapchain_count = 0;
|
||||
|
||||
@ -317,7 +317,7 @@ index 1da2df4..5200f3e 100644
|
||||
device->d3d_initialized = FALSE;
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -1938,7 +1916,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
@@ -1943,7 +1921,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
|| !(texture->resource.format_flags & WINED3DFMT_FLAG_DEPTH))
|
||||
return;
|
||||
surface = surface_from_resource(texture->sub_resources[0]);
|
||||
@ -326,7 +326,7 @@ index 1da2df4..5200f3e 100644
|
||||
return;
|
||||
|
||||
wined3d_surface_blt(surface, NULL, depth_stencil, NULL, 0, NULL, WINED3D_TEXF_POINT);
|
||||
@@ -3327,6 +3305,8 @@ HRESULT CDECL wined3d_device_present(const struct wined3d_device *device, const
|
||||
@@ -3298,6 +3276,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)
|
||||
{
|
||||
@ -335,7 +335,7 @@ index 1da2df4..5200f3e 100644
|
||||
TRACE("device %p, rect_count %u, rects %p, flags %#x, color {%.8e, %.8e, %.8e, %.8e}, depth %.8e, stencil %u.\n",
|
||||
device, rect_count, rects, flags, color->r, color->g, color->b, color->a, depth, stencil);
|
||||
|
||||
@@ -3338,7 +3318,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3309,7 +3289,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
|
||||
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
|
||||
{
|
||||
@ -344,7 +344,7 @@ index 1da2df4..5200f3e 100644
|
||||
if (!ds)
|
||||
{
|
||||
WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
|
||||
@@ -3347,8 +3327,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3318,8 +3298,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
}
|
||||
else if (flags & WINED3DCLEAR_TARGET)
|
||||
{
|
||||
@ -355,7 +355,7 @@ index 1da2df4..5200f3e 100644
|
||||
{
|
||||
WARN("Silently ignoring depth and target clear with mismatching sizes\n");
|
||||
return WINED3D_OK;
|
||||
@@ -3724,8 +3704,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
@@ -3682,8 +3662,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])
|
||||
{
|
||||
@ -366,7 +366,7 @@ index 1da2df4..5200f3e 100644
|
||||
|
||||
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
|
||||
{
|
||||
@@ -4105,20 +4085,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
@@ -4063,20 +4043,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -390,7 +390,7 @@ index 1da2df4..5200f3e 100644
|
||||
|
||||
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
|
||||
device, view_idx, view, set_viewport);
|
||||
@@ -4158,13 +4139,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -4116,13 +4097,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
}
|
||||
|
||||
|
||||
@ -406,7 +406,7 @@ index 1da2df4..5200f3e 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. */
|
||||
@@ -4176,18 +4157,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -4134,18 +4115,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)
|
||||
{
|
||||
@ -428,7 +428,7 @@ index 1da2df4..5200f3e 100644
|
||||
wined3d_rendertarget_view_incref(view);
|
||||
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
|
||||
if (prev)
|
||||
@@ -4540,10 +4522,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4509,10 +4491,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
wined3d_texture_decref(device->cursor_texture);
|
||||
device->cursor_texture = NULL;
|
||||
}
|
||||
@ -440,7 +440,7 @@ index 1da2df4..5200f3e 100644
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -4552,6 +4533,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4521,6 +4502,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
}
|
||||
wined3d_device_set_depth_stencil_view(device, NULL);
|
||||
|
||||
@ -452,7 +452,7 @@ index 1da2df4..5200f3e 100644
|
||||
if (device->onscreen_depth_stencil)
|
||||
{
|
||||
wined3d_surface_decref(device->onscreen_depth_stencil);
|
||||
@@ -4765,7 +4751,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4739,7 +4725,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
if (device->d3d_initialized)
|
||||
delete_opengl_contexts(device, swapchain);
|
||||
|
||||
@ -461,7 +461,7 @@ index 1da2df4..5200f3e 100644
|
||||
&device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT)))
|
||||
ERR("Failed to initialize device state, hr %#x.\n", hr);
|
||||
device->update_state = &device->state;
|
||||
@@ -4774,22 +4760,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4748,22 +4734,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
}
|
||||
else if (device->back_buffer_view)
|
||||
{
|
||||
@ -489,7 +489,7 @@ index 1da2df4..5200f3e 100644
|
||||
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
|
||||
}
|
||||
|
||||
@@ -4877,17 +4862,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
@@ -4851,17 +4836,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -511,7 +511,7 @@ index 1da2df4..5200f3e 100644
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -5050,7 +5035,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
@@ -5024,7 +5009,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
|
||||
device->blitter = adapter->blitter;
|
||||
|
||||
@ -521,7 +521,7 @@ index 1da2df4..5200f3e 100644
|
||||
{
|
||||
ERR("Failed to initialize device state, hr %#x.\n", hr);
|
||||
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
index bafe7dd..496d66f 100644
|
||||
index 4b01b7d..7e3a7f7 100644
|
||||
--- a/dlls/wined3d/drawprim.c
|
||||
+++ b/dlls/wined3d/drawprim.c
|
||||
@@ -611,7 +611,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
@ -533,16 +533,16 @@ index bafe7dd..496d66f 100644
|
||||
if (!context->valid)
|
||||
{
|
||||
context_release(context);
|
||||
@@ -625,7 +625,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
/* Invalidate the back buffer memory so LockRect will read it the next time */
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
@@ -622,7 +622,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
- struct wined3d_surface *target = wined3d_rendertarget_view_get_surface(device->fb.render_targets[i]);
|
||||
+ struct wined3d_surface *target = wined3d_rendertarget_view_get_surface(state->fb.render_targets[i]);
|
||||
if (target && target->resource.format->id != WINED3DFMT_NULL)
|
||||
{
|
||||
- struct wined3d_surface *target = wined3d_rendertarget_view_get_surface(device->fb.render_targets[i]);
|
||||
+ struct wined3d_surface *target = wined3d_rendertarget_view_get_surface(state->fb.render_targets[i]);
|
||||
if (target)
|
||||
{
|
||||
wined3d_resource_load_location(&target->resource, context, target->container->resource.draw_binding);
|
||||
@@ -634,18 +634,18 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
if (state->render_states[WINED3D_RS_COLORWRITEENABLE])
|
||||
@@ -637,16 +637,16 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
}
|
||||
}
|
||||
|
||||
@ -557,14 +557,12 @@ index bafe7dd..496d66f 100644
|
||||
- DWORD location = context->render_offscreen ? device->fb.depth_stencil->resource->draw_binding
|
||||
+ DWORD location = context->render_offscreen ? state->fb.depth_stencil->resource->draw_binding
|
||||
: WINED3D_LOCATION_DRAWABLE;
|
||||
- struct wined3d_surface *ds = wined3d_rendertarget_view_get_surface(device->fb.depth_stencil);
|
||||
+ struct wined3d_surface *ds = wined3d_rendertarget_view_get_surface(state->fb.depth_stencil);
|
||||
|
||||
if (state->render_states[WINED3D_RS_ZWRITEENABLE] || state->render_states[WINED3D_RS_ZENABLE])
|
||||
{
|
||||
- struct wined3d_surface *ds = wined3d_rendertarget_view_get_surface(device->fb.depth_stencil);
|
||||
+ struct wined3d_surface *ds = wined3d_rendertarget_view_get_surface(state->fb.depth_stencil);
|
||||
RECT current_rect, draw_rect, r;
|
||||
|
||||
if (!context->render_offscreen && ds != device->onscreen_depth_stencil)
|
||||
@@ -671,9 +671,9 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
@@ -679,9 +679,9 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
return;
|
||||
}
|
||||
|
||||
@ -577,10 +575,10 @@ index bafe7dd..496d66f 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 7bcf102..5b19799 100644
|
||||
index 4a95e44..c2762a3 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -1552,7 +1552,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
@@ -1626,7 +1626,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,10 +588,10 @@ index 7bcf102..5b19799 100644
|
||||
const struct wined3d_shader_lconst *lconst;
|
||||
const char *prefix;
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
index e9be51e..8cf853d 100644
|
||||
index c3a842e..ae3770d 100644
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -2404,7 +2404,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
@@ -2411,7 +2411,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */
|
||||
if (!gl_info->supported[ARB_FRAMEBUFFER_SRGB] && state->render_states[WINED3D_RS_SRGBWRITEENABLE])
|
||||
{
|
||||
@ -603,7 +601,7 @@ index e9be51e..8cf853d 100644
|
||||
{
|
||||
static unsigned int warned = 0;
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 3225aa6..02e972c 100644
|
||||
index 2be3cab..e789786 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_
|
||||
@ -690,7 +688,7 @@ index 3225aa6..02e972c 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 763a5f9..790d769 100644
|
||||
index cb3d494..6b348b8 100644
|
||||
--- a/dlls/wined3d/stateblock.c
|
||||
+++ b/dlls/wined3d/stateblock.c
|
||||
@@ -464,6 +464,7 @@ void state_unbind_resources(struct wined3d_state *state)
|
||||
@ -790,10 +788,10 @@ index 763a5f9..790d769 100644
|
||||
|
||||
if (FAILED(hr = stateblock_allocate_shader_constants(stateblock)))
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 07eee26..1b05f65 100644
|
||||
index a646c90..4111042 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -3405,8 +3405,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
@@ -3270,8 +3270,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
enum wined3d_texture_filter_type filter)
|
||||
{
|
||||
struct wined3d_device *device = dst_surface->resource.device;
|
||||
@ -804,10 +802,10 @@ index 07eee26..1b05f65 100644
|
||||
TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, blt_fx %p, filter %s.\n",
|
||||
dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect),
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index 5c06f89..c46227a 100644
|
||||
index 37b025a..a1e4a0b 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -421,7 +421,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
@@ -427,7 +427,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
{
|
||||
struct wined3d_surface *back_buffer = surface_from_resource(
|
||||
wined3d_texture_get_sub_resource(swapchain->back_buffers[0], 0));
|
||||
@ -817,10 +815,10 @@ index 5c06f89..c46227a 100644
|
||||
struct wined3d_context *context;
|
||||
struct wined3d_surface *front;
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index 0d4e878..c763330 100644
|
||||
index e7f9cbd..81af9d5 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -3721,7 +3721,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
@@ -3733,7 +3733,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 +827,7 @@ index 0d4e878..c763330 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;
|
||||
@@ -4311,7 +4311,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
@@ -4396,7 +4396,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 +837,10 @@ index 0d4e878..c763330 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 bf5abcf..b96b9c9 100644
|
||||
index c55e917..400cffb 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1138,6 +1138,36 @@ struct wined3d_timestamp_query
|
||||
@@ -1149,6 +1149,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 +877,7 @@ index bf5abcf..b96b9c9 100644
|
||||
struct wined3d_context
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
@@ -1152,6 +1182,7 @@ struct wined3d_context
|
||||
@@ -1163,6 +1193,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 +885,7 @@ index bf5abcf..b96b9c9 100644
|
||||
|
||||
struct wined3d_swapchain *swapchain;
|
||||
struct wined3d_surface *current_rt;
|
||||
@@ -1253,12 +1284,6 @@ struct wined3d_context
|
||||
@@ -1264,12 +1295,6 @@ struct wined3d_context
|
||||
GLuint dummy_arbfp_prog;
|
||||
};
|
||||
|
||||
@ -900,7 +898,7 @@ index bf5abcf..b96b9c9 100644
|
||||
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
|
||||
|
||||
struct StateEntry
|
||||
@@ -1969,7 +1994,7 @@ struct wined3d_stream_state
|
||||
@@ -1986,7 +2011,7 @@ struct wined3d_stream_state
|
||||
struct wined3d_state
|
||||
{
|
||||
DWORD flags;
|
||||
@ -909,7 +907,7 @@ index bf5abcf..b96b9c9 100644
|
||||
|
||||
struct wined3d_vertex_declaration *vertex_declaration;
|
||||
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
|
||||
@@ -2075,7 +2100,6 @@ struct wined3d_device
|
||||
@@ -2092,7 +2117,6 @@ struct wined3d_device
|
||||
struct wine_rb_tree samplers;
|
||||
|
||||
/* Render Target Support */
|
||||
@ -917,7 +915,7 @@ index bf5abcf..b96b9c9 100644
|
||||
struct wined3d_surface *onscreen_depth_stencil;
|
||||
struct wined3d_rendertarget_view *auto_depth_stencil_view;
|
||||
|
||||
@@ -2583,9 +2607,8 @@ struct wined3d_stateblock
|
||||
@@ -2608,9 +2632,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 +927,7 @@ index bf5abcf..b96b9c9 100644
|
||||
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
|
||||
struct wined3d_cs_ops
|
||||
@@ -2598,7 +2621,6 @@ struct wined3d_cs
|
||||
@@ -2623,7 +2646,6 @@ struct wined3d_cs
|
||||
{
|
||||
const struct wined3d_cs_ops *ops;
|
||||
struct wined3d_device *device;
|
||||
@ -938,5 +936,5 @@ index bf5abcf..b96b9c9 100644
|
||||
|
||||
size_t data_size;
|
||||
--
|
||||
2.5.0
|
||||
2.6.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 628ad3187b1534791c9cecab65d8a9f958dbf3f4 Mon Sep 17 00:00:00 2001
|
||||
From 78e1e4771d85128087e911b9a0ad81998fb98096 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 2 Apr 2013 17:25:19 +0200
|
||||
Subject: wined3d: Pass the state to draw_primitive
|
||||
@ -15,7 +15,7 @@ Subject: wined3d: Pass the state to draw_primitive
|
||||
8 files changed, 29 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index 1f9a213..8d20f76 100644
|
||||
index 6fff047..4f4827f 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -423,7 +423,7 @@ static inline void fixup_d3dcolor(DWORD *dst_color)
|
||||
@ -42,10 +42,10 @@ index 1f9a213..8d20f76 100644
|
||||
*/
|
||||
if (!gl_info->supported[ARB_VERTEX_BUFFER_OBJECT])
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 4d124c6..8ff8ebe 100644
|
||||
index c1b6e01..d9e2bc1 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -2985,7 +2985,7 @@ static void context_update_stream_info(struct wined3d_context *context, const st
|
||||
@@ -2992,7 +2992,7 @@ static void context_update_stream_info(struct wined3d_context *context, const st
|
||||
{
|
||||
if (state->vertex_declaration->half_float_conv_needed && !stream_info->all_vbo)
|
||||
{
|
||||
@ -54,7 +54,7 @@ index 4d124c6..8ff8ebe 100644
|
||||
context->use_immediate_mode_draw = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -3160,9 +3160,9 @@ static void context_bind_shader_resources(struct wined3d_context *context, const
|
||||
@@ -3167,9 +3167,9 @@ static void context_bind_shader_resources(struct wined3d_context *context, const
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@ -67,7 +67,7 @@ index 4d124c6..8ff8ebe 100644
|
||||
const struct wined3d_fb_state *fb = &state->fb;
|
||||
unsigned int i;
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 8ab6685..7e1891f 100644
|
||||
index 784de6e..d14fd82 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -492,7 +492,7 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@ -80,10 +80,10 @@ index 8ab6685..7e1891f 100644
|
||||
|
||||
return sizeof(*op);
|
||||
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
|
||||
index 8e4448d..ff10b64 100644
|
||||
index d7f0512..71688a5 100644
|
||||
--- a/dlls/wined3d/directx.c
|
||||
+++ b/dlls/wined3d/directx.c
|
||||
@@ -5487,7 +5487,7 @@ static void WINE_GLAPI invalid_texcoord_func(GLenum unit, const void *data)
|
||||
@@ -5503,7 +5503,7 @@ static void WINE_GLAPI invalid_texcoord_func(GLenum unit, const void *data)
|
||||
}
|
||||
|
||||
/* Helper functions for providing vertex data to opengl. The arrays are initialized based on
|
||||
@ -93,7 +93,7 @@ index 8e4448d..ff10b64 100644
|
||||
static void WINE_GLAPI position_d3dcolor(const void *data)
|
||||
{
|
||||
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
index b10bc45..529bcd6 100644
|
||||
index af51dfd..bfbdf8c 100644
|
||||
--- a/dlls/wined3d/drawprim.c
|
||||
+++ b/dlls/wined3d/drawprim.c
|
||||
@@ -36,7 +36,7 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_perf);
|
||||
@ -154,8 +154,8 @@ index b10bc45..529bcd6 100644
|
||||
const struct wined3d_stream_info *stream_info;
|
||||
struct wined3d_event_query *ib_query = NULL;
|
||||
struct wined3d_stream_info si_emulated;
|
||||
@@ -664,7 +663,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
}
|
||||
@@ -672,7 +671,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
wined3d_surface_prepare(ds, context, location);
|
||||
}
|
||||
|
||||
- if (!context_apply_draw_state(context, device))
|
||||
@ -163,7 +163,7 @@ index b10bc45..529bcd6 100644
|
||||
{
|
||||
context_release(context);
|
||||
WARN("Unable to apply draw state, skipping draw.\n");
|
||||
@@ -756,28 +755,28 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
@@ -764,28 +763,28 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
else
|
||||
WARN_(d3d_perf)("Using immediate mode with vertex shaders for half float emulation.\n");
|
||||
|
||||
@ -198,7 +198,7 @@ index b10bc45..529bcd6 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 02e972c..976847d 100644
|
||||
index e789786..8362ef8 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -1126,7 +1126,7 @@ void state_fog_fragpart(struct wined3d_context *context, const struct wined3d_st
|
||||
@ -220,10 +220,10 @@ index 02e972c..976847d 100644
|
||||
*/
|
||||
WARN("unsupported blending in openGl\n");
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index c763330..3aca4f2 100644
|
||||
index 81af9d5..64e6d6a 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -3854,7 +3854,7 @@ static void compute_texture_matrix(const struct wined3d_gl_info *gl_info, const
|
||||
@@ -3866,7 +3866,7 @@ static void compute_texture_matrix(const struct wined3d_gl_info *gl_info, const
|
||||
* check for pixel shaders, and the shader has to undo the default gl divide.
|
||||
*
|
||||
* A more serious problem occurs if the app passes 4 coordinates in, and the
|
||||
@ -233,10 +233,10 @@ index c763330..3aca4f2 100644
|
||||
default:
|
||||
mat._14 = mat._24 = mat._34 = 0.0f; mat._44 = 1.0f;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 92d5490..cf9e88e 100644
|
||||
index 2667936..2467c22 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1010,8 +1010,9 @@ struct wined3d_stream_info
|
||||
@@ -1021,8 +1021,9 @@ struct wined3d_stream_info
|
||||
WORD use_map; /* MAX_ATTRIBS, 16 */
|
||||
};
|
||||
|
||||
@ -248,7 +248,7 @@ index 92d5490..cf9e88e 100644
|
||||
DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) DECLSPEC_HIDDEN;
|
||||
|
||||
#define eps 1e-8f
|
||||
@@ -1422,7 +1423,8 @@ void context_alloc_occlusion_query(struct wined3d_context *context,
|
||||
@@ -1433,7 +1434,8 @@ void context_alloc_occlusion_query(struct wined3d_context *context,
|
||||
void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
BOOL context_apply_clear_state(struct wined3d_context *context, const struct wined3d_device *device,
|
||||
UINT rt_count, const struct wined3d_fb_state *fb) DECLSPEC_HIDDEN;
|
||||
@ -259,5 +259,5 @@ index 92d5490..cf9e88e 100644
|
||||
struct wined3d_surface *render_target, struct wined3d_surface *depth_stencil, DWORD location) DECLSPEC_HIDDEN;
|
||||
void context_active_texture(struct wined3d_context *context, const struct wined3d_gl_info *gl_info,
|
||||
--
|
||||
2.5.0
|
||||
2.6.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 3d851db23b85050b91b68a9556fd5b3407166089 Mon Sep 17 00:00:00 2001
|
||||
From ea3a3342b80849797472ffbaa5d722def0b599ab Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Fri, 5 Apr 2013 14:37:44 +0200
|
||||
Subject: wined3d: Keep track of the onscreen depth stencil in the command
|
||||
@ -23,10 +23,10 @@ configurations.
|
||||
5 files changed, 38 insertions(+), 39 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 4b1ed18..236e2f2 100644
|
||||
index 948bc80..9147719 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -629,10 +629,10 @@ static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -639,10 +639,10 @@ static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
|| prev_surface->flags & SFLAG_DISCARD))
|
||||
{
|
||||
surface_modify_ds_location(prev_surface, WINED3D_LOCATION_DISCARDED, prev->width, prev->height);
|
||||
@ -40,7 +40,7 @@ index 4b1ed18..236e2f2 100644
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1365,6 +1365,22 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
|
||||
@@ -1480,6 +1480,22 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
|
||||
wined3d_cs_flush(cs);
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ index 4b1ed18..236e2f2 100644
|
||||
{
|
||||
struct wined3d_cs *cs = thread_param;
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index c3e7d33..9fe7760 100644
|
||||
index eecb8b2..b1502c1 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -198,22 +198,6 @@ void device_context_remove(struct wined3d_device *device, struct wined3d_context
|
||||
@ -90,7 +90,7 @@ index c3e7d33..9fe7760 100644
|
||||
static BOOL is_full_clear(const struct wined3d_surface *target, const RECT *draw_rect, const RECT *clear_rect)
|
||||
{
|
||||
/* partial draw rect */
|
||||
@@ -343,8 +327,8 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
@@ -348,8 +332,8 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
{
|
||||
DWORD location = render_offscreen ? fb->depth_stencil->resource->draw_binding : WINED3D_LOCATION_DRAWABLE;
|
||||
|
||||
@ -101,7 +101,7 @@ index c3e7d33..9fe7760 100644
|
||||
prepare_ds_clear(depth_stencil, context, location,
|
||||
draw_rect, rect_count, clear_rect, &ds_rect);
|
||||
}
|
||||
@@ -1060,11 +1044,12 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1064,11 +1048,12 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
/* Release the buffers (with sanity checks).
|
||||
* FIXME: Move this move into a separate patch. I think the idea
|
||||
* behind this is that those surfaces should be freed before unloading
|
||||
@ -118,7 +118,7 @@ index c3e7d33..9fe7760 100644
|
||||
wined3d_surface_decref(surface);
|
||||
}
|
||||
|
||||
@@ -4402,10 +4387,10 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4559,10 +4544,10 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
state_unbind_resources(&device->state);
|
||||
}
|
||||
|
||||
@ -133,11 +133,11 @@ index c3e7d33..9fe7760 100644
|
||||
|
||||
if (reset_state)
|
||||
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
index 43d867d..5eb80f0 100644
|
||||
index 21ce53a..9ec380a 100644
|
||||
--- a/dlls/wined3d/drawprim.c
|
||||
+++ b/dlls/wined3d/drawprim.c
|
||||
@@ -644,8 +644,8 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
|
||||
struct wined3d_surface *ds = wined3d_rendertarget_view_get_surface(state->fb.depth_stencil);
|
||||
@@ -651,8 +651,8 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
|
||||
{
|
||||
RECT current_rect, draw_rect, r;
|
||||
|
||||
- if (!context->render_offscreen && ds != device->onscreen_depth_stencil)
|
||||
@ -148,10 +148,10 @@ index 43d867d..5eb80f0 100644
|
||||
if (ds->resource.locations & location)
|
||||
SetRect(¤t_rect, 0, 0, ds->ds_current_size.cx, ds->ds_current_size.cy);
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index e190892..fa0c241 100644
|
||||
index 1ae7bb0..13d82e2 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -581,10 +581,10 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
@@ -588,10 +588,10 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
{
|
||||
surface_modify_ds_location(depth_stencil, WINED3D_LOCATION_DISCARDED,
|
||||
depth_stencil->resource.width, depth_stencil->resource.height);
|
||||
@ -166,10 +166,10 @@ index e190892..fa0c241 100644
|
||||
}
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 0aed164..aadb8db 100644
|
||||
index 4e3da0c..212db68 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2021,15 +2021,12 @@ struct wined3d_device
|
||||
@@ -2116,15 +2116,12 @@ struct wined3d_device
|
||||
struct wined3d_rendertarget_view *back_buffer_view;
|
||||
struct wined3d_swapchain **swapchains;
|
||||
UINT swapchain_count;
|
||||
@ -186,7 +186,7 @@ index 0aed164..aadb8db 100644
|
||||
/* For rendering to a texture using glCopyTexImage */
|
||||
GLuint depth_blt_texture;
|
||||
|
||||
@@ -2071,8 +2068,6 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -2166,8 +2163,6 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN;
|
||||
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
@ -195,7 +195,7 @@ index 0aed164..aadb8db 100644
|
||||
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
@@ -2559,6 +2554,7 @@ struct wined3d_cs
|
||||
@@ -2667,6 +2662,7 @@ struct wined3d_cs
|
||||
struct wined3d_state state;
|
||||
HANDLE thread;
|
||||
DWORD tls_idx;
|
||||
@ -203,7 +203,7 @@ index 0aed164..aadb8db 100644
|
||||
|
||||
size_t data_size;
|
||||
void *data;
|
||||
@@ -2569,6 +2565,8 @@ struct wined3d_cs
|
||||
@@ -2677,6 +2673,8 @@ struct wined3d_cs
|
||||
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
@ -213,5 +213,5 @@ index 0aed164..aadb8db 100644
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.2.1
|
||||
2.6.1
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user