Rebase against 754c68182623657b4862d7700afbf781b4555c77.

[ucrtbase-Functions]
Removed patch to forward _{calloc,malloc,free}_base to {calloc,malloc,free}.
This commit is contained in:
Sebastian Lackner 2016-06-17 19:03:57 +02:00
parent 6b9d38b61c
commit 5e5f21854b
5 changed files with 127 additions and 235 deletions

View File

@ -1,4 +1,4 @@
From 1b67c1863bd891d9949d0e391306135519e722b5 Mon Sep 17 00:00:00 2001
From 420ca2da1e8b4d43cb84e2a725842c0637612edf Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 13 Jul 2015 20:38:04 +1000
Subject: d3dx9_33: Share the source with d3dx9_36
@ -6,9 +6,9 @@ Subject: d3dx9_33: Share the source with d3dx9_36
---
dlls/d3dx9_33/Makefile.in | 22 +-
dlls/d3dx9_33/d3dx9_33.spec | 667 +++++++++++++++++++++---------------------
dlls/d3dx9_33/d3dx9_33_main.c | 19 ++
dlls/d3dx9_33/d3dx9_33_main.c | 1 +
tools/make_specfiles | 1 -
4 files changed, 373 insertions(+), 336 deletions(-)
4 files changed, 355 insertions(+), 336 deletions(-)
diff --git a/dlls/d3dx9_33/Makefile.in b/dlls/d3dx9_33/Makefile.in
index 0934eab..1106d11 100644
@ -716,7 +716,7 @@ index 35cb0b6..2790d1a 100644
+@ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long)
+@ stdcall D3DXWeldVertices(ptr long ptr ptr ptr ptr ptr)
diff --git a/dlls/d3dx9_33/d3dx9_33_main.c b/dlls/d3dx9_33/d3dx9_33_main.c
index 1b65a84..92f1772 100644
index 1b65a84..3e409e3 100644
--- a/dlls/d3dx9_33/d3dx9_33_main.c
+++ b/dlls/d3dx9_33/d3dx9_33_main.c
@@ -21,6 +21,7 @@
@ -727,30 +727,8 @@ index 1b65a84..92f1772 100644
#include <stdarg.h>
@@ -59,3 +60,21 @@ BOOL WINAPI D3DXCheckVersion(UINT d3dsdkvers, UINT d3dxsdkvers)
else
return FALSE;
}
+
+/***********************************************************************
+ * D3DXDebugMute
+ * Returns always FALSE for us.
+ */
+BOOL WINAPI D3DXDebugMute(BOOL mute)
+{
+ return FALSE;
+}
+
+/***********************************************************************
+ * D3DXGetDriverLevel.
+ * Returns always 900 (DX 9) for us
+ */
+UINT WINAPI D3DXGetDriverLevel(struct IDirect3DDevice9 *device)
+{
+ return 900;
+}
diff --git a/tools/make_specfiles b/tools/make_specfiles
index b0a7b0a..75be4b3 100755
index f55a42f..5f00f28 100755
--- a/tools/make_specfiles
+++ b/tools/make_specfiles
@@ -83,7 +83,6 @@ my @dll_groups =
@ -762,5 +740,5 @@ index b0a7b0a..75be4b3 100755
"d3dx9_31",
"d3dx9_30",
--
2.7.1
2.8.0

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "41d01871fef296dc717cf2c4f0bdbb07f5266acd"
echo "754c68182623657b4862d7700afbf781b4555c77"
}
# Show version information
@ -323,7 +323,6 @@ patch_enable_all ()
enable_stdole32_idl_Typelib="$1"
enable_stdole32_tlb_SLTG_Typelib="$1"
enable_taskmgr_Memory_Usage="$1"
enable_ucrtbase_Functions="$1"
enable_user_exe16_CONTAINING_RECORD="$1"
enable_user_exe16_DlgDirList="$1"
enable_user32_CharToOem="$1"
@ -1152,9 +1151,6 @@ patch_enable ()
taskmgr-Memory_Usage)
enable_taskmgr_Memory_Usage="$2"
;;
ucrtbase-Functions)
enable_ucrtbase_Functions="$2"
;;
user.exe16-CONTAINING_RECORD)
enable_user_exe16_CONTAINING_RECORD="$2"
;;
@ -6702,18 +6698,6 @@ if test "$enable_taskmgr_Memory_Usage" -eq 1; then
) >> "$patchlist"
fi
# Patchset ucrtbase-Functions
# |
# | Modified files:
# | * dlls/api-ms-win-crt-heap-l1-1-0/api-ms-win-crt-heap-l1-1-0.spec, dlls/ucrtbase/ucrtbase.spec
# |
if test "$enable_ucrtbase_Functions" -eq 1; then
patch_apply ucrtbase-Functions/0001-ucrtbase-Hook-up-some-functions-with-new-names-to-ex.patch
(
echo '+ { "Martin Storsjo", "ucrtbase: Hook up some functions with new names to existing implementations.", 1 },';
) >> "$patchlist"
fi
# Patchset user.exe16-CONTAINING_RECORD
# |
# | Modified files:

View File

@ -1,69 +0,0 @@
From 97853bae25a321b30e2ee38044c85af75fb61174 Mon Sep 17 00:00:00 2001
From: Martin Storsjo <martin@martin.st>
Date: Mon, 3 Aug 2015 22:26:01 +0300
Subject: ucrtbase: Hook up some functions with new names to existing
implementations
These are some functions that on a first glance seem to have a
matching signature even though the name has changed.
---
dlls/api-ms-win-crt-heap-l1-1-0/api-ms-win-crt-heap-l1-1-0.spec | 6 +++---
dlls/ucrtbase/ucrtbase.spec | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/api-ms-win-crt-heap-l1-1-0/api-ms-win-crt-heap-l1-1-0.spec b/dlls/api-ms-win-crt-heap-l1-1-0/api-ms-win-crt-heap-l1-1-0.spec
index 18ca9d4..418926e 100644
--- a/dlls/api-ms-win-crt-heap-l1-1-0/api-ms-win-crt-heap-l1-1-0.spec
+++ b/dlls/api-ms-win-crt-heap-l1-1-0/api-ms-win-crt-heap-l1-1-0.spec
@@ -7,14 +7,14 @@
@ cdecl _aligned_realloc(ptr long long) ucrtbase._aligned_realloc
@ stub _aligned_recalloc
@ cdecl _callnewh(long) ucrtbase._callnewh
-@ stub _calloc_base
+@ cdecl _calloc_base(long long) ucrtbase._calloc_base
@ cdecl _expand(ptr long) ucrtbase._expand
-@ stub _free_base
+@ cdecl _free_base(ptr) ucrtbase._free_base
@ cdecl _get_heap_handle() ucrtbase._get_heap_handle
@ cdecl _heapchk() ucrtbase._heapchk
@ cdecl _heapmin() ucrtbase._heapmin
@ cdecl _heapwalk(ptr) ucrtbase._heapwalk
-@ stub _malloc_base
+@ cdecl _malloc_base(long) ucrtbase._malloc_base
@ cdecl _msize(ptr) ucrtbase._msize
@ stub _query_new_handler
@ stub _query_new_mode
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index 3478342..53ca8fb 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -211,7 +211,7 @@
@ cdecl _c_exit() MSVCRT__c_exit
@ cdecl _cabs(long) MSVCRT__cabs
@ cdecl _callnewh(long)
-@ stub _calloc_base
+@ cdecl _calloc_base(long long) MSVCRT_calloc
@ cdecl _cexit() MSVCRT__cexit
@ cdecl _cgets(ptr)
@ stub _cgets_s
@@ -333,7 +333,7 @@
@ cdecl _fputwchar(long) MSVCRT__fputwchar
@ cdecl _fread_nolock(ptr long long ptr) MSVCRT__fread_nolock
@ cdecl _fread_nolock_s(ptr long long long ptr) MSVCRT__fread_nolock_s
-@ stub _free_base
+@ cdecl _free_base(ptr) MSVCRT_free
@ cdecl _free_locale(ptr) MSVCRT__free_locale
@ cdecl _fseek_nolock(ptr long long) MSVCRT__fseek_nolock
@ cdecl _fseeki64(ptr int64 long) MSVCRT__fseeki64
@@ -580,7 +580,7 @@
@ cdecl _ltow_s(long ptr long long) MSVCRT__ltow_s
@ cdecl _makepath(ptr str str str str) MSVCRT__makepath
@ cdecl _makepath_s(ptr long str str str str) MSVCRT__makepath_s
-@ stub _malloc_base
+@ cdecl _malloc_base(long) MSVCRT_malloc
@ cdecl _mbbtombc(long)
@ stub _mbbtombc_l
@ cdecl _mbbtype(long long)
--
2.6.4

View File

@ -1 +0,0 @@
Fixes: Forward _{calloc,malloc,free}_base to {calloc,malloc,free}

View File

@ -100,7 +100,7 @@ diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader
shader_arb_ps_local_constants(compiled, context, state, rt_height);
}
@@ -8010,11 +8022,16 @@
@@ -8012,11 +8024,16 @@
/* Leave the opengl state valid for blitting */
arbfp_blit_unset(context->gl_info);
@ -2274,7 +2274,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
device->adapter->vertex_pipe, device->adapter->fragment_pipe)))
{
@@ -1045,11 +1151,24 @@
@@ -1046,11 +1152,24 @@
device->swapchains[0] = swapchain;
device_init_swapchain_state(device, swapchain);
@ -2299,7 +2299,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
/* Clear the screen */
if (swapchain->back_buffers && swapchain->back_buffers[0])
@@ -1066,6 +1185,9 @@
@@ -1067,6 +1186,9 @@
return WINED3D_OK;
err_out:
@ -2309,7 +2309,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
HeapFree(GetProcessHeap(), 0, device->swapchains);
device->swapchain_count = 0;
if (device->back_buffer_view)
@@ -1122,6 +1244,10 @@
@@ -1123,6 +1245,10 @@
HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
{
struct wined3d_resource *resource, *cursor;
@ -2320,7 +2320,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
struct wined3d_surface *surface;
UINT i;
@@ -1130,6 +1256,7 @@
@@ -1131,6 +1257,7 @@
if (!device->d3d_initialized)
return WINED3DERR_INVALIDCALL;
@ -2328,7 +2328,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (wined3d_settings.cs_multithreaded)
device->cs->ops->finish(device->cs);
@@ -1170,6 +1297,82 @@
@@ -1171,6 +1298,82 @@
/* FIXME: Is this in the right place??? */
wined3d_cs_emit_delete_opengl_contexts(device->cs, device->swapchains[0]);
@ -2411,7 +2411,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (device->back_buffer_view)
{
wined3d_rendertarget_view_decref(device->back_buffer_view);
@@ -1187,6 +1390,11 @@
@@ -1188,6 +1391,11 @@
device->swapchains = NULL;
device->swapchain_count = 0;
@ -2423,7 +2423,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
device->d3d_initialized = FALSE;
return WINED3D_OK;
@@ -1231,7 +1439,11 @@
@@ -1232,7 +1440,11 @@
/* We can not acquire the context unless there is a swapchain. */
if (device->swapchains && gl_info->supported[NVX_GPU_MEMORY_INFO] &&
@ -2435,7 +2435,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
{
GLint vram_free_kb;
UINT64 vram_free;
@@ -1572,6 +1784,16 @@
@@ -1573,6 +1785,16 @@
light->direction.x, light->direction.y, light->direction.z,
light->range, light->falloff, light->theta, light->phi);
@ -2452,7 +2452,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
/* Save away the information. */
object->OriginalParms = *light;
@@ -1651,9 +1873,11 @@
@@ -1652,9 +1874,11 @@
FIXME("Unrecognized light type %#x.\n", light->type);
}
@ -2464,7 +2464,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return WINED3D_OK;
}
@@ -1726,6 +1950,14 @@
@@ -1727,6 +1951,14 @@
{
if (light_info->glIndex != -1)
{
@ -2479,7 +2479,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
device->update_state->lights[light_info->glIndex] = NULL;
light_info->glIndex = -1;
}
@@ -1767,11 +1999,23 @@
@@ -1768,11 +2000,23 @@
WARN("Too many concurrently active lights\n");
return WINED3D_OK;
}
@ -2503,7 +2503,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return WINED3D_OK;
}
@@ -1943,9 +2187,11 @@
@@ -1944,9 +2188,11 @@
TRACE("device %p, base_index %d.\n", device, base_index);
device->update_state->base_vertex_index = base_index;
@ -2515,7 +2515,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
INT CDECL wined3d_device_get_base_vertex_index(const struct wined3d_device *device)
@@ -1991,7 +2237,11 @@
@@ -1992,7 +2238,11 @@
|| !(dst_texture->resource.format_flags & WINED3DFMT_FLAG_DEPTH))
return;
@ -2527,7 +2527,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return;
if (src_view->resource->type == WINED3D_RTYPE_BUFFER)
{
@@ -2326,6 +2576,7 @@
@@ -2327,6 +2577,7 @@
return device->state.sampler[WINED3D_SHADER_TYPE_VERTEX][idx];
}
@ -2535,7 +2535,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
void device_invalidate_shader_constants(const struct wined3d_device *device, DWORD mask)
{
UINT i;
@@ -2336,6 +2587,7 @@
@@ -2337,6 +2588,7 @@
}
}
@ -2543,7 +2543,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
unsigned int start_idx, unsigned int count, const BOOL *constants)
{
@@ -2363,8 +2615,12 @@
@@ -2364,8 +2616,12 @@
}
else
{
@ -2556,7 +2556,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
return WINED3D_OK;
@@ -2413,8 +2669,12 @@
@@ -2414,8 +2670,12 @@
}
else
{
@ -2569,7 +2569,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
return WINED3D_OK;
@@ -2459,8 +2719,12 @@
@@ -2460,8 +2720,12 @@
memset(&device->recording->changed.vs_consts_f[start_idx], 1,
count * sizeof(*device->recording->changed.vs_consts_f));
else
@ -2582,7 +2582,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return WINED3D_OK;
}
@@ -2599,8 +2863,12 @@
@@ -2600,8 +2864,12 @@
}
else
{
@ -2595,7 +2595,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
return WINED3D_OK;
@@ -2649,8 +2917,12 @@
@@ -2650,8 +2918,12 @@
}
else
{
@ -2608,7 +2608,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
return WINED3D_OK;
@@ -2696,8 +2968,12 @@
@@ -2697,8 +2969,12 @@
memset(&device->recording->changed.ps_consts_f[start_idx], 1,
count * sizeof(*device->recording->changed.ps_consts_f));
else
@ -2621,7 +2621,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return WINED3D_OK;
}
@@ -2857,6 +3133,7 @@
@@ -2858,6 +3134,7 @@
return hr;
}
@ -2629,7 +2629,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (wined3d_settings.cs_multithreaded)
{
FIXME("Waiting for cs.\n");
@@ -2864,6 +3141,7 @@
@@ -2865,6 +3142,7 @@
device->cs->ops->finish(device->cs);
}
@ -2637,7 +2637,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
wined3d_device_get_transform(device, WINED3D_TS_VIEW, &view_mat);
wined3d_device_get_transform(device, WINED3D_TS_PROJECTION, &proj_mat);
wined3d_device_get_transform(device, WINED3D_TS_WORLD_MATRIX(0), &world_mat);
@@ -3349,6 +3627,10 @@
@@ -3350,6 +3628,10 @@
HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
{
@ -2648,7 +2648,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
TRACE("device %p.\n", device);
if (!device->inScene)
@@ -3357,6 +3639,15 @@
@@ -3358,6 +3640,15 @@
return WINED3DERR_INVALIDCALL;
}
@ -2664,7 +2664,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
device->inScene = FALSE;
return WINED3D_OK;
}
@@ -3364,8 +3655,10 @@
@@ -3365,8 +3656,10 @@
HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_count,
const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
{
@ -2675,7 +2675,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
TRACE("device %p, rect_count %u, rects %p, flags %#x, color %s, depth %.8e, stencil %u.\n",
device, rect_count, rects, flags, debug_color(color), depth, stencil);
@@ -3377,7 +3670,11 @@
@@ -3378,7 +3671,11 @@
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
{
@ -2687,7 +2687,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (!ds)
{
WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
@@ -3386,8 +3683,13 @@
@@ -3387,8 +3684,13 @@
}
else if (flags & WINED3DCLEAR_TARGET)
{
@ -2701,7 +2701,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
{
WARN("Silently ignoring depth and target clear with mismatching sizes\n");
return WINED3D_OK;
@@ -3433,6 +3735,9 @@
@@ -3434,6 +3736,9 @@
enum wined3d_primitive_type primitive_type)
{
GLenum gl_primitive_type, prev;
@ -2711,7 +2711,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
TRACE("device %p, primitive_type %s\n", device, debug_d3dprimitivetype(primitive_type));
gl_primitive_type = gl_primitive_type_from_d3d(primitive_type);
@@ -3440,8 +3745,13 @@
@@ -3441,8 +3746,13 @@
device->update_state->gl_primitive_type = gl_primitive_type;
if (device->recording)
device->recording->changed.primitive_type = TRUE;
@ -2725,7 +2725,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
void CDECL wined3d_device_get_primitive_type(const struct wined3d_device *device,
@@ -3458,6 +3768,14 @@
@@ -3459,6 +3769,14 @@
{
TRACE("device %p, start_vertex %u, vertex_count %u.\n", device, start_vertex, vertex_count);
@ -2740,7 +2740,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
wined3d_cs_emit_draw(device->cs, start_vertex, vertex_count, 0, 0, FALSE);
return WINED3D_OK;
@@ -3474,6 +3792,10 @@
@@ -3475,6 +3793,10 @@
HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *device, UINT start_idx, UINT index_count)
{
@ -2751,7 +2751,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
TRACE("device %p, start_idx %u, index_count %u.\n", device, start_idx, index_count);
if (!device->state.index_buffer)
@@ -3486,6 +3808,15 @@
@@ -3487,6 +3809,15 @@
return WINED3DERR_INVALIDCALL;
}
@ -2767,7 +2767,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
wined3d_cs_emit_draw(device->cs, start_idx, index_count, 0, 0, TRUE);
return WINED3D_OK;
@@ -3500,6 +3831,7 @@
@@ -3501,6 +3832,7 @@
wined3d_cs_emit_draw(device->cs, start_idx, index_count, start_instance, instance_count, TRUE);
}
@ -2775,7 +2775,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
/* Context activation is done by the caller. */
static void wined3d_device_update_texture_3d(struct wined3d_context *context,
struct wined3d_texture *src_texture, unsigned int src_level,
@@ -3510,6 +3842,36 @@
@@ -3511,6 +3843,36 @@
TRACE("context %p, src_texture %p, src_level %u, dst_texture %p, level_count %u.\n",
context, src_texture, src_level, dst_texture, level_count);
@ -2812,7 +2812,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
/* Only a prepare, since we're uploading entire volumes. */
wined3d_texture_prepare_texture(dst_texture, context, FALSE);
@@ -3517,6 +3879,7 @@
@@ -3518,6 +3880,7 @@
for (i = 0; i < level_count; ++i)
{
@ -2820,7 +2820,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
wined3d_texture_get_memory(src_texture, src_level + i, &data,
src_texture->resource.map_binding, FALSE);
@@ -3594,6 +3957,34 @@
@@ -3595,6 +3958,34 @@
unsigned int src_size, dst_size, src_skip_levels = 0;
unsigned int layer_count;
enum wined3d_resource_type type;
@ -2855,7 +2855,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
TRACE("device %p, src_texture %p, dst_texture %p.\n", device, src_texture, dst_texture);
@@ -3630,6 +4021,7 @@
@@ -3631,6 +4022,7 @@
return WINED3DERR_INVALIDCALL;
}
@ -2863,7 +2863,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
/* FIXME: This isn't necessary for 2D textures, but currently surface_upload_from_surface
* rejects mismatching formats, and we can't report the error back after dispatching the
* call. */
@@ -3672,6 +4064,65 @@
@@ -3673,6 +4065,65 @@
wined3d_cs_emit_update_texture(device->cs, src_texture, dst_texture);
return WINED3D_OK;
@ -2929,7 +2929,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes)
@@ -3719,8 +4170,13 @@
@@ -3720,8 +4171,13 @@
if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE]
|| state->render_states[WINED3D_RS_STENCILENABLE])
{
@ -2943,7 +2943,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
{
@@ -3909,7 +4365,9 @@
@@ -3910,7 +4366,9 @@
struct wined3d_texture *dst_texture, *src_texture;
RECT dst_rect, src_rect;
HRESULT hr;
@ -2953,7 +2953,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
TRACE("device %p, dst_resource %p, dst_sub_resource_idx %u, dst_x %u, dst_y %u, dst_z %u, "
"src_resource %p, src_sub_resource_idx %u, src_box %s.\n",
@@ -3997,6 +4455,7 @@
@@ -3998,6 +4456,7 @@
if (src_box)
{
@ -2961,7 +2961,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if ((src_texture->resource.format_flags & WINED3DFMT_FLAG_BLOCKS)
&& !wined3d_texture_check_block_align(src_texture,
src_sub_resource_idx % src_texture->level_count, src_box))
@@ -4005,6 +4464,7 @@
@@ -4006,6 +4465,7 @@
return WINED3DERR_INVALIDCALL;
}
@ -2969,7 +2969,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
SetRect(&src_rect, src_box->left, src_box->top, src_box->right, src_box->bottom);
}
else
@@ -4018,6 +4478,7 @@
@@ -4019,6 +4479,7 @@
SetRect(&dst_rect, dst_x, dst_y, dst_x + (src_rect.right - src_rect.left),
dst_y + (src_rect.bottom - src_rect.top));
@ -2977,7 +2977,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (dst_texture->resource.format_flags & WINED3DFMT_FLAG_BLOCKS)
{
dst_box.left = dst_rect.left;
@@ -4035,6 +4496,7 @@
@@ -4036,6 +4497,7 @@
}
}
@ -2985,7 +2985,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (FAILED(hr = wined3d_texture_blt(dst_texture, dst_sub_resource_idx, &dst_rect,
src_texture, src_sub_resource_idx, &src_rect, 0, NULL, WINED3D_TEXF_POINT)))
WARN("Failed to blit, hr %#x.\n", hr);
@@ -4047,7 +4509,18 @@
@@ -4048,7 +4510,18 @@
unsigned int depth_pitch)
{
struct wined3d_texture_sub_resource *sub_resource;
@ -3004,7 +3004,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
TRACE("device %p, resource %p, sub_resource_idx %u, box %s, data %p, row_pitch %u, depth_pitch %u.\n",
device, resource, sub_resource_idx, debug_box(box), data, row_pitch, depth_pitch);
@@ -4081,6 +4554,7 @@
@@ -4082,6 +4555,7 @@
WARN("Invalid sub_resource_idx %u.\n", sub_resource_idx);
return;
}
@ -3012,7 +3012,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (box)
{
@@ -4090,6 +4564,18 @@
@@ -4091,6 +4565,18 @@
width = wined3d_texture_get_level_width(texture, level);
height = wined3d_texture_get_level_height(texture, level);
@ -3031,7 +3031,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (box->left >= box->right || box->right > width
|| box->top >= box->bottom || box->bottom > height
|| box->front >= box->back)
@@ -4097,9 +4583,46 @@
@@ -4098,9 +4584,46 @@
WARN("Invalid box %s specified.\n", debug_box(box));
return;
}
@ -3078,7 +3078,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
@@ -4108,8 +4631,13 @@
@@ -4109,8 +4632,13 @@
{
const struct blit_shader *blitter;
struct wined3d_resource *resource;
@ -3092,7 +3092,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
TRACE("device %p, view %p, rect %s, flags %#x, color %s, depth %.8e, stencil %u.\n",
device, view, wine_dbgstr_rect(rect), flags, debug_color(color), depth, stencil);
@@ -4148,8 +4676,15 @@
@@ -4149,8 +4677,15 @@
return WINED3DERR_INVALIDCALL;
}
@ -3108,7 +3108,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device,
@@ -4163,6 +4698,7 @@
@@ -4164,6 +4699,7 @@
return NULL;
}
@ -3116,7 +3116,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return device->state.fb.render_targets[view_idx];
}
@@ -4178,6 +4714,22 @@
@@ -4179,6 +4715,22 @@
{
struct wined3d_rendertarget_view *prev;
struct wined3d_fb_state *fb = &device->state.fb;
@ -3139,7 +3139,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
device, view_idx, view, set_viewport);
@@ -4217,6 +4769,7 @@
@@ -4218,6 +4770,7 @@
}
@ -3147,7 +3147,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
prev = fb->render_targets[view_idx];
if (view == prev)
return WINED3D_OK;
@@ -4224,6 +4777,15 @@
@@ -4225,6 +4778,15 @@
if (view)
wined3d_rendertarget_view_incref(view);
fb->render_targets[view_idx] = view;
@ -3163,7 +3163,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view);
/* Release after the assignment, to prevent device_resource_released()
* from seeing the surface as still in use. */
@@ -4235,6 +4797,7 @@
@@ -4236,6 +4798,7 @@
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
{
@ -3171,7 +3171,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
struct wined3d_fb_state *fb = &device->state.fb;
struct wined3d_rendertarget_view *prev;
@@ -4248,6 +4811,20 @@
@@ -4249,6 +4812,20 @@
}
if ((fb->depth_stencil = view))
@ -3192,7 +3192,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
wined3d_rendertarget_view_incref(view);
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
if (prev)
@@ -4469,8 +5046,10 @@
@@ -4470,8 +5047,10 @@
TRACE("device %p.\n", device);
@ -3203,7 +3203,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
{
TRACE("Checking resource %p for eviction.\n", resource);
@@ -4478,6 +5057,7 @@
@@ -4479,6 +5058,7 @@
if (resource->pool == WINED3D_POOL_MANAGED && !resource->map_count)
{
TRACE("Evicting %p.\n", resource);
@ -3211,7 +3211,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
wined3d_cs_emit_evict_resource(device->cs, resource);
}
}
@@ -4496,6 +5076,36 @@
@@ -4497,6 +5077,36 @@
context = context_acquire(device, NULL);
gl_info = context->gl_info;
@ -3248,7 +3248,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (device->depth_blt_texture)
{
@@ -4517,6 +5127,7 @@
@@ -4518,6 +5128,7 @@
HeapFree(GetProcessHeap(), 0, swapchain->context);
swapchain->context = NULL;
@ -3256,7 +3256,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
swapchain->num_contexts = 0;
}
@@ -4535,6 +5146,14 @@
@@ -4536,6 +5147,14 @@
static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
{
@ -3271,7 +3271,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
HRESULT hr;
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
@@ -4551,6 +5170,7 @@
@@ -4552,6 +5171,7 @@
return hr;
}
@ -3279,7 +3279,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
hr = wined3d_cs_emit_create_swapchain_context(device->cs, swapchain);
if (FAILED(hr))
{
@@ -4561,6 +5181,33 @@
@@ -4562,6 +5182,33 @@
}
wined3d_cs_emit_create_dummy_textures(device->cs);
@ -3313,7 +3313,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return WINED3D_OK;
}
@@ -4580,12 +5227,14 @@
@@ -4581,12 +5228,14 @@
TRACE("device %p, swapchain_desc %p, mode %p, callback %p, reset_state %#x.\n",
device, swapchain_desc, mode, callback, reset_state);
@ -3328,7 +3328,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (!(swapchain = wined3d_device_get_swapchain(device, 0)))
{
ERR("Failed to get the first implicit swapchain.\n");
@@ -4605,9 +5254,16 @@
@@ -4606,9 +5255,16 @@
wined3d_texture_decref(device->cursor_texture);
device->cursor_texture = NULL;
}
@ -3345,7 +3345,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
{
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@@ -4616,6 +5272,7 @@
@@ -4617,6 +5273,7 @@
}
wined3d_device_set_depth_stencil_view(device, NULL);
@ -3353,7 +3353,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (reset_state)
{
state_unbind_resources(&device->state);
@@ -4625,6 +5282,12 @@
@@ -4626,6 +5283,12 @@
{
wined3d_texture_decref(device->cs->onscreen_depth_stencil->container);
device->cs->onscreen_depth_stencil = NULL;
@ -3366,7 +3366,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
if (reset_state)
@@ -4844,6 +5507,7 @@
@@ -4847,6 +5510,7 @@
if (device->d3d_initialized)
delete_opengl_contexts(device, swapchain);
@ -3374,7 +3374,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (FAILED(hr = state_init(&device->state, &device->adapter->gl_info,
&device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT)))
ERR("Failed to initialize device state, hr %#x.\n", hr);
@@ -4868,6 +5532,32 @@
@@ -4871,6 +5535,32 @@
state->scissor_rect.left = 0;
state->scissor_rect.right = swapchain->desc.backbuffer_width;
state->scissor_rect.bottom = swapchain->desc.backbuffer_height;
@ -3407,7 +3407,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
}
@@ -4875,7 +5565,11 @@
@@ -4878,7 +5568,11 @@
{
if (reset_state)
hr = create_primary_opengl_context(device, swapchain);
@ -3419,7 +3419,7 @@ 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
@@ -4955,6 +5649,7 @@
@@ -4958,6 +5652,7 @@
TRACE("device %p, resource %p, type %s.\n", device, resource, debug_d3dresourcetype(type));
@ -3427,7 +3427,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
if ((rtv = device->state.fb.render_targets[i]) && rtv->resource == resource)
@@ -4962,6 +5657,17 @@
@@ -4965,6 +5660,17 @@
}
if ((rtv = device->state.fb.depth_stencil) && rtv->resource == resource)
@ -3445,7 +3445,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)
@@ -5097,12 +5803,17 @@
@@ -5100,12 +5806,17 @@
device->blitter = adapter->blitter;
@ -3463,7 +3463,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)))
@@ -5196,6 +5907,7 @@
@@ -5199,6 +5910,7 @@
else
return CallWindowProcA(proc, window, message, wparam, lparam);
}
@ -3471,7 +3471,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,
@@ -5249,3 +5961,4 @@
@@ -5252,3 +5964,4 @@
wined3d_device_destroy_bo(device, context, bo);
}
@ -4345,7 +4345,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
@@ -2350,7 +2350,11 @@
@@ -2352,7 +2352,11 @@
string_buffer_free(&buffer);
}
@ -4357,7 +4357,7 @@ diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
{
HeapFree(GetProcessHeap(), 0, shader->output_signature.elements);
HeapFree(GetProcessHeap(), 0, shader->input_signature.elements);
@@ -2618,10 +2622,16 @@
@@ -2620,10 +2624,16 @@
if (!refcount)
{
@ -4374,7 +4374,7 @@ diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
}
return refcount;
@@ -2942,7 +2952,11 @@
@@ -2944,7 +2954,11 @@
UINT i;
memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */
@ -7274,7 +7274,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
@@ -1319,8 +1323,10 @@
@@ -1321,8 +1325,10 @@
struct list entry;
GLuint id;
struct wined3d_context *context;
@ -7285,7 +7285,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
union wined3d_gl_query_object
@@ -1356,6 +1362,7 @@
@@ -1358,6 +1364,7 @@
struct list entry;
GLuint id;
struct wined3d_context *context;
@ -7293,7 +7293,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
UINT64 timestamp;
};
@@ -1391,6 +1398,12 @@
@@ -1393,6 +1400,12 @@
for (i = 0; i < min(dst->rt_size, src->rt_size); i++)
dst->render_targets[i] = src->render_targets[i];
}
@ -7306,7 +7306,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_context
{
@@ -1406,7 +1419,9 @@
@@ -1408,7 +1421,9 @@
DWORD dirtyArray[STATE_HIGHEST + 1]; /* Won't get bigger than that, a state is never marked dirty 2 times */
DWORD numDirtyEntries;
DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */
@ -7316,7 +7316,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_swapchain *swapchain;
struct
@@ -1514,6 +1529,14 @@
@@ -1516,6 +1531,14 @@
GLuint dummy_arbfp_prog;
};
@ -7331,7 +7331,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
struct StateEntry
@@ -1652,7 +1675,11 @@
@@ -1654,7 +1677,11 @@
void context_alloc_occlusion_query(struct wined3d_context *context,
struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN;
void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device) DECLSPEC_HIDDEN;
@ -7343,7 +7343,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
UINT rt_count, const struct wined3d_fb_state *fb) DECLSPEC_HIDDEN;
BOOL context_apply_draw_state(struct wined3d_context *context,
const struct wined3d_device *device, const struct wined3d_state *state) DECLSPEC_HIDDEN;
@@ -2272,7 +2299,11 @@
@@ -2274,7 +2301,11 @@
struct wined3d_state
{
DWORD flags;
@ -7355,7 +7355,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_vertex_declaration *vertex_declaration;
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
@@ -2318,6 +2349,7 @@
@@ -2320,6 +2351,7 @@
DWORD render_states[WINEHIGHEST_RENDER_STATE + 1];
};
@ -7363,7 +7363,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_gl_bo
{
GLuint name;
@@ -2326,6 +2358,7 @@
@@ -2328,6 +2360,7 @@
UINT size;
};
@ -7371,7 +7371,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
#define WINED3D_UNMAPPED_STAGE ~0U
/* Multithreaded flag. Removed from the public header to signal that
@@ -2378,11 +2411,23 @@
@@ -2380,11 +2413,23 @@
struct wined3d_rendertarget_view *back_buffer_view;
struct wined3d_swapchain **swapchains;
UINT swapchain_count;
@ -7395,7 +7395,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* For rendering to a texture using glCopyTexImage */
GLuint depth_blt_texture;
@@ -2430,6 +2475,7 @@
@@ -2432,6 +2477,7 @@
UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN;
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@ -7403,7 +7403,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
void device_invalidate_shader_constants(const struct wined3d_device *device, DWORD mask) DECLSPEC_HIDDEN;
void device_exec_update_texture(struct wined3d_context *context, struct wined3d_texture *src_texture,
@@ -2441,6 +2487,11 @@
@@ -2443,6 +2489,11 @@
void device_create_dummy_textures(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN;
void device_delete_opengl_contexts_cs(struct wined3d_device *device,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
@ -7415,7 +7415,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -2484,9 +2535,14 @@
@@ -2486,9 +2537,14 @@
UINT depth;
UINT size;
DWORD priority;
@ -7430,7 +7430,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void *parent;
const struct wined3d_parent_ops *parent_ops;
@@ -2512,7 +2568,9 @@
@@ -2514,7 +2570,9 @@
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;
@ -7440,7 +7440,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
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;
@@ -2520,6 +2578,7 @@
@@ -2522,6 +2580,7 @@
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;
@ -7448,7 +7448,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);
@@ -2535,6 +2594,7 @@
@@ -2537,6 +2596,7 @@
while(InterlockedCompareExchange(&resource->access_fence, 0, 0));
}
@ -7456,7 +7456,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
@@ -2592,7 +2652,9 @@
@@ -2594,7 +2654,9 @@
DWORD flags;
GLenum target;
DWORD update_map_binding;
@ -7466,7 +7466,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
GLuint rb_multisample;
GLuint rb_resolved;
@@ -2630,8 +2692,12 @@
@@ -2632,8 +2694,12 @@
unsigned int map_count;
DWORD locations;
@ -7479,7 +7479,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
} sub_resources[1];
};
@@ -2682,6 +2748,7 @@
@@ -2684,6 +2750,7 @@
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;
@ -7487,7 +7487,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;
@@ -2692,6 +2759,13 @@
@@ -2694,6 +2761,13 @@
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;
@ -7501,7 +7501,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,
@@ -2702,6 +2776,7 @@
@@ -2704,6 +2778,7 @@
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;
@ -7509,7 +7509,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,
@@ -2717,6 +2792,15 @@
@@ -2719,6 +2794,15 @@
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;
@ -7525,7 +7525,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;
@@ -2834,7 +2918,11 @@
@@ -2836,7 +2920,11 @@
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;
@ -7537,7 +7537,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,
@@ -2845,9 +2933,11 @@
@@ -2847,9 +2935,11 @@
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;
@ -7549,7 +7549,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;
@@ -2862,12 +2952,14 @@
@@ -2864,12 +2954,14 @@
GLuint name;
};
@ -7564,7 +7564,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;
@@ -2896,8 +2988,10 @@
@@ -2898,8 +2990,10 @@
BOOL half_float_conv_needed;
};
@ -7575,7 +7575,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_saved_states
{
DWORD transform[(HIGHEST_TRANSFORMSTATE >> 5) + 1];
@@ -2965,6 +3059,7 @@
@@ -2967,6 +3061,7 @@
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -7583,7 +7583,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;
@@ -3015,6 +3110,44 @@
@@ -3017,6 +3112,44 @@
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;
@ -7628,7 +7628,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;
@@ -3063,6 +3196,7 @@
@@ -3065,6 +3198,7 @@
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;
@ -7636,7 +7636,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,
@@ -3130,6 +3264,14 @@
@@ -3132,6 +3266,14 @@
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;
@ -7651,7 +7651,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
@@ -3144,8 +3286,12 @@
@@ -3146,8 +3288,12 @@
struct wined3d_query_ops
{
HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags);
@ -7664,7 +7664,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
struct wined3d_query
@@ -3159,12 +3305,16 @@
@@ -3161,12 +3307,16 @@
enum wined3d_query_type type;
DWORD data_size;
void *extendedData;
@ -7681,7 +7681,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
* fixed function semantics as D3DCOLOR or FLOAT16 */
@@ -3191,7 +3341,9 @@
@@ -3193,7 +3343,9 @@
GLenum buffer_object_usage;
GLenum buffer_type_hint;
DWORD flags;
@ -7691,7 +7691,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void *map_ptr;
struct wined3d_map_range *maps;
@@ -3216,6 +3368,7 @@
@@ -3218,6 +3370,7 @@
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;
@ -7699,7 +7699,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,
@@ -3225,6 +3378,13 @@
@@ -3227,6 +3380,13 @@
void buffer_create_buffer_object(struct wined3d_buffer *This,
struct wined3d_context *context) DECLSPEC_HIDDEN;
void wined3d_buffer_cleanup_cs(struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
@ -7713,7 +7713,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_rendertarget_view
{
@@ -3257,8 +3417,10 @@
@@ -3259,8 +3419,10 @@
return texture->sub_resources[view->sub_resource_idx].u.surface;
}
@ -7724,7 +7724,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_shader_resource_view
{
LONG refcount;
@@ -3274,6 +3436,7 @@
@@ -3276,6 +3438,7 @@
void wined3d_shader_resource_view_bind(struct wined3d_shader_resource_view *view,
struct wined3d_context *context) DECLSPEC_HIDDEN;
@ -7732,7 +7732,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void wined3d_shader_resource_view_destroy_cs(struct wined3d_shader_resource_view *view) DECLSPEC_HIDDEN;
struct wined3d_swapchain_ops
@@ -3281,6 +3444,12 @@
@@ -3283,6 +3446,12 @@
void (*swapchain_present)(struct wined3d_swapchain *swapchain,
const RECT *src_rect, const RECT *dst_rect, DWORD flags,
struct wined3d_rendertarget_view *depth_stencil);
@ -7745,7 +7745,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void (*swapchain_frontbuffer_updated)(struct wined3d_swapchain *swapchain);
};
@@ -3316,8 +3485,10 @@
@@ -3318,8 +3487,10 @@
void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activate) DECLSPEC_HIDDEN;
struct wined3d_context *swapchain_get_context(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
@ -7756,7 +7756,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void swapchain_destroy_contexts(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
@@ -3529,7 +3700,9 @@
@@ -3531,7 +3702,9 @@
void shader_generate_main(const struct wined3d_shader *shader, struct wined3d_string_buffer *buffer,
const struct wined3d_shader_reg_maps *reg_maps, const DWORD *byte_code, void *backend_ctx) DECLSPEC_HIDDEN;
BOOL shader_match_semantic(const char *semantic_name, enum wined3d_decl_usage usage) DECLSPEC_HIDDEN;