mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Rebase against 38f3d59ed694afba7913b4992d13cb044a09126c.
[user32-CharToOem] Removed patch to properly handle invalid parameters in CharToOem* and OemToChar* APIs (accepted upstream).
This commit is contained in:
parent
867c8334a1
commit
970dc74e89
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "94b6a885a880728f5e0a865fc17a82532723e756"
|
||||
echo "38f3d59ed694afba7913b4992d13cb044a09126c"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -322,7 +322,6 @@ patch_enable_all ()
|
||||
enable_taskmgr_Memory_Usage="$1"
|
||||
enable_user_exe16_CONTAINING_RECORD="$1"
|
||||
enable_user_exe16_DlgDirList="$1"
|
||||
enable_user32_CharToOem="$1"
|
||||
enable_user32_DM_SETDEFID="$1"
|
||||
enable_user32_DeferWindowPos="$1"
|
||||
enable_user32_DialogBoxParam="$1"
|
||||
@ -1143,9 +1142,6 @@ patch_enable ()
|
||||
user.exe16-DlgDirList)
|
||||
enable_user_exe16_DlgDirList="$2"
|
||||
;;
|
||||
user32-CharToOem)
|
||||
enable_user32_CharToOem="$2"
|
||||
;;
|
||||
user32-DM_SETDEFID)
|
||||
enable_user32_DM_SETDEFID="$2"
|
||||
;;
|
||||
@ -6639,21 +6635,6 @@ if test "$enable_user_exe16_DlgDirList" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset user32-CharToOem
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#21891] Properly handle invalid parameters in CharToOem* and OemToChar* APIs
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/user32/lstr.c, dlls/user32/tests/text.c
|
||||
# |
|
||||
if test "$enable_user32_CharToOem" -eq 1; then
|
||||
patch_apply user32-CharToOem/0001-user32-Properly-handle-invalid-parameters-in-CharToO.patch
|
||||
(
|
||||
echo '+ { "Dmitry Timoshkov", "user32: Properly handle invalid parameters in CharToOem* and OemToChar* APIs.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset user32-DM_SETDEFID
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -1,145 +0,0 @@
|
||||
From 34d57635381ada21fdf49cde329a12dab02fa537 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 17 May 2016 14:47:24 +0800
|
||||
Subject: user32: Properly handle invalid parameters in CharToOem* and
|
||||
OemToChar* APIs.
|
||||
|
||||
Fixes #21891.
|
||||
---
|
||||
dlls/user32/lstr.c | 12 ++++++++++--
|
||||
dlls/user32/tests/text.c | 37 ++++++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 46 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/lstr.c b/dlls/user32/lstr.c
|
||||
index a56e21c..b73f40b 100644
|
||||
--- a/dlls/user32/lstr.c
|
||||
+++ b/dlls/user32/lstr.c
|
||||
@@ -136,7 +136,7 @@ LPWSTR WINAPI CharPrevW(LPCWSTR start,LPCWSTR x)
|
||||
*/
|
||||
BOOL WINAPI CharToOemA( LPCSTR s, LPSTR d )
|
||||
{
|
||||
- if ( !s || !d ) return TRUE;
|
||||
+ if ( !s || !d ) return FALSE;
|
||||
return CharToOemBuffA( s, d, strlen( s ) + 1 );
|
||||
}
|
||||
|
||||
@@ -148,6 +148,8 @@ BOOL WINAPI CharToOemBuffA( LPCSTR s, LPSTR d, DWORD len )
|
||||
{
|
||||
WCHAR *bufW;
|
||||
|
||||
+ if ( !s || !d ) return FALSE;
|
||||
+
|
||||
bufW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
|
||||
if( bufW )
|
||||
{
|
||||
@@ -164,7 +166,7 @@ BOOL WINAPI CharToOemBuffA( LPCSTR s, LPSTR d, DWORD len )
|
||||
*/
|
||||
BOOL WINAPI CharToOemBuffW( LPCWSTR s, LPSTR d, DWORD len )
|
||||
{
|
||||
- if ( !s || !d ) return TRUE;
|
||||
+ if ( !s || !d ) return FALSE;
|
||||
WideCharToMultiByte( CP_OEMCP, 0, s, len, d, len, NULL, NULL );
|
||||
return TRUE;
|
||||
}
|
||||
@@ -175,6 +177,7 @@ BOOL WINAPI CharToOemBuffW( LPCWSTR s, LPSTR d, DWORD len )
|
||||
*/
|
||||
BOOL WINAPI CharToOemW( LPCWSTR s, LPSTR d )
|
||||
{
|
||||
+ if ( !s || !d ) return FALSE;
|
||||
return CharToOemBuffW( s, d, lstrlenW( s ) + 1 );
|
||||
}
|
||||
|
||||
@@ -184,6 +187,7 @@ BOOL WINAPI CharToOemW( LPCWSTR s, LPSTR d )
|
||||
*/
|
||||
BOOL WINAPI OemToCharA( LPCSTR s, LPSTR d )
|
||||
{
|
||||
+ if ( !s || !d ) return FALSE;
|
||||
return OemToCharBuffA( s, d, strlen( s ) + 1 );
|
||||
}
|
||||
|
||||
@@ -195,6 +199,8 @@ BOOL WINAPI OemToCharBuffA( LPCSTR s, LPSTR d, DWORD len )
|
||||
{
|
||||
WCHAR *bufW;
|
||||
|
||||
+ if ( !s || !d ) return FALSE;
|
||||
+
|
||||
bufW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
|
||||
if( bufW )
|
||||
{
|
||||
@@ -211,6 +217,7 @@ BOOL WINAPI OemToCharBuffA( LPCSTR s, LPSTR d, DWORD len )
|
||||
*/
|
||||
BOOL WINAPI OemToCharBuffW( LPCSTR s, LPWSTR d, DWORD len )
|
||||
{
|
||||
+ if ( !s || !d ) return FALSE;
|
||||
MultiByteToWideChar( CP_OEMCP, 0, s, len, d, len );
|
||||
return TRUE;
|
||||
}
|
||||
@@ -221,6 +228,7 @@ BOOL WINAPI OemToCharBuffW( LPCSTR s, LPWSTR d, DWORD len )
|
||||
*/
|
||||
BOOL WINAPI OemToCharW( LPCSTR s, LPWSTR d )
|
||||
{
|
||||
+ if ( !s || !d ) return FALSE;
|
||||
return OemToCharBuffW( s, d, strlen( s ) + 1 );
|
||||
}
|
||||
|
||||
diff --git a/dlls/user32/tests/text.c b/dlls/user32/tests/text.c
|
||||
index eccf972..6bc1017 100644
|
||||
--- a/dlls/user32/tests/text.c
|
||||
+++ b/dlls/user32/tests/text.c
|
||||
@@ -2,7 +2,7 @@
|
||||
* DrawText tests
|
||||
*
|
||||
* Copyright (c) 2004 Zach Gorman
|
||||
- * Copyright 2007 Dmitry Timoshkov
|
||||
+ * Copyright 2007,2016 Dmitry Timoshkov
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -759,9 +759,44 @@ static void test_DrawState(void)
|
||||
DestroyWindow(hwnd);
|
||||
}
|
||||
|
||||
+static void test_string_conversions(void)
|
||||
+{
|
||||
+ char buf[64] = "string";
|
||||
+ int i;
|
||||
+ BOOL ret;
|
||||
+ struct
|
||||
+ {
|
||||
+ char *src, *dst;
|
||||
+ unsigned len;
|
||||
+ BOOL ret;
|
||||
+ } test[] =
|
||||
+ {
|
||||
+ { NULL, NULL, 1, FALSE },
|
||||
+ { buf, NULL, 1, FALSE },
|
||||
+ { NULL, buf, 1, FALSE },
|
||||
+ { buf, buf, 1, TRUE }
|
||||
+ };
|
||||
+
|
||||
+ for (i = 0; i < sizeof(test)/sizeof(test[0]); i++)
|
||||
+ {
|
||||
+ ret = CharToOemA(test[i].src, test[i].dst);
|
||||
+ ok(ret == test[i].ret, "%d: expected %d, got %d\n", i, test[i].ret, ret);
|
||||
+
|
||||
+ ret = CharToOemBuffA(test[i].src, test[i].dst, test[i].len);
|
||||
+ ok(ret == test[i].ret, "%d: expected %d, got %d\n", i, test[i].ret, ret);
|
||||
+
|
||||
+ ret = OemToCharA(test[i].src, test[i].dst);
|
||||
+ ok(ret == test[i].ret, "%d: expected %d, got %d\n", i, test[i].ret, ret);
|
||||
+
|
||||
+ ret = OemToCharBuffA(test[i].src, test[i].dst, test[i].len);
|
||||
+ ok(ret == test[i].ret, "%d: expected %d, got %d\n", i, test[i].ret, ret);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
START_TEST(text)
|
||||
{
|
||||
test_TabbedText();
|
||||
test_DrawTextCalcRect();
|
||||
test_DrawState();
|
||||
+ test_string_conversions();
|
||||
}
|
||||
--
|
||||
2.8.0
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [21891] Properly handle invalid parameters in CharToOem* and OemToChar* APIs
|
@ -1,4 +1,4 @@
|
||||
From 06122f35e04bf34a47f07afdeaebd72caf572579 Mon Sep 17 00:00:00 2001
|
||||
From 10d588d723446311832d7b4a6ccf37ba85003a18 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Fri, 27 Sep 2013 19:24:21 +0200
|
||||
Subject: wined3d: Implement DISCARD resource maps with heap memory.
|
||||
@ -12,10 +12,10 @@ Subject: wined3d: Implement DISCARD resource maps with heap memory.
|
||||
5 files changed, 51 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index 2c66a4b..f887ee6 100644
|
||||
index 92a0cab..bd1a2c2 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -503,6 +503,7 @@ BYTE *buffer_get_sysmem(struct wined3d_buffer *buffer, struct wined3d_context *c
|
||||
@@ -496,6 +496,7 @@ BYTE *buffer_get_sysmem(struct wined3d_buffer *buffer, struct wined3d_context *c
|
||||
|
||||
if (!wined3d_resource_allocate_sysmem(&buffer->resource))
|
||||
ERR("Failed to allocate system memory.\n");
|
||||
@ -24,10 +24,10 @@ index 2c66a4b..f887ee6 100644
|
||||
buffer_bind(buffer, context);
|
||||
GL_EXTCALL(glGetBufferSubData(buffer->buffer_type_hint, 0, buffer->resource.size, buffer->resource.heap_memory));
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 94298af..3a6299a 100644
|
||||
index 595520a..640a5f8 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -382,6 +382,7 @@ struct wined3d_cs_texture_changed
|
||||
@@ -394,6 +394,7 @@ struct wined3d_cs_texture_changed
|
||||
struct wined3d_texture *texture;
|
||||
unsigned int sub_resource_idx;
|
||||
struct wined3d_gl_bo *swap_buffer;
|
||||
@ -35,7 +35,7 @@ index 94298af..3a6299a 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs_skip
|
||||
@@ -1920,13 +1921,13 @@ static UINT wined3d_cs_exec_texture_changed(struct wined3d_cs *cs, const void *d
|
||||
@@ -1952,13 +1953,13 @@ static UINT wined3d_cs_exec_texture_changed(struct wined3d_cs *cs, const void *d
|
||||
{
|
||||
const struct wined3d_cs_texture_changed *op = data;
|
||||
|
||||
@ -51,7 +51,7 @@ index 94298af..3a6299a 100644
|
||||
{
|
||||
struct wined3d_cs_texture_changed *op;
|
||||
|
||||
@@ -1935,6 +1936,7 @@ void wined3d_cs_emit_texture_changed(struct wined3d_cs *cs, struct wined3d_textu
|
||||
@@ -1967,6 +1968,7 @@ void wined3d_cs_emit_texture_changed(struct wined3d_cs *cs, struct wined3d_textu
|
||||
op->texture = texture;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
op->swap_buffer = swap_buffer;
|
||||
@ -60,10 +60,10 @@ index 94298af..3a6299a 100644
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index be7dfb4..acbf7a6 100644
|
||||
index e10921a..75a3dd5 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -210,6 +210,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
|
||||
@@ -213,6 +213,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
|
||||
ERR("Failed to allocate system memory.\n");
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
@ -71,15 +71,15 @@ index be7dfb4..acbf7a6 100644
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -246,6 +247,7 @@ void resource_cleanup(struct wined3d_resource *resource)
|
||||
}
|
||||
@@ -241,6 +242,7 @@ static void wined3d_resource_destroy_object(void *object)
|
||||
struct wined3d_resource *resource = object;
|
||||
|
||||
wined3d_resource_free_sysmem(resource);
|
||||
+ resource->map_heap_memory = NULL;
|
||||
|
||||
device_resource_released(resource->device, resource);
|
||||
context_resource_released(resource->device, resource, resource->type);
|
||||
}
|
||||
@@ -330,7 +332,7 @@ BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource)
|
||||
|
||||
@@ -340,7 +342,7 @@ BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource)
|
||||
p = (void **)(((ULONG_PTR)mem + align) & ~(RESOURCE_ALIGNMENT - 1)) - 1;
|
||||
*p = mem;
|
||||
|
||||
@ -89,10 +89,10 @@ index be7dfb4..acbf7a6 100644
|
||||
return TRUE;
|
||||
}
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 2cc4014..bc1bb27 100644
|
||||
index de2d135..d810267 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -95,6 +95,7 @@ static void wined3d_texture_evict_sysmem(struct wined3d_texture *texture)
|
||||
@@ -104,6 +104,7 @@ static void wined3d_texture_evict_sysmem(struct wined3d_texture *texture)
|
||||
sub_resource->locations &= ~WINED3D_LOCATION_SYSMEM;
|
||||
}
|
||||
wined3d_resource_free_sysmem(&texture->resource);
|
||||
@ -100,7 +100,7 @@ index 2cc4014..bc1bb27 100644
|
||||
}
|
||||
|
||||
void wined3d_texture_validate_location(struct wined3d_texture *texture,
|
||||
@@ -206,7 +207,10 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
|
||||
@@ -220,7 +221,10 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
|
||||
}
|
||||
if (locations & WINED3D_LOCATION_SYSMEM)
|
||||
{
|
||||
@ -112,7 +112,7 @@ index 2cc4014..bc1bb27 100644
|
||||
data->addr += sub_resource->offset;
|
||||
data->buffer_object = 0;
|
||||
return;
|
||||
@@ -1030,6 +1034,7 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
@@ -1105,6 +1109,7 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
}
|
||||
|
||||
wined3d_resource_free_sysmem(&texture->resource);
|
||||
@ -120,7 +120,7 @@ index 2cc4014..bc1bb27 100644
|
||||
|
||||
if ((texture->row_pitch = pitch))
|
||||
texture->slice_pitch = height * pitch;
|
||||
@@ -1224,6 +1229,7 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
|
||||
@@ -1299,6 +1304,7 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
|
||||
ERR("Failed to allocate system memory.\n");
|
||||
return FALSE;
|
||||
}
|
||||
@ -128,7 +128,7 @@ index 2cc4014..bc1bb27 100644
|
||||
return TRUE;
|
||||
|
||||
case WINED3D_LOCATION_USER_MEMORY:
|
||||
@@ -1612,6 +1618,12 @@ void *wined3d_texture_map_internal(struct wined3d_texture *texture, unsigned int
|
||||
@@ -1656,6 +1662,12 @@ void *wined3d_texture_map_internal(struct wined3d_texture *texture, unsigned int
|
||||
ret = !!sub_resource->map_buffer;
|
||||
break;
|
||||
|
||||
@ -141,7 +141,7 @@ index 2cc4014..bc1bb27 100644
|
||||
default:
|
||||
ret = wined3d_texture_prepare_location(texture, sub_resource_idx,
|
||||
context, texture->resource.map_binding);
|
||||
@@ -1717,7 +1729,21 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -1761,7 +1773,21 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
if (flags & WINED3D_MAP_NOOVERWRITE)
|
||||
FIXME("WINED3D_MAP_NOOVERWRITE is not implemented yet.\n");
|
||||
|
||||
@ -164,7 +164,7 @@ index 2cc4014..bc1bb27 100644
|
||||
wined3d_resource_wait_fence(&texture->resource);
|
||||
|
||||
base_memory = wined3d_cs_emit_texture_map(device->cs, texture, sub_resource_idx, flags);
|
||||
@@ -1793,7 +1819,7 @@ void wined3d_texture_unmap_internal(struct wined3d_texture *texture, unsigned in
|
||||
@@ -1837,7 +1863,7 @@ void wined3d_texture_unmap_internal(struct wined3d_texture *texture, unsigned in
|
||||
}
|
||||
|
||||
void wined3d_texture_changed(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
@ -173,7 +173,7 @@ index 2cc4014..bc1bb27 100644
|
||||
{
|
||||
struct wined3d_texture_sub_resource *sub_resource = &texture->sub_resources[sub_resource_idx];
|
||||
|
||||
@@ -1806,6 +1832,12 @@ void wined3d_texture_changed(struct wined3d_texture *texture, unsigned int sub_r
|
||||
@@ -1850,6 +1876,12 @@ void wined3d_texture_changed(struct wined3d_texture *texture, unsigned int sub_r
|
||||
sub_resource->buffer = swap_buffer;
|
||||
}
|
||||
|
||||
@ -186,7 +186,7 @@ index 2cc4014..bc1bb27 100644
|
||||
wined3d_texture_invalidate_location(texture, sub_resource_idx, ~texture->resource.map_binding);
|
||||
}
|
||||
|
||||
@@ -1833,7 +1865,8 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
|
||||
@@ -1877,7 +1909,8 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
|
||||
|
||||
if (sub_resource->unmap_dirtify)
|
||||
{
|
||||
@ -196,7 +196,7 @@ index 2cc4014..bc1bb27 100644
|
||||
sub_resource->unmap_dirtify = FALSE;
|
||||
}
|
||||
|
||||
@@ -2276,6 +2309,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -2332,6 +2365,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
if (wined3d_texture_use_pbo(texture, gl_info))
|
||||
{
|
||||
wined3d_resource_free_sysmem(&texture->resource);
|
||||
@ -205,10 +205,10 @@ index 2cc4014..bc1bb27 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 4d6721d..5feee06 100644
|
||||
index 1b125d5..50c0854 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2429,7 +2429,7 @@ struct wined3d_resource
|
||||
@@ -2536,7 +2536,7 @@ struct wined3d_resource
|
||||
UINT depth;
|
||||
UINT size;
|
||||
DWORD priority;
|
||||
@ -217,7 +217,7 @@ index 4d6721d..5feee06 100644
|
||||
struct list resource_list_entry;
|
||||
LONG access_fence;
|
||||
|
||||
@@ -2626,7 +2626,8 @@ void wined3d_texture_bind(struct wined3d_texture *texture,
|
||||
@@ -2733,7 +2733,8 @@ void wined3d_texture_bind(struct wined3d_texture *texture,
|
||||
void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_changed(struct wined3d_texture *texture,
|
||||
@ -227,7 +227,7 @@ index 4d6721d..5feee06 100644
|
||||
BOOL wined3d_texture_check_block_align(const struct wined3d_texture *texture,
|
||||
unsigned int level, const struct wined3d_box *box) DECLSPEC_HIDDEN;
|
||||
GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
@@ -3014,7 +3015,8 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
@@ -3118,7 +3119,8 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil,
|
||||
const struct blit_shader *blitter) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_texture_changed(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
|
@ -1,22 +1,18 @@
|
||||
From c2e47132931b0ace4129f74f3905732be5575277 Mon Sep 17 00:00:00 2001
|
||||
From f63385f0d8260f11819bad1b075af20c98bb3bd4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Wed, 2 Oct 2013 22:38:51 +0200
|
||||
Subject: wined3d: Clean up resource data through the CS.
|
||||
|
||||
---
|
||||
dlls/wined3d/buffer.c | 7 +++++++
|
||||
dlls/wined3d/cs.c | 28 ++++++++++++++++++++++++++++
|
||||
dlls/wined3d/device.c | 2 --
|
||||
dlls/wined3d/resource.c | 11 ++++++++---
|
||||
dlls/wined3d/texture.c | 2 ++
|
||||
dlls/wined3d/wined3d_private.h | 3 +++
|
||||
6 files changed, 48 insertions(+), 5 deletions(-)
|
||||
dlls/wined3d/buffer.c | 7 +++++++
|
||||
dlls/wined3d/texture.c | 2 ++
|
||||
2 files changed, 9 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index b611daf..e1ce265 100644
|
||||
index 86395c4..90a707c 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -570,6 +570,9 @@ ULONG CDECL wined3d_buffer_decref(struct wined3d_buffer *buffer)
|
||||
@@ -586,6 +586,9 @@ ULONG CDECL wined3d_buffer_decref(struct wined3d_buffer *buffer)
|
||||
}
|
||||
|
||||
resource_cleanup(&buffer->resource);
|
||||
@ -26,7 +22,7 @@ index b611daf..e1ce265 100644
|
||||
buffer->resource.parent_ops->wined3d_object_destroyed(buffer->resource.parent);
|
||||
HeapFree(GetProcessHeap(), 0, buffer->maps);
|
||||
HeapFree(GetProcessHeap(), 0, buffer);
|
||||
@@ -1354,6 +1357,8 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
|
||||
@@ -1355,6 +1358,8 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
|
||||
ERR("Out of memory.\n");
|
||||
buffer_unload(&buffer->resource);
|
||||
resource_cleanup(&buffer->resource);
|
||||
@ -35,7 +31,7 @@ index b611daf..e1ce265 100644
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
buffer->maps_size = 1;
|
||||
@@ -1364,6 +1369,8 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
|
||||
@@ -1365,6 +1370,8 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
|
||||
buffer_unload(&buffer->resource);
|
||||
resource_cleanup(&buffer->resource);
|
||||
HeapFree(GetProcessHeap(), 0, buffer->maps);
|
||||
@ -44,109 +40,6 @@ index b611daf..e1ce265 100644
|
||||
return hr;
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index f501fa4..fec2ac3 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -80,6 +80,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_EVICT_RESOURCE,
|
||||
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
|
||||
WINED3D_CS_OP_CREATE_VBO,
|
||||
+ WINED3D_CS_OP_RESOURCE_CLEANUP,
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -474,6 +475,12 @@ struct wined3d_cs_create_vbo
|
||||
struct wined3d_buffer *buffer;
|
||||
};
|
||||
|
||||
+struct wined3d_cs_resource_cleanup
|
||||
+{
|
||||
+ enum wined3d_cs_op opcode;
|
||||
+ struct wined3d_resource *resource;
|
||||
+};
|
||||
+
|
||||
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
|
||||
{
|
||||
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
|
||||
@@ -2401,6 +2408,26 @@ void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *bu
|
||||
cs->ops->finish_prio(cs);
|
||||
}
|
||||
|
||||
+static UINT wined3d_cs_exec_resource_cleanup(struct wined3d_cs *cs, const void *data)
|
||||
+{
|
||||
+ const struct wined3d_cs_resource_cleanup *op = data;
|
||||
+
|
||||
+ wined3d_resource_cleanup_cs(op->resource);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
+}
|
||||
+
|
||||
+void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs, struct wined3d_resource *resource)
|
||||
+{
|
||||
+ struct wined3d_cs_resource_cleanup *op;
|
||||
+
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op));
|
||||
+ op->opcode = WINED3D_CS_OP_RESOURCE_CLEANUP;
|
||||
+ op->resource = resource;
|
||||
+
|
||||
+ cs->ops->submit(cs, sizeof(*op));
|
||||
+}
|
||||
+
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2459,6 +2486,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
|
||||
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
|
||||
/* WINED3D_CS_OP_CREATE_VBO */ wined3d_cs_exec_create_vbo,
|
||||
+ /* WINED3D_CS_OP_RESOURCE_CLEANUP */ wined3d_cs_exec_resource_cleanup,
|
||||
};
|
||||
|
||||
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index f1c8eae..5bf3dfb 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -5000,8 +5000,6 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
|
||||
TRACE("device %p, resource %p, type %s.\n", device, resource, debug_d3dresourcetype(type));
|
||||
|
||||
- context_resource_released(device, resource, type);
|
||||
-
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
if ((rtv = device->state.fb.render_targets[i]) && rtv->resource == resource)
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index 9acc7be..3af6851 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -237,6 +237,13 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
+void wined3d_resource_cleanup_cs(struct wined3d_resource *resource)
|
||||
+{
|
||||
+ wined3d_resource_free_sysmem(resource);
|
||||
+ resource->map_heap_memory = NULL;
|
||||
+ context_resource_released(resource->device, resource, resource->type);
|
||||
+}
|
||||
+
|
||||
void resource_cleanup(struct wined3d_resource *resource)
|
||||
{
|
||||
const struct wined3d *d3d = resource->device->wined3d;
|
||||
@@ -249,10 +256,8 @@ void resource_cleanup(struct wined3d_resource *resource)
|
||||
adapter_adjust_memory(resource->device->adapter, (INT64)0 - resource->size);
|
||||
}
|
||||
|
||||
- wined3d_resource_free_sysmem(resource);
|
||||
- resource->map_heap_memory = NULL;
|
||||
-
|
||||
device_resource_released(resource->device, resource);
|
||||
+ wined3d_cs_emit_resource_cleanup(resource->device->cs, resource);
|
||||
}
|
||||
|
||||
void resource_unload(struct wined3d_resource *resource)
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index d810267..53dfea6 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
@ -160,27 +53,6 @@ index d810267..53dfea6 100644
|
||||
}
|
||||
|
||||
void wined3d_texture_set_swapchain(struct wined3d_texture *texture, struct wined3d_swapchain *swapchain)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 012494d..0477ef9 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2507,6 +2507,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
|
||||
const struct wined3d_resource_ops *resource_ops) DECLSPEC_HIDDEN;
|
||||
void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
+void wined3d_resource_cleanup_cs(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void wined3d_resource_free_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
|
||||
GLenum wined3d_resource_gl_legacy_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
|
||||
@@ -3086,6 +3087,8 @@ void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
|
||||
struct wined3d_buffer *buffer, unsigned int offset, unsigned int size) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs,
|
||||
+ struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
|
||||
/* Direct3D terminology with little modifications. We do not have an issued state
|
||||
* because only the driver knows about it, but we have a created state because d3d
|
||||
--
|
||||
2.8.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 3bf5e65dbf7f9c4afd8b48c277c354222a9761c3 Mon Sep 17 00:00:00 2001
|
||||
From 10e80fbfff5af4dd169e9d6f6292787639602ece Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 16 Mar 2014 14:13:42 +0100
|
||||
Subject: wined3d: Send getdc and releasedc through the command stream.
|
||||
@ -11,20 +11,20 @@ Another hacky patch to avoid using GL outside the worker thread.
|
||||
3 files changed, 113 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 64585f6..959ce85 100644
|
||||
index 7344c4b..c48f5e3 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -81,6 +81,8 @@ enum wined3d_cs_op
|
||||
@@ -79,6 +79,8 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_EVICT_RESOURCE,
|
||||
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
|
||||
WINED3D_CS_OP_CREATE_VBO,
|
||||
WINED3D_CS_OP_RESOURCE_CLEANUP,
|
||||
+ WINED3D_CS_OP_GET_DC,
|
||||
+ WINED3D_CS_OP_RELEASE_DC,
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -481,6 +483,13 @@ struct wined3d_cs_resource_cleanup
|
||||
struct wined3d_resource *resource;
|
||||
@@ -467,6 +469,13 @@ struct wined3d_cs_create_vbo
|
||||
struct wined3d_buffer *buffer;
|
||||
};
|
||||
|
||||
+struct wined3d_cs_get_release_dc
|
||||
@ -37,8 +37,8 @@ index 64585f6..959ce85 100644
|
||||
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
|
||||
{
|
||||
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
|
||||
@@ -2450,6 +2459,52 @@ void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs, struct wined3d_reso
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
@@ -2396,6 +2405,52 @@ void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *bu
|
||||
cs->ops->finish_prio(cs);
|
||||
}
|
||||
|
||||
+static UINT wined3d_cs_exec_get_dc(struct wined3d_cs *cs, const void *data)
|
||||
@ -90,10 +90,10 @@ index 64585f6..959ce85 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2509,6 +2564,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2453,6 +2508,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
|
||||
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
|
||||
/* WINED3D_CS_OP_CREATE_VBO */ wined3d_cs_exec_create_vbo,
|
||||
/* WINED3D_CS_OP_RESOURCE_CLEANUP */ wined3d_cs_exec_resource_cleanup,
|
||||
+ /* WINED3D_CS_OP_GET_DC */ wined3d_cs_exec_get_dc,
|
||||
+ /* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
|
||||
};
|
||||
@ -217,10 +217,10 @@ index 2f57373..f36ae61 100644
|
||||
return WINED3D_OK;
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 6753579..7141256 100644
|
||||
index 6261b30..a8c92f8 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2587,6 +2587,7 @@ struct wined3d_texture
|
||||
@@ -2643,6 +2643,7 @@ struct wined3d_texture
|
||||
DWORD flags;
|
||||
GLenum target;
|
||||
DWORD update_map_binding;
|
||||
@ -228,7 +228,7 @@ index 6753579..7141256 100644
|
||||
|
||||
GLuint rb_multisample;
|
||||
GLuint rb_resolved;
|
||||
@@ -2681,6 +2682,7 @@ void wined3d_texture_changed(struct wined3d_texture *texture,
|
||||
@@ -2737,6 +2738,7 @@ void wined3d_texture_changed(struct wined3d_texture *texture,
|
||||
void *swap_heap_memory) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_texture_check_block_align(const struct wined3d_texture *texture,
|
||||
unsigned int level, const struct wined3d_box *box) DECLSPEC_HIDDEN;
|
||||
@ -236,7 +236,7 @@ index 6753579..7141256 100644
|
||||
GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
struct wined3d_bo_address *data, DWORD locations, BOOL map) DECLSPEC_HIDDEN;
|
||||
@@ -2700,6 +2702,8 @@ void *wined3d_texture_map_internal(struct wined3d_texture *texture, unsigned int
|
||||
@@ -2756,6 +2758,8 @@ void *wined3d_texture_map_internal(struct wined3d_texture *texture, unsigned int
|
||||
DWORD flags) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_prepare_texture(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
@ -245,10 +245,10 @@ index 6753579..7141256 100644
|
||||
void wined3d_texture_set_map_binding(struct wined3d_texture *texture, DWORD map_binding) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_set_swapchain(struct wined3d_texture *texture,
|
||||
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
@@ -3094,6 +3098,10 @@ void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer
|
||||
@@ -3147,6 +3151,10 @@ void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
|
||||
struct wined3d_buffer *buffer, unsigned int offset, unsigned int size) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs,
|
||||
struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
+ unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 287c22bdc1ce3cc81fcd80ea9b2e555acb07895b Mon Sep 17 00:00:00 2001
|
||||
From 2db17c7ebe378168da7a1f05fef44dff4465c478 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 10 Oct 2013 16:29:42 +0200
|
||||
Subject: wined3d: Create dummy textures through the CS.
|
||||
@ -12,18 +12,18 @@ crash.
|
||||
3 files changed, 35 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 959ce85..e50d2fa 100644
|
||||
index c48f5e3..3044e26 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -83,6 +83,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_RESOURCE_CLEANUP,
|
||||
@@ -81,6 +81,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_CREATE_VBO,
|
||||
WINED3D_CS_OP_GET_DC,
|
||||
WINED3D_CS_OP_RELEASE_DC,
|
||||
+ WINED3D_CS_OP_CREATE_DUMMY_TEXTURES,
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -490,6 +491,11 @@ struct wined3d_cs_get_release_dc
|
||||
@@ -476,6 +477,11 @@ struct wined3d_cs_get_release_dc
|
||||
unsigned int sub_resource_idx;
|
||||
};
|
||||
|
||||
@ -35,7 +35,7 @@ index 959ce85..e50d2fa 100644
|
||||
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
|
||||
{
|
||||
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
|
||||
@@ -2505,6 +2511,28 @@ void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *t
|
||||
@@ -2451,6 +2457,28 @@ void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *t
|
||||
cs->ops->finish(cs);
|
||||
}
|
||||
|
||||
@ -64,8 +64,8 @@ index 959ce85..e50d2fa 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2566,6 +2594,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_RESOURCE_CLEANUP */ wined3d_cs_exec_resource_cleanup,
|
||||
@@ -2510,6 +2538,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_CREATE_VBO */ wined3d_cs_exec_create_vbo,
|
||||
/* WINED3D_CS_OP_GET_DC */ wined3d_cs_exec_get_dc,
|
||||
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
|
||||
+ /* WINED3D_CS_OP_CREATE_DUMMY_TEXTURES */ wined3d_cs_exec_create_dummy_textures,
|
||||
@ -115,10 +115,10 @@ index 5c47a70..bca71ad 100644
|
||||
context_release(context);
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 7141256..bd4abc9 100644
|
||||
index a8c92f8..30529d3 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2435,7 +2435,7 @@ struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT
|
||||
@@ -2492,7 +2492,7 @@ struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT
|
||||
GLenum type_hint, struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
void wined3d_device_release_bo(struct wined3d_device *device, struct wined3d_gl_bo *bo,
|
||||
const struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
@ -127,7 +127,7 @@ index 7141256..bd4abc9 100644
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -3102,6 +3102,7 @@ void wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *textu
|
||||
@@ -3155,6 +3155,7 @@ void wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *textu
|
||||
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 3672080dca25e19d625417d907ec26ac1f8d4b5c Mon Sep 17 00:00:00 2001
|
||||
From 3bc2195fcff838f6875a50a6b07332a232e7f546 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
|
||||
Date: Sat, 7 May 2016 22:07:22 +0100
|
||||
Subject: wined3d: Do the sampler GL init through the CS.
|
||||
@ -12,19 +12,19 @@ This extra parameter is barf-inducing.
|
||||
4 files changed, 63 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 70d3e1f..028003f 100644
|
||||
index 0e976b0..acf2ae0 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -81,6 +81,7 @@ enum wined3d_cs_op
|
||||
@@ -79,6 +79,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_EVICT_RESOURCE,
|
||||
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
|
||||
WINED3D_CS_OP_CREATE_VBO,
|
||||
WINED3D_CS_OP_RESOURCE_CLEANUP,
|
||||
+ WINED3D_CS_OP_SAMPLER_INIT,
|
||||
WINED3D_CS_OP_GET_DC,
|
||||
WINED3D_CS_OP_RELEASE_DC,
|
||||
WINED3D_CS_OP_CREATE_DUMMY_TEXTURES,
|
||||
@@ -487,6 +488,12 @@ struct wined3d_cs_resource_cleanup
|
||||
struct wined3d_resource *resource;
|
||||
@@ -473,6 +474,12 @@ struct wined3d_cs_create_vbo
|
||||
struct wined3d_buffer *buffer;
|
||||
};
|
||||
|
||||
+struct wined3d_cs_sampler_init
|
||||
@ -36,8 +36,8 @@ index 70d3e1f..028003f 100644
|
||||
struct wined3d_cs_get_release_dc
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -2487,6 +2494,26 @@ void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs, struct wined3d_reso
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
@@ -2433,6 +2440,26 @@ void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *bu
|
||||
cs->ops->finish_prio(cs);
|
||||
}
|
||||
|
||||
+static UINT wined3d_cs_exec_sampler_init(struct wined3d_cs *cs, const void *data)
|
||||
@ -63,19 +63,19 @@ index 70d3e1f..028003f 100644
|
||||
static UINT wined3d_cs_exec_get_dc(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_get_release_dc *op = data;
|
||||
@@ -2681,6 +2708,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2625,6 +2652,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
|
||||
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
|
||||
/* WINED3D_CS_OP_CREATE_VBO */ wined3d_cs_exec_create_vbo,
|
||||
/* WINED3D_CS_OP_RESOURCE_CLEANUP */ wined3d_cs_exec_resource_cleanup,
|
||||
+ /* WINED3D_CS_OP_SAMPLER_INIT */ wined3d_cs_exec_sampler_init,
|
||||
/* WINED3D_CS_OP_GET_DC */ wined3d_cs_exec_get_dc,
|
||||
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
|
||||
/* WINED3D_CS_OP_CREATE_DUMMY_TEXTURES */ wined3d_cs_exec_create_dummy_textures,
|
||||
diff --git a/dlls/wined3d/sampler.c b/dlls/wined3d/sampler.c
|
||||
index 8c73466..bc165a8 100644
|
||||
index 1a2e2a1..2bf881f 100644
|
||||
--- a/dlls/wined3d/sampler.c
|
||||
+++ b/dlls/wined3d/sampler.c
|
||||
@@ -67,43 +67,37 @@ void * CDECL wined3d_sampler_get_parent(const struct wined3d_sampler *sampler)
|
||||
@@ -66,43 +66,37 @@ void * CDECL wined3d_sampler_get_parent(const struct wined3d_sampler *sampler)
|
||||
return sampler->parent;
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ index 8c73466..bc165a8 100644
|
||||
GL_EXTCALL(glSamplerParameteri(sampler->name, GL_TEXTURE_SRGB_DECODE_EXT, GL_SKIP_DECODE_EXT));
|
||||
checkGLcall("sampler creation");
|
||||
|
||||
@@ -115,6 +109,12 @@ static void wined3d_sampler_init(struct wined3d_sampler *sampler, struct wined3d
|
||||
@@ -114,6 +108,12 @@ static void wined3d_sampler_init(struct wined3d_sampler *sampler, struct wined3d
|
||||
HRESULT CDECL wined3d_sampler_create(struct wined3d_device *device, const struct wined3d_sampler_desc *desc,
|
||||
void *parent, struct wined3d_sampler **sampler)
|
||||
{
|
||||
@ -147,7 +147,7 @@ index 8c73466..bc165a8 100644
|
||||
struct wined3d_sampler *object;
|
||||
|
||||
TRACE("device %p, desc %p, parent %p, sampler %p.\n", device, desc, parent, sampler);
|
||||
@@ -135,7 +135,14 @@ HRESULT CDECL wined3d_sampler_create(struct wined3d_device *device, const struct
|
||||
@@ -134,7 +134,14 @@ HRESULT CDECL wined3d_sampler_create(struct wined3d_device *device, const struct
|
||||
if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
@ -164,7 +164,7 @@ index 8c73466..bc165a8 100644
|
||||
TRACE("Created sampler %p.\n", object);
|
||||
*sampler = object;
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index ed578b8..a513298 100644
|
||||
index 50cf6cd..64afaac 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -3604,7 +3604,7 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state
|
||||
@ -177,10 +177,10 @@ index ed578b8..a513298 100644
|
||||
ERR("Failed to create sampler.\n");
|
||||
sampler = NULL;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 629ac6d..8b48d64 100644
|
||||
index 9a43938..fd4ba77 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2858,6 +2858,10 @@ struct wined3d_sampler
|
||||
@@ -2914,6 +2914,10 @@ struct wined3d_sampler
|
||||
GLuint name;
|
||||
};
|
||||
|
||||
@ -191,10 +191,10 @@ index 629ac6d..8b48d64 100644
|
||||
struct wined3d_vertex_declaration_element
|
||||
{
|
||||
const struct wined3d_format *format;
|
||||
@@ -3100,6 +3104,7 @@ void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer
|
||||
@@ -3153,6 +3157,7 @@ void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
|
||||
struct wined3d_buffer *buffer, unsigned int offset, unsigned int size) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs,
|
||||
struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_sampler_init(struct wined3d_cs *cs, struct wined3d_sampler *sampler) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
|
@ -745,7 +745,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
WINED3D_CS_OP_SET_VS_CONSTS_F,
|
||||
WINED3D_CS_OP_SET_VS_CONSTS_B,
|
||||
WINED3D_CS_OP_SET_VS_CONSTS_I,
|
||||
@@ -99,6 +107,7 @@ struct wined3d_cs_fence
|
||||
@@ -98,6 +106,7 @@ struct wined3d_cs_fence
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
BOOL *signalled;
|
||||
@ -753,7 +753,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
};
|
||||
|
||||
struct wined3d_cs_present
|
||||
@@ -306,6 +315,7 @@ struct wined3d_cs_destroy_object
|
||||
@@ -305,6 +314,7 @@ struct wined3d_cs_destroy_object
|
||||
void *object;
|
||||
};
|
||||
|
||||
@ -761,7 +761,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
struct wined3d_cs_set_consts_f
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -612,6 +622,23 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -605,6 +615,23 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
struct wined3d_cs_present *op;
|
||||
LONG pending;
|
||||
unsigned int i;
|
||||
@ -785,7 +785,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_PRESENT;
|
||||
@@ -621,6 +648,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -614,6 +641,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
op->dst_rect = *dst_rect;
|
||||
op->flags = flags;
|
||||
|
||||
@ -793,7 +793,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
wined3d_resource_inc_fence(&swapchain->front_buffer->resource);
|
||||
for (i = 0; i < swapchain->desc.backbuffer_count; i++)
|
||||
wined3d_resource_inc_fence(&swapchain->back_buffers[i]->resource);
|
||||
@@ -678,6 +706,30 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -671,6 +699,30 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
unsigned int i;
|
||||
|
||||
op = cs->ops->require_space(cs, size);
|
||||
@ -824,7 +824,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_CLEAR;
|
||||
op->flags = flags;
|
||||
op->color = *color;
|
||||
@@ -686,6 +738,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -679,6 +731,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
op->rect_count = rect_count;
|
||||
memcpy(op->rects, rects, sizeof(*rects) * rect_count);
|
||||
|
||||
@ -832,7 +832,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
if (flags & WINED3DCLEAR_TARGET)
|
||||
{
|
||||
for (i = 0; i < cs->device->adapter->gl_info.limits.buffers; i++)
|
||||
@@ -744,6 +797,15 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -737,6 +790,15 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
cs->state.load_base_vertex_index = 0;
|
||||
device_invalidate_state(cs->device, STATE_BASEVERTEXINDEX);
|
||||
}
|
||||
@ -848,7 +848,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
|
||||
if (!cs->device->adapter->gl_info.supported[ARB_DRAW_ELEMENTS_BASE_VERTEX]
|
||||
&& state->load_base_vertex_index != op->base_vertex_idx)
|
||||
@@ -754,6 +816,7 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -747,6 +809,7 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
|
||||
draw_primitive(cs->device, state, op->base_vertex_idx, op->start_idx,
|
||||
op->index_count, op->start_instance, op->instance_count, op->indexed);
|
||||
@ -856,7 +856,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
|
||||
if (op->indexed)
|
||||
wined3d_resource_dec_fence(&cs->state.index_buffer->resource);
|
||||
@@ -784,6 +847,14 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
@@ -777,6 +840,14 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
struct wined3d_cs_draw *op;
|
||||
unsigned int i;
|
||||
const struct wined3d_state *state = &cs->device->state;
|
||||
@ -871,7 +871,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_DRAW;
|
||||
@@ -794,6 +865,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
@@ -787,6 +858,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
op->instance_count = instance_count;
|
||||
op->indexed = indexed;
|
||||
|
||||
@ -879,7 +879,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
if (indexed)
|
||||
{
|
||||
wined3d_resource_inc_fence(&state->index_buffer->resource);
|
||||
@@ -831,6 +903,17 @@ static UINT wined3d_cs_exec_set_predication(struct wined3d_cs *cs, const void *d
|
||||
@@ -824,6 +896,17 @@ static UINT wined3d_cs_exec_set_predication(struct wined3d_cs *cs, const void *d
|
||||
cs->state.predicate_value = op->value;
|
||||
|
||||
return sizeof(*op);
|
||||
@ -897,7 +897,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query *predicate, BOOL value)
|
||||
@@ -842,6 +925,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
@@ -835,6 +918,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
op->predicate = predicate;
|
||||
op->value = value;
|
||||
|
||||
@ -905,7 +905,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -853,6 +937,17 @@ static UINT wined3d_cs_exec_set_viewport(struct wined3d_cs *cs, const void *data
|
||||
@@ -846,6 +930,17 @@ static UINT wined3d_cs_exec_set_viewport(struct wined3d_cs *cs, const void *data
|
||||
device_invalidate_state(cs->device, STATE_VIEWPORT);
|
||||
|
||||
return sizeof(*op);
|
||||
@ -923,7 +923,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport)
|
||||
@@ -863,6 +958,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
@@ -856,6 +951,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
op->opcode = WINED3D_CS_OP_SET_VIEWPORT;
|
||||
op->viewport = *viewport;
|
||||
|
||||
@ -931,7 +931,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -874,6 +970,17 @@ static UINT wined3d_cs_exec_set_scissor_rect(struct wined3d_cs *cs, const void *
|
||||
@@ -867,6 +963,17 @@ static UINT wined3d_cs_exec_set_scissor_rect(struct wined3d_cs *cs, const void *
|
||||
device_invalidate_state(cs->device, STATE_SCISSORRECT);
|
||||
|
||||
return sizeof(*op);
|
||||
@ -949,7 +949,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -884,6 +991,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -877,6 +984,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECT;
|
||||
op->rect = *rect;
|
||||
|
||||
@ -957,7 +957,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -895,6 +1003,17 @@ static UINT wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const v
|
||||
@@ -888,6 +996,17 @@ static UINT wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const v
|
||||
device_invalidate_state(cs->device, STATE_FRAMEBUFFER);
|
||||
|
||||
return sizeof(*op);
|
||||
@ -975,7 +975,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int view_idx,
|
||||
@@ -907,6 +1026,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -900,6 +1019,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
|
||||
@ -983,7 +983,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -917,6 +1037,18 @@ static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -910,6 +1030,18 @@ static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
struct wined3d_rendertarget_view *prev;
|
||||
|
||||
if ((prev = cs->state.fb.depth_stencil))
|
||||
@ -1002,7 +1002,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
struct wined3d_surface *prev_surface = wined3d_rendertarget_view_get_surface(prev);
|
||||
|
||||
@@ -924,6 +1056,7 @@ static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -917,6 +1049,7 @@ static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
|| prev_surface->container->flags & WINED3D_TEXTURE_DISCARD))
|
||||
{
|
||||
surface_modify_ds_location(prev_surface, WINED3D_LOCATION_DISCARDED, prev->width, prev->height);
|
||||
@ -1010,7 +1010,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
if (prev_surface == cs->onscreen_depth_stencil)
|
||||
{
|
||||
wined3d_texture_decref(cs->onscreen_depth_stencil->container);
|
||||
@@ -933,6 +1066,17 @@ static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -926,6 +1059,17 @@ static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
}
|
||||
|
||||
cs->state.fb.depth_stencil = op->view;
|
||||
@ -1028,7 +1028,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
|
||||
if (!prev != !op->view)
|
||||
{
|
||||
@@ -949,8 +1093,10 @@ static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -942,8 +1086,10 @@ static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
}
|
||||
|
||||
device_invalidate_state(device, STATE_FRAMEBUFFER);
|
||||
@ -1039,7 +1039,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view)
|
||||
@@ -961,6 +1107,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
@@ -954,6 +1100,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW;
|
||||
op->view = view;
|
||||
|
||||
@ -1047,7 +1047,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -972,6 +1119,17 @@ static UINT wined3d_cs_exec_set_vertex_declaration(struct wined3d_cs *cs, const
|
||||
@@ -965,6 +1112,17 @@ static UINT wined3d_cs_exec_set_vertex_declaration(struct wined3d_cs *cs, const
|
||||
device_invalidate_state(cs->device, STATE_VDECL);
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1065,7 +1065,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3d_vertex_declaration *declaration)
|
||||
@@ -982,10 +1140,17 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
@@ -975,10 +1133,17 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
|
||||
op->declaration = declaration;
|
||||
|
||||
@ -1083,7 +1083,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -1003,8 +1168,10 @@ static UINT wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
|
||||
@@ -996,8 +1161,10 @@ static UINT wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_STREAMSRC);
|
||||
@ -1094,7 +1094,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1019,10 +1186,17 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1012,10 +1179,17 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
op->offset = offset;
|
||||
op->stride = stride;
|
||||
|
||||
@ -1112,7 +1112,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source_freq *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -1032,8 +1206,10 @@ static UINT wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
|
||||
@@ -1025,8 +1199,10 @@ static UINT wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
|
||||
stream->flags = op->flags;
|
||||
|
||||
device_invalidate_state(cs->device, STATE_STREAMSRC);
|
||||
@ -1123,7 +1123,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_idx, UINT frequency, UINT flags)
|
||||
@@ -1046,10 +1222,17 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
@@ -1039,10 +1215,17 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
op->frequency = frequency;
|
||||
op->flags = flags;
|
||||
|
||||
@ -1141,7 +1141,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_stream_output *op = data;
|
||||
struct wined3d_stream_output *stream;
|
||||
@@ -1064,8 +1247,10 @@ static UINT wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
|
||||
@@ -1057,8 +1240,10 @@ static UINT wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
|
||||
InterlockedIncrement(&op->buffer->resource.bind_count);
|
||||
if (prev)
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
@ -1152,7 +1152,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1079,10 +1264,17 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1072,10 +1257,17 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
op->buffer = buffer;
|
||||
op->offset = offset;
|
||||
|
||||
@ -1170,7 +1170,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_index_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -1098,8 +1290,10 @@ static UINT wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
|
||||
@@ -1091,8 +1283,10 @@ static UINT wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_INDEXBUFFER);
|
||||
@ -1181,7 +1181,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
|
||||
@@ -1113,10 +1307,17 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -1106,10 +1300,17 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
op->format_id = format_id;
|
||||
op->offset = offset;
|
||||
|
||||
@ -1199,7 +1199,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_constant_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -1130,7 +1331,9 @@ static UINT wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
|
||||
@@ -1123,7 +1324,9 @@ static UINT wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_CONSTANT_BUFFER(op->type));
|
||||
@ -1209,7 +1209,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -1144,10 +1347,17 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -1137,10 +1340,17 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
op->cb_idx = cb_idx;
|
||||
op->buffer = buffer;
|
||||
|
||||
@ -1227,7 +1227,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info;
|
||||
const struct wined3d_d3d_info *d3d_info = &cs->device->adapter->d3d_info;
|
||||
@@ -1224,8 +1434,10 @@ static UINT wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1217,8 +1427,10 @@ static UINT wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
|
||||
if (new_use_color_key)
|
||||
device_invalidate_state(cs->device, STATE_COLOR_KEY);
|
||||
@ -1238,7 +1238,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture)
|
||||
@@ -1236,6 +1448,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -1229,6 +1441,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
op->opcode = WINED3D_CS_OP_SET_TEXTURE;
|
||||
op->stage = stage;
|
||||
op->texture = texture;
|
||||
@ -1246,7 +1246,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1247,6 +1460,18 @@ static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, cons
|
||||
@@ -1240,6 +1453,18 @@ static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, cons
|
||||
device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING);
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1265,7 +1265,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -1260,6 +1485,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -1253,6 +1478,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
|
||||
@ -1273,7 +1273,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1271,6 +1497,17 @@ static UINT wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1264,6 +1490,17 @@ static UINT wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
|
||||
device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING);
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1291,7 +1291,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -1284,6 +1521,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1277,6 +1514,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
op->sampler_idx = sampler_idx;
|
||||
op->sampler = sampler;
|
||||
|
||||
@ -1299,7 +1299,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1296,6 +1534,18 @@ static UINT wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1289,6 +1527,18 @@ static UINT wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
|
||||
device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING);
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1318,7 +1318,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
|
||||
@@ -1307,6 +1557,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1300,6 +1550,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
op->type = type;
|
||||
op->shader = shader;
|
||||
|
||||
@ -1326,7 +1326,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1378,6 +1629,17 @@ static UINT wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *
|
||||
@@ -1371,6 +1622,17 @@ static UINT wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *
|
||||
device_invalidate_state(cs->device, STATE_RENDER(op->state));
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1344,7 +1344,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
|
||||
@@ -1389,6 +1651,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -1382,6 +1644,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@ -1352,7 +1352,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1516,6 +1779,17 @@ static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void
|
||||
@@ -1509,6 +1772,17 @@ static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void
|
||||
device_invalidate_state(cs->device, STATE_TEXTURESTAGE(op->stage, op->state));
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1370,7 +1370,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1529,6 +1803,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1522,6 +1796,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@ -1378,7 +1378,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1540,6 +1815,17 @@ static UINT wined3d_cs_exec_set_sampler_state(struct wined3d_cs *cs, const void
|
||||
@@ -1533,6 +1808,17 @@ static UINT wined3d_cs_exec_set_sampler_state(struct wined3d_cs *cs, const void
|
||||
device_invalidate_state(cs->device, STATE_SAMPLER(op->sampler_idx));
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1396,7 +1396,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1553,6 +1839,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1546,6 +1832,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@ -1404,7 +1404,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1565,6 +1852,18 @@ static UINT wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *dat
|
||||
@@ -1558,6 +1845,18 @@ static UINT wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *dat
|
||||
device_invalidate_state(cs->device, STATE_TRANSFORM(op->state));
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1423,7 +1423,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
|
||||
@@ -1577,6 +1876,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1570,6 +1869,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
op->state = state;
|
||||
op->matrix = *matrix;
|
||||
|
||||
@ -1431,7 +1431,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1588,6 +1888,17 @@ static UINT wined3d_cs_exec_set_clip_plane(struct wined3d_cs *cs, const void *da
|
||||
@@ -1581,6 +1881,17 @@ static UINT wined3d_cs_exec_set_clip_plane(struct wined3d_cs *cs, const void *da
|
||||
device_invalidate_state(cs->device, STATE_CLIPPLANE(op->plane_idx));
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1449,7 +1449,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane)
|
||||
@@ -1599,10 +1910,17 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
@@ -1592,10 +1903,17 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
op->plane_idx = plane_idx;
|
||||
op->plane = *plane;
|
||||
|
||||
@ -1467,7 +1467,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_color_key *op = data;
|
||||
struct wined3d_texture *texture = op->texture;
|
||||
@@ -1663,8 +1981,10 @@ static UINT wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
@@ -1656,8 +1974,10 @@ static UINT wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1478,7 +1478,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
@@ -1684,6 +2004,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1677,6 +1997,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
else
|
||||
op->set = 0;
|
||||
|
||||
@ -1486,7 +1486,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1695,6 +2016,17 @@ static UINT wined3d_cs_exec_set_material(struct wined3d_cs *cs, const void *data
|
||||
@@ -1688,6 +2009,17 @@ static UINT wined3d_cs_exec_set_material(struct wined3d_cs *cs, const void *data
|
||||
device_invalidate_state(cs->device, STATE_MATERIAL);
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1504,7 +1504,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material)
|
||||
@@ -1705,6 +2037,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1698,6 +2030,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
|
||||
op->material = *material;
|
||||
|
||||
@ -1512,7 +1512,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1720,6 +2053,19 @@ static UINT wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1713,6 +2046,19 @@ static UINT wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
ERR("Failed to initialize CS state, hr %#x.\n", hr);
|
||||
|
||||
return sizeof(struct wined3d_cs_reset_state);
|
||||
@ -1532,7 +1532,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1729,6 +2075,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1722,6 +2068,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_RESET_STATE;
|
||||
|
||||
@ -1540,7 +1540,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -1739,6 +2086,16 @@ static UINT wined3d_cs_exec_destroy_object(struct wined3d_cs *cs, const void *da
|
||||
@@ -1732,6 +2079,16 @@ static UINT wined3d_cs_exec_destroy_object(struct wined3d_cs *cs, const void *da
|
||||
op->callback(op->object);
|
||||
|
||||
return sizeof(*op);
|
||||
@ -1557,7 +1557,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void *object), void *object)
|
||||
@@ -1750,6 +2107,7 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
@@ -1743,6 +2100,7 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
op->callback = callback;
|
||||
op->object = object;
|
||||
|
||||
@ -1565,7 +1565,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@@ -3027,5 +3385,152 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
@@ -2999,5 +3357,152 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
ERR("Closing event failed.\n");
|
||||
}
|
||||
|
||||
@ -3041,23 +3041,17 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
/* All done. There is no need to reload resources or shaders, this will happen automatically on the
|
||||
@@ -4959,6 +5632,7 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
@@ -4961,11 +5634,19 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
|
||||
TRACE("device %p, resource %p, type %s.\n", device, resource, debug_d3dresourcetype(type));
|
||||
|
||||
+#if defined(STAGING_CSMT)
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
+#if defined(STAGING_CSMT)
|
||||
if ((rtv = device->state.fb.render_targets[i]) && rtv->resource == resource)
|
||||
@@ -4966,6 +5640,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
ERR("Resource %p is still in use as render target %u.\n", resource, i);
|
||||
}
|
||||
|
||||
if ((rtv = device->state.fb.depth_stencil) && rtv->resource == resource)
|
||||
+#else /* STAGING_CSMT */
|
||||
+ context_resource_released(device, resource, type);
|
||||
+
|
||||
+ for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
+ {
|
||||
+ if ((rtv = device->fb.render_targets[i]) && rtv->resource == resource)
|
||||
+ ERR("Resource %p is still in use as render target %u.\n", resource, i);
|
||||
+ }
|
||||
@ -3067,7 +3061,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
ERR("Resource %p is still in use as depth/stencil buffer.\n", resource);
|
||||
|
||||
switch (type)
|
||||
@@ -5101,12 +5786,17 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
@@ -5101,12 +5782,17 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
|
||||
device->blitter = adapter->blitter;
|
||||
|
||||
@ -3085,7 +3079,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
device->update_state = &device->state;
|
||||
|
||||
if (!(device->cs = wined3d_cs_create(device)))
|
||||
@@ -5200,6 +5890,7 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -5200,6 +5886,7 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
else
|
||||
return CallWindowProcA(proc, window, message, wparam, lparam);
|
||||
}
|
||||
@ -3093,7 +3087,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
/* Context activation is done by the caller */
|
||||
struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT size, GLenum gl_usage,
|
||||
@@ -5253,3 +5944,4 @@ void wined3d_device_release_bo(struct wined3d_device *device, struct wined3d_gl_
|
||||
@@ -5253,3 +5940,4 @@ void wined3d_device_release_bo(struct wined3d_device *device, struct wined3d_gl_
|
||||
|
||||
wined3d_device_destroy_bo(device, context, bo);
|
||||
}
|
||||
@ -3755,38 +3749,17 @@ diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -237,6 +239,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -242,7 +244,9 @@ static void wined3d_resource_destroy_object(void *object)
|
||||
struct wined3d_resource *resource = object;
|
||||
|
||||
+#if defined(STAGING_CSMT)
|
||||
void wined3d_resource_cleanup_cs(struct wined3d_resource *resource)
|
||||
{
|
||||
wined3d_resource_free_sysmem(resource);
|
||||
@@ -244,6 +247,7 @@ void wined3d_resource_cleanup_cs(struct wined3d_resource *resource)
|
||||
+#if defined(STAGING_CSMT)
|
||||
resource->map_heap_memory = NULL;
|
||||
+#endif /* STAGING_CSMT */
|
||||
context_resource_released(resource->device, resource, resource->type);
|
||||
}
|
||||
|
||||
+#endif /* STAGING_CSMT */
|
||||
void resource_cleanup(struct wined3d_resource *resource)
|
||||
{
|
||||
const struct wined3d *d3d = resource->device->wined3d;
|
||||
@@ -256,8 +260,14 @@ void resource_cleanup(struct wined3d_resource *resource)
|
||||
adapter_adjust_memory(resource->device->adapter, (INT64)0 - resource->size);
|
||||
}
|
||||
|
||||
+#if defined(STAGING_CSMT)
|
||||
device_resource_released(resource->device, resource);
|
||||
wined3d_cs_emit_resource_cleanup(resource->device->cs, resource);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ wined3d_resource_free_sysmem(resource);
|
||||
+
|
||||
+ device_resource_released(resource->device, resource);
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
|
||||
void resource_unload(struct wined3d_resource *resource)
|
||||
@@ -340,7 +350,11 @@ BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource)
|
||||
@@ -342,7 +346,11 @@ BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource)
|
||||
p = (void **)(((ULONG_PTR)mem + align) & ~(RESOURCE_ALIGNMENT - 1)) - 1;
|
||||
*p = mem;
|
||||
|
||||
@ -3891,7 +3864,7 @@ diff --git a/dlls/wined3d/sampler.c b/dlls/wined3d/sampler.c
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -3058,7 +3058,11 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
@@ -3057,7 +3057,11 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
UINT i;
|
||||
|
||||
memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */
|
||||
@ -6825,17 +6798,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
void *parent;
|
||||
const struct wined3d_parent_ops *parent_ops;
|
||||
@@ -2566,7 +2622,9 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
|
||||
const struct wined3d_resource_ops *resource_ops) DECLSPEC_HIDDEN;
|
||||
void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
+#if defined(STAGING_CSMT)
|
||||
void wined3d_resource_cleanup_cs(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
+#endif /* STAGING_CSMT */
|
||||
void wined3d_resource_free_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
|
||||
GLenum wined3d_resource_gl_legacy_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
|
||||
@@ -2574,6 +2632,7 @@ BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource) DECLSPEC_H
|
||||
@@ -2573,6 +2629,7 @@ BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource) DECLSPEC_H
|
||||
DWORD wined3d_resource_sanitize_map_flags(const struct wined3d_resource *resource, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void wined3d_resource_update_draw_binding(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
|
||||
@ -6843,7 +6806,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
static inline void wined3d_resource_inc_fence(struct wined3d_resource *resource)
|
||||
{
|
||||
InterlockedIncrement(&resource->access_fence);
|
||||
@@ -2589,6 +2648,7 @@ static inline void wined3d_resource_wait_fence(struct wined3d_resource *resource
|
||||
@@ -2588,6 +2645,7 @@ static inline void wined3d_resource_wait_fence(struct wined3d_resource *resource
|
||||
while(InterlockedCompareExchange(&resource->access_fence, 0, 0));
|
||||
}
|
||||
|
||||
@ -6851,7 +6814,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
/* Tests show that the start address of resources is 32 byte aligned */
|
||||
#define RESOURCE_ALIGNMENT 16
|
||||
|
||||
@@ -2646,7 +2706,9 @@ struct wined3d_texture
|
||||
@@ -2645,7 +2703,9 @@ struct wined3d_texture
|
||||
DWORD flags;
|
||||
GLenum target;
|
||||
DWORD update_map_binding;
|
||||
@ -6861,7 +6824,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
GLuint rb_multisample;
|
||||
GLuint rb_resolved;
|
||||
@@ -2684,8 +2746,12 @@ struct wined3d_texture
|
||||
@@ -2683,8 +2743,12 @@ struct wined3d_texture
|
||||
|
||||
unsigned int map_count;
|
||||
DWORD locations;
|
||||
@ -6874,7 +6837,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
} sub_resources[1];
|
||||
};
|
||||
|
||||
@@ -2736,6 +2802,7 @@ void wined3d_texture_bind(struct wined3d_texture *texture,
|
||||
@@ -2735,6 +2799,7 @@ void wined3d_texture_bind(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
@ -6882,7 +6845,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_texture_changed(struct wined3d_texture *texture,
|
||||
unsigned int sub_resource_idx, struct wined3d_gl_bo *swap_buffer,
|
||||
void *swap_heap_memory) DECLSPEC_HIDDEN;
|
||||
@@ -2745,6 +2812,13 @@ void wined3d_texture_get_dc_cs(struct wined3d_texture *texture, unsigned int sub
|
||||
@@ -2744,6 +2809,13 @@ void wined3d_texture_get_dc_cs(struct wined3d_texture *texture, unsigned int sub
|
||||
GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
struct wined3d_bo_address *data, DWORD locations, BOOL map) DECLSPEC_HIDDEN;
|
||||
@ -6896,7 +6859,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(struct wined3d_texture *texture,
|
||||
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_invalidate_location(struct wined3d_texture *texture,
|
||||
@@ -2755,6 +2829,7 @@ void *wined3d_texture_map_bo_address(const struct wined3d_bo_address *data, size
|
||||
@@ -2754,6 +2826,7 @@ void *wined3d_texture_map_bo_address(const struct wined3d_bo_address *data, size
|
||||
const struct wined3d_gl_info *gl_info, GLenum binding, DWORD flags) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
@ -6904,7 +6867,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
BOOL wined3d_texture_load_location(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
struct wined3d_context *context, DWORD location);
|
||||
void *wined3d_texture_map_internal(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
@@ -2770,6 +2845,15 @@ void wined3d_texture_unmap_bo_address(const struct wined3d_bo_address *data,
|
||||
@@ -2769,6 +2842,15 @@ void wined3d_texture_unmap_bo_address(const struct wined3d_bo_address *data,
|
||||
const struct wined3d_gl_info *gl_info, GLenum binding) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_unmap_internal(struct wined3d_texture *texture,
|
||||
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
@ -6920,7 +6883,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_texture_validate_location(struct wined3d_texture *texture,
|
||||
unsigned int sub_resource_idx, DWORD location) DECLSPEC_HIDDEN;
|
||||
|
||||
@@ -2887,7 +2971,11 @@ void surface_get_drawable_size(const struct wined3d_surface *surface, const stru
|
||||
@@ -2886,7 +2968,11 @@ void surface_get_drawable_size(const struct wined3d_surface *surface, const stru
|
||||
unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN;
|
||||
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
|
||||
struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
@ -6932,7 +6895,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
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_set_compatible_renderbuffer(struct wined3d_surface *surface,
|
||||
@@ -2898,9 +2986,11 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -2897,9 +2983,11 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
|
||||
const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point,
|
||||
BOOL srgb, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
|
||||
@ -6944,7 +6907,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
|
||||
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
@@ -2915,10 +3005,12 @@ struct wined3d_sampler
|
||||
@@ -2914,10 +3002,12 @@ struct wined3d_sampler
|
||||
GLuint name;
|
||||
};
|
||||
|
||||
@ -6957,7 +6920,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_vertex_declaration_element
|
||||
{
|
||||
const struct wined3d_format *format;
|
||||
@@ -3014,6 +3106,7 @@ struct wined3d_stateblock
|
||||
@@ -3013,6 +3103,7 @@ struct wined3d_stateblock
|
||||
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
|
||||
|
||||
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@ -6965,7 +6928,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl_info,
|
||||
const struct wined3d_d3d_info *d3d_info, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@@ -3064,6 +3157,44 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HID
|
||||
@@ -3063,6 +3154,44 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HID
|
||||
void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs, struct wined3d_context *context,
|
||||
struct wined3d_surface *depth_stencil) DECLSPEC_HIDDEN;
|
||||
@ -7010,7 +6973,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
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;
|
||||
@@ -3114,6 +3245,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -3113,6 +3242,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
|
||||
@ -7018,7 +6981,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -3171,6 +3303,14 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs,
|
||||
@@ -3168,6 +3298,14 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs,
|
||||
void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs,
|
||||
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
@ -7033,7 +6996,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
/* Direct3D terminology with little modifications. We do not have an issued state
|
||||
* because only the driver knows about it, but we have a created state because d3d
|
||||
@@ -3185,8 +3325,12 @@ enum query_state {
|
||||
@@ -3182,8 +3320,12 @@ enum query_state {
|
||||
struct wined3d_query_ops
|
||||
{
|
||||
HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags);
|
||||
@ -7046,7 +7009,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
struct wined3d_query
|
||||
@@ -3200,9 +3344,11 @@ struct wined3d_query
|
||||
@@ -3197,9 +3339,11 @@ struct wined3d_query
|
||||
enum wined3d_query_type type;
|
||||
DWORD data_size;
|
||||
void *extendedData;
|
||||
@ -7058,7 +7021,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
@@ -3230,7 +3376,9 @@ struct wined3d_buffer
|
||||
@@ -3227,7 +3371,9 @@ struct wined3d_buffer
|
||||
GLenum buffer_object_usage;
|
||||
GLenum buffer_type_hint;
|
||||
DWORD flags;
|
||||
@ -7068,7 +7031,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void *map_ptr;
|
||||
|
||||
struct wined3d_map_range *maps;
|
||||
@@ -3255,6 +3403,7 @@ void buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_context *co
|
||||
@@ -3252,6 +3398,7 @@ void buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_context *co
|
||||
BYTE *buffer_get_sysmem(struct wined3d_buffer *buffer, struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_context *context,
|
||||
const struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@ -7076,7 +7039,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
HRESULT wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_offset,
|
||||
struct wined3d_buffer *src_buffer, unsigned int src_offset, unsigned int size) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
|
||||
@@ -3263,6 +3412,13 @@ void buffer_invalidate_bo_range(struct wined3d_buffer *buffer, unsigned int offs
|
||||
@@ -3260,6 +3407,13 @@ void buffer_invalidate_bo_range(struct wined3d_buffer *buffer, unsigned int offs
|
||||
void buffer_swap_mem(struct wined3d_buffer *buffer, BYTE *mem) DECLSPEC_HIDDEN;
|
||||
void buffer_create_buffer_object(struct wined3d_buffer *This,
|
||||
struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
@ -7090,7 +7053,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
struct wined3d_rendertarget_view
|
||||
{
|
||||
@@ -3324,8 +3480,12 @@ struct wined3d_unordered_access_view
|
||||
@@ -3321,8 +3475,12 @@ struct wined3d_unordered_access_view
|
||||
struct wined3d_swapchain_ops
|
||||
{
|
||||
void (*swapchain_present)(struct wined3d_swapchain *swapchain,
|
||||
@ -7103,7 +7066,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void (*swapchain_frontbuffer_updated)(struct wined3d_swapchain *swapchain);
|
||||
};
|
||||
|
||||
@@ -3361,8 +3521,10 @@ struct wined3d_swapchain
|
||||
@@ -3358,8 +3516,10 @@ struct wined3d_swapchain
|
||||
|
||||
void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activate) DECLSPEC_HIDDEN;
|
||||
struct wined3d_context *swapchain_get_context(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
|
Loading…
x
Reference in New Issue
Block a user