Rebase against 58e95f72218fa018739c484f172bc236e685d5bb.

[dbghelp-EnumerateLoadedModulesExW]
Removed patch to implement dbghelp.EnumerateLoadedModulesExW (fixed upstream).
This commit is contained in:
Sebastian Lackner 2016-05-19 01:23:36 +02:00
parent 8a2c526e13
commit 16e6b1c3e3
12 changed files with 323 additions and 392 deletions

View File

@ -1,47 +0,0 @@
From fe5d45b540dccdb589978118b7c2828414e21331 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 16 May 2016 18:00:49 +0200
Subject: dbghelp: Implement EnumerateLoadedModulesExW.
---
dlls/dbghelp/dbghelp.spec | 2 +-
dlls/dbghelp/module.c | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/dbghelp/dbghelp.spec b/dlls/dbghelp/dbghelp.spec
index 6004f95..624e023 100644
--- a/dlls/dbghelp/dbghelp.spec
+++ b/dlls/dbghelp/dbghelp.spec
@@ -5,7 +5,7 @@
@ stdcall EnumerateLoadedModules(long ptr ptr)
@ stdcall EnumerateLoadedModules64(long ptr ptr)
@ stub EnumerateLoadedModulesEx
-@ stub EnumerateLoadedModulesExW
+@ stub EnumerateLoadedModulesExW(long ptr ptr)
@ stdcall EnumerateLoadedModulesW64(long ptr ptr)
@ stdcall ExtensionApiVersion()
@ stdcall FindDebugInfoFile(str str ptr)
diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c
index 69a043c..f22ee65 100644
--- a/dlls/dbghelp/module.c
+++ b/dlls/dbghelp/module.c
@@ -921,6 +921,16 @@ BOOL WINAPI EnumerateLoadedModulesW64(HANDLE hProcess,
}
/******************************************************************
+ * EnumerateLoadedModulesExW (DBGHELP.@)
+ *
+ */
+BOOL WINAPI EnumerateLoadedModulesExW(HANDLE process, PENUMLOADED_MODULES_CALLBACKW64 callback,
+ PVOID context)
+{
+ return EnumerateLoadedModulesW64(process, callback, context);
+}
+
+/******************************************************************
* SymGetModuleInfo (DBGHELP.@)
*
*/
--
2.8.0

View File

@ -1 +0,0 @@
Fixes: [40614] Implement dbghelp.EnumerateLoadedModulesExW

View File

@ -1,4 +1,4 @@
From 31e4f44b8a215624ffc771f055ca1012f4c77841 Mon Sep 17 00:00:00 2001
From ed0264f5193ecf9d7724be5de6c9bda17919105f Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 28 Mar 2015 08:18:10 +0100
Subject: dsound: Apply filters before sound is multiplied to speakers.
@ -11,34 +11,34 @@ Based on a patch by Mark Harmstone.
3 files changed, 77 insertions(+), 32 deletions(-)
diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
index cc3feb2..560c1f8 100644
index 64bfbd3..d73610e 100644
--- a/dlls/dsound/dsound.c
+++ b/dlls/dsound/dsound.c
@@ -237,6 +237,7 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
@@ -233,6 +233,7 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
if(device->volume)
IAudioStreamVolume_Release(device->volume);
+ HeapFree(GetProcessHeap(), 0, device->dsp_buffer);
HeapFree(GetProcessHeap(), 0, device->tmp_buffer);
HeapFree(GetProcessHeap(), 0, device->cp_buffer);
HeapFree(GetProcessHeap(), 0, device->buffer);
RtlDeleteResource(&device->buffer_list_lock);
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index 6cfc33e..c6beaea 100644
index 34bab65..f580915 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -88,8 +88,8 @@ struct DirectSoundDevice
int speaker_num[DS_MAX_CHANNELS];
int num_speakers;
int lfe_channel;
- float *tmp_buffer;
- DWORD tmp_buffer_len;
+ float *tmp_buffer, *dsp_buffer;
+ DWORD tmp_buffer_len, dsp_buffer_len;
- float *tmp_buffer, *cp_buffer;
- DWORD tmp_buffer_len, cp_buffer_len;
+ float *tmp_buffer, *cp_buffer, *dsp_buffer;
+ DWORD tmp_buffer_len, cp_buffer_len, dsp_buffer_len;
DSVOLUMEPAN volpan;
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
index c358385..9a6224e 100644
index a2fd768..db4235d 100644
--- a/dlls/dsound/mixer.c
+++ b/dlls/dsound/mixer.c
@@ -266,23 +266,22 @@ static inline float get_current_sample(const IDirectSoundBufferImpl *dsb,
@ -93,7 +93,7 @@ index c358385..9a6224e 100644
LONG64 freqAcc_start = *freqAccNum;
LONG64 freqAcc_end = freqAcc_start + count * dsb->freqAdjustNum;
@@ -372,7 +371,7 @@ static UINT cp_fields_resample_hq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
@@ -383,7 +382,7 @@ static UINT cp_fields_resample_hq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
float* cache = &intermediate[channel * required_input + ipos];
for (j = 0; j < fir_used; j++)
sum += fir_copy[j] * cache[j];
@ -102,7 +102,7 @@ index c358385..9a6224e 100644
}
}
@@ -384,16 +383,17 @@ static UINT cp_fields_resample_hq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
@@ -392,16 +391,17 @@ static UINT cp_fields_resample_hq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
return max_ipos;
}
@ -124,7 +124,7 @@ index c358385..9a6224e 100644
ipos = dsb->sec_mixpos + adv * dsb->pwfx->nBlockAlign;
if (ipos >= dsb->buflen) {
@@ -423,6 +423,21 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
@@ -431,6 +431,21 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
return buflen + ptr1 - ptr2;
}
}
@ -146,7 +146,7 @@ index c358385..9a6224e 100644
/**
* Mix at most the given amount of data into the allocated temporary buffer
* of the given secondary buffer, starting from the dsb's first currently
@@ -438,32 +453,61 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
@@ -446,32 +461,61 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
*/
static void DSOUND_MixToTemporary(IDirectSoundBufferImpl *dsb, DWORD frames)
{

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "aa475ce23fa295a8f5d0fa120d7b3dac1a5a41b5"
echo "58e95f72218fa018739c484f172bc236e685d5bb"
}
# Show version information
@ -125,7 +125,6 @@ patch_enable_all ()
enable_d3dx9_36_Texture_Align="$1"
enable_d3dx9_36_UpdateSkinnedMesh="$1"
enable_dbghelp_Debug_Symbols="$1"
enable_dbghelp_EnumerateLoadedModulesExW="$1"
enable_ddraw_D3DFINDDEVICERESULT="$1"
enable_ddraw_Device_Caps="$1"
enable_ddraw_EnumSurfaces="$1"
@ -553,9 +552,6 @@ patch_enable ()
dbghelp-Debug_Symbols)
enable_dbghelp_Debug_Symbols="$2"
;;
dbghelp-EnumerateLoadedModulesExW)
enable_dbghelp_EnumerateLoadedModulesExW="$2"
;;
ddraw-D3DFINDDEVICERESULT)
enable_ddraw_D3DFINDDEVICERESULT="$2"
;;
@ -3264,21 +3260,6 @@ if test "$enable_dbghelp_Debug_Symbols" -eq 1; then
) >> "$patchlist"
fi
# Patchset dbghelp-EnumerateLoadedModulesExW
# |
# | This patchset fixes the following Wine bugs:
# | * [#40614] Implement dbghelp.EnumerateLoadedModulesExW
# |
# | Modified files:
# | * dlls/dbghelp/dbghelp.spec, dlls/dbghelp/module.c
# |
if test "$enable_dbghelp_EnumerateLoadedModulesExW" -eq 1; then
patch_apply dbghelp-EnumerateLoadedModulesExW/0001-dbghelp-Implement-EnumerateLoadedModulesExW.patch
(
echo '+ { "Michael Müller", "dbghelp: Implement EnumerateLoadedModulesExW.", 1 },';
) >> "$patchlist"
fi
# Patchset ddraw-D3DFINDDEVICERESULT
# |
# | Modified files:

View File

@ -1,4 +1,4 @@
From 130d9dfce6a2aa843885d204471605967c76b164 Mon Sep 17 00:00:00 2001
From 39cecce0d60c0b630442f1b5dc61d73a205599a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 17 Nov 2015 23:13:29 -0800
Subject: wined3d: Call texture_load_location instead of surface_load_location.
@ -12,7 +12,7 @@ Subject: wined3d: Call texture_load_location instead of surface_load_location.
5 files changed, 36 insertions(+), 23 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index f12cbf4..4be5c0c 100644
index 5b3b0c9..147bb9a 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -203,12 +203,15 @@ void device_switch_onscreen_ds(struct wined3d_device *device,
@ -43,7 +43,7 @@ index f12cbf4..4be5c0c 100644
}
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 78628c5..83fe4c3 100644
index 0f914df..9103d42 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -481,7 +481,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
@ -56,7 +56,7 @@ index 78628c5..83fe4c3 100644
wined3d_texture_prepare_location(ds->container, dsv->sub_resource_idx, context, location);
}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 3435d17..68bf333 100644
index 61135b9..fe9f4fa 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -450,9 +450,11 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device,
@ -96,7 +96,7 @@ index 3435d17..68bf333 100644
wined3d_texture_bind_and_dirtify(dst_texture, context, FALSE);
wined3d_texture_get_memory(src_texture, src_sub_resource_idx, &data,
@@ -2298,7 +2302,7 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
@@ -2451,7 +2455,7 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
gl_info = context->gl_info;
/* Make sure the surface is up-to-date. This should probably use
@ -105,7 +105,7 @@ index 3435d17..68bf333 100644
* unless we're overwriting it completely. */
wined3d_texture_load(src_texture, context, FALSE);
@@ -2796,7 +2800,8 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
@@ -2949,7 +2953,8 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
}
if (sub_resource->locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED))
@ -115,7 +115,7 @@ index 3435d17..68bf333 100644
/* Download the surface to system memory. */
if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
@@ -2834,7 +2839,8 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
@@ -2987,7 +2992,8 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
}
surface_get_rect(surface, NULL, &r);
@ -125,27 +125,27 @@ index 3435d17..68bf333 100644
surface_blt_to_drawable(texture->resource.device, context,
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
@@ -2912,7 +2918,8 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -3064,7 +3070,8 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
== WINED3D_LOCATION_TEXTURE_RGB)
{
/* Performance warning... */
FIXME("Downloading RGB surface %p to reload it as sRGB.\n", surface);
FIXME_(d3d_perf)("Downloading RGB surface %p to reload it as sRGB.\n", surface);
- surface_load_location(surface, context, texture->resource.map_binding);
+ wined3d_texture_load_location(texture, surface_get_sub_resource_idx(surface),
+ context, texture->resource.map_binding);
}
}
else
@@ -2922,7 +2929,8 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -3073,7 +3080,8 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
== WINED3D_LOCATION_TEXTURE_SRGB)
{
/* Performance warning... */
FIXME("Downloading sRGB surface %p to reload it as RGB.\n", surface);
FIXME_(d3d_perf)("Downloading sRGB surface %p to reload it as RGB.\n", surface);
- surface_load_location(surface, context, texture->resource.map_binding);
+ wined3d_texture_load_location(texture, surface_get_sub_resource_idx(surface),
+ context, texture->resource.map_binding);
}
}
@@ -2930,7 +2938,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -3081,7 +3089,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
{
WARN("Trying to load a texture from sysmem, but no simple location is valid.\n");
/* Lets hope we get it from somewhere... */
@ -154,7 +154,7 @@ index 3435d17..68bf333 100644
}
wined3d_texture_prepare_texture(texture, context, srgb);
@@ -2948,7 +2956,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -3099,7 +3107,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
{
TRACE("Removing the pbo attached to surface %p.\n", surface);
@ -163,7 +163,7 @@ index 3435d17..68bf333 100644
wined3d_texture_set_map_binding(texture, WINED3D_LOCATION_SYSMEM);
}
@@ -3077,7 +3085,8 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -3228,7 +3236,8 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
{
ERR("Surface %p does not have any up to date location.\n", surface);
wined3d_texture_validate_location(texture, sub_resource_idx, WINED3D_LOCATION_DISCARDED);
@ -173,7 +173,7 @@ index 3435d17..68bf333 100644
}
if (texture->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
@@ -4231,7 +4240,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4383,7 +4392,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
if (!wined3d_resource_is_offscreen(&dst_texture->resource))
{
struct wined3d_context *context = context_acquire(device, dst_surface);
@ -184,10 +184,10 @@ index 3435d17..68bf333 100644
}
return WINED3D_OK;
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index b9c6055..a02fdf0 100644
index 853d447..08b8fc2 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -453,7 +453,7 @@ static void wined3d_swapchain_rotate(struct wined3d_swapchain *swapchain, struct
@@ -457,7 +457,7 @@ static void wined3d_swapchain_rotate(struct wined3d_swapchain *swapchain, struct
sub_resource = &texture->sub_resources[0];
if (!(sub_resource->locations & supported_locations))
@ -196,7 +196,7 @@ index b9c6055..a02fdf0 100644
texture_prev->texture_rgb = texture->texture_rgb;
texture_prev->rb_multisample = texture->rb_multisample;
@@ -630,12 +630,12 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain,
@@ -637,12 +637,12 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain,
static void swapchain_gl_frontbuffer_updated(struct wined3d_swapchain *swapchain)
{
@ -213,7 +213,7 @@ index b9c6055..a02fdf0 100644
SetRectEmpty(&swapchain->front_buffer_update);
}
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 30a4581..9780cc5 100644
index 2024bbf..e22e306 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -2575,7 +2575,7 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i

View File

@ -1,16 +1,16 @@
From 98405ace64c67ae668c5cfd2ea7fdb2e05e0a5cb Mon Sep 17 00:00:00 2001
From 1be883772a9bdd7a69891a8accacd2c03cf0c062 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 9 Apr 2013 21:50:30 +0200
Subject: wined3d: Send bool constant updates through the command stream
---
dlls/wined3d/cs.c | 74 +++++++++++++++++++++++++++++++++++++++---
dlls/wined3d/cs.c | 72 +++++++++++++++++++++++++++++++++++++++---
dlls/wined3d/device.c | 8 +++--
dlls/wined3d/wined3d_private.h | 3 ++
3 files changed, 78 insertions(+), 7 deletions(-)
3 files changed, 76 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index a409d48..f1fc4b9 100644
index a409d48..675e81e 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -65,7 +65,9 @@ enum wined3d_cs_op
@ -23,21 +23,22 @@ index a409d48..f1fc4b9 100644
WINED3D_CS_OP_GLFINISH,
WINED3D_CS_OP_SET_BASE_VERTEX_INDEX,
WINED3D_CS_OP_SET_PRIMITIVE_TYPE,
@@ -292,6 +294,13 @@ struct wined3d_cs_set_consts_f
@@ -292,6 +294,14 @@ struct wined3d_cs_set_consts_f
struct wined3d_vec4 constants;
};
+struct wined3d_cs_set_consts_b
+{
+ enum wined3d_cs_op opcode;
+ UINT start_register, bool_count;
+ unsigned int start_idx;
+ unsigned int count;
+ BOOL constants[1];
+};
+
struct wined3d_cs_finish
{
enum wined3d_cs_op opcode;
@@ -960,10 +969,8 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
@@ -960,10 +970,8 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
* ops for setting states */
@ -48,7 +49,7 @@ index a409d48..f1fc4b9 100644
memcpy(cs->state.ps_consts_i, op->state.ps_consts_i, sizeof(cs->state.ps_consts_i));
memcpy(cs->state.lights, op->state.lights, sizeof(cs->state.lights));
@@ -980,10 +987,8 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
@@ -980,10 +988,8 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
* ops for setting states */
@ -59,7 +60,7 @@ index a409d48..f1fc4b9 100644
memcpy(op->state.ps_consts_i, state->ps_consts_i, sizeof(op->state.ps_consts_i));
/* FIXME: This is not ideal. CS is still running synchronously, so this is ok.
@@ -1145,6 +1150,65 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
@@ -1145,6 +1151,62 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
op->value = value;
cs->ops->submit(cs);
@ -70,12 +71,11 @@ index a409d48..f1fc4b9 100644
+ const struct wined3d_cs_set_consts_b *op = data;
+ struct wined3d_device *device = cs->device;
+
+ memcpy(&cs->state.vs_consts_b[op->start_register], op->constants,
+ sizeof(*cs->state.vs_consts_b) * op->bool_count);
+ memcpy(&cs->state.vs_consts_b[op->start_idx], op->constants, sizeof(op->constants[0]) * op->count);
+
+ device_invalidate_shader_constants(device, WINED3D_SHADER_CONST_VS_B);
+
+ return sizeof(*op) + sizeof(op->constants) * (op->bool_count - 1);
+ return sizeof(*op) + sizeof(op->constants[0]) * (op->count - 1);
+}
+
+static UINT wined3d_cs_exec_set_ps_consts_b(struct wined3d_cs *cs, const void *data)
@ -83,21 +83,19 @@ index a409d48..f1fc4b9 100644
+ const struct wined3d_cs_set_consts_b *op = data;
+ struct wined3d_device *device = cs->device;
+
+ memcpy(&cs->state.ps_consts_b[op->start_register], op->constants,
+ sizeof(*cs->state.ps_consts_b) * op->bool_count);
+ memcpy(&cs->state.ps_consts_b[op->start_idx], op->constants, sizeof(op->constants[0]) * op->count);
+
+ device_invalidate_shader_constants(device, WINED3D_SHADER_CONST_PS_B);
+
+ return sizeof(*op) + sizeof(op->constants) * (op->bool_count - 1);
+ return sizeof(*op) + sizeof(op->constants[0]) * (op->count - 1);
+}
+
+void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register,
+ const BOOL *constants, UINT bool_count, enum wined3d_shader_type type)
+void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
+ unsigned int count, const BOOL *constants, enum wined3d_shader_type type)
+{
+ struct wined3d_cs_set_consts_b *op;
+ UINT extra_space = bool_count - 1;
+
+ op = cs->ops->require_space(cs, sizeof(*op) + sizeof(op->constants) * extra_space);
+ op = cs->ops->require_space(cs, sizeof(*op) + sizeof(op->constants[0]) * (count - 1));
+ switch (type)
+ {
+ case WINED3D_SHADER_TYPE_PIXEL:
@ -117,15 +115,15 @@ index a409d48..f1fc4b9 100644
+ case WINED3D_SHADER_TYPE_COUNT:
+ break;
+ }
+ op->start_register = start_register;
+ op->bool_count = bool_count;
+ memcpy(op->constants, constants, sizeof(op->constants) * bool_count);
+ op->start_idx = start_idx;
+ op->count = count;
+ memcpy(op->constants, constants, sizeof(op->constants[0]) * count);
+
+ cs->ops->submit(cs);
}
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
@@ -1473,7 +1537,9 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1473,7 +1535,9 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state,
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
@ -136,10 +134,10 @@ index a409d48..f1fc4b9 100644
/* WINED3D_CS_OP_SET_BASE_VERTEX_INDEX */ wined3d_cs_exec_set_base_vertex_index,
/* WINED3D_CS_OP_SET_PRIMITIVE_TYPE */ wined3d_cs_exec_set_primitive_type,
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 588efa5..70cc2af 100644
index 1dde384..3c9c737 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2330,7 +2330,7 @@ struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3
@@ -2353,7 +2353,7 @@ struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3
return device->state.sampler[WINED3D_SHADER_TYPE_VERTEX][idx];
}
@ -148,31 +146,31 @@ index 588efa5..70cc2af 100644
{
UINT i;
@@ -2363,7 +2363,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
@@ -2390,7 +2390,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
}
else
{
- device_invalidate_shader_constants(device, WINED3D_SHADER_CONST_VS_B);
+ wined3d_cs_emit_set_consts_b(device->cs, start_register, constants,
+ bool_count, WINED3D_SHADER_TYPE_VERTEX);
+ wined3d_cs_emit_set_consts_b(device->cs, start_idx, count,
+ constants, WINED3D_SHADER_TYPE_VERTEX);
}
return WINED3D_OK;
@@ -2591,7 +2592,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
@@ -2624,7 +2625,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
}
else
{
- device_invalidate_shader_constants(device, WINED3D_SHADER_CONST_PS_B);
+ wined3d_cs_emit_set_consts_b(device->cs, start_register, constants,
+ bool_count, WINED3D_SHADER_TYPE_PIXEL);
+ wined3d_cs_emit_set_consts_b(device->cs, start_idx, count,
+ constants, WINED3D_SHADER_TYPE_PIXEL);
}
return WINED3D_OK;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a7757ac..263925f 100644
index d490198..69a7dac 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2366,6 +2366,7 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
@@ -2369,6 +2369,7 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
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;
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
@ -184,8 +182,8 @@ index a7757ac..263925f 100644
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, const struct wined3d_vec4 *constants,
UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register,
+ const BOOL *constants, UINT bool_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
+ unsigned int count, const BOOL *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
UINT base_vertex_index) DECLSPEC_HIDDEN;

View File

@ -1,4 +1,4 @@
From f62f9c0774759bd920543c3603d6b65ba77347a4 Mon Sep 17 00:00:00 2001
From 609309679395d581e84f6e12a796f1e0e83947bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 10 Apr 2013 14:20:47 +0200
Subject: wined3d: Send int constant updates through the command stream
@ -10,7 +10,7 @@ Subject: wined3d: Send int constant updates through the command stream
3 files changed, 74 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index f1fc4b9..e8d7b9a 100644
index 675e81e..b4b6bb9 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -66,8 +66,10 @@ enum wined3d_cs_op
@ -24,7 +24,7 @@ index f1fc4b9..e8d7b9a 100644
WINED3D_CS_OP_GLFINISH,
WINED3D_CS_OP_SET_BASE_VERTEX_INDEX,
WINED3D_CS_OP_SET_PRIMITIVE_TYPE,
@@ -301,6 +303,14 @@ struct wined3d_cs_set_consts_b
@@ -302,6 +304,14 @@ struct wined3d_cs_set_consts_b
BOOL constants[1];
};
@ -39,7 +39,7 @@ index f1fc4b9..e8d7b9a 100644
struct wined3d_cs_finish
{
enum wined3d_cs_op opcode;
@@ -969,9 +979,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
@@ -970,9 +980,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
* ops for setting states */
@ -49,7 +49,7 @@ index f1fc4b9..e8d7b9a 100644
memcpy(cs->state.lights, op->state.lights, sizeof(cs->state.lights));
@@ -987,9 +994,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
@@ -988,9 +995,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
* ops for setting states */
@ -59,7 +59,7 @@ index f1fc4b9..e8d7b9a 100644
/* FIXME: This is not ideal. CS is still running synchronously, so this is ok.
* It will go away soon anyway. */
@@ -1211,6 +1215,62 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register,
@@ -1209,6 +1213,62 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
cs->ops->submit(cs);
}
@ -122,7 +122,7 @@ index f1fc4b9..e8d7b9a 100644
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_set_texture_state *op = data;
@@ -1538,8 +1598,10 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1536,8 +1596,10 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
/* WINED3D_CS_OP_SET_VS_CONSTS_B */ wined3d_cs_exec_set_vs_consts_b,
@ -134,10 +134,10 @@ index f1fc4b9..e8d7b9a 100644
/* WINED3D_CS_OP_SET_BASE_VERTEX_INDEX */ wined3d_cs_exec_set_base_vertex_index,
/* WINED3D_CS_OP_SET_PRIMITIVE_TYPE */ wined3d_cs_exec_set_primitive_type,
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index f961e3d..b1a3b02 100644
index 3c9c737..0b07ad5 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2436,7 +2436,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
@@ -2440,7 +2440,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
}
else
{
@ -147,7 +147,7 @@ index f961e3d..b1a3b02 100644
}
return WINED3D_OK;
@@ -2667,7 +2668,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
@@ -2675,7 +2676,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
}
else
{
@ -158,13 +158,13 @@ index f961e3d..b1a3b02 100644
return WINED3D_OK;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 684a4c3..b14db6d 100644
index 69a7dac..81d4226 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2952,6 +2952,8 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, co
UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register,
const BOOL *constants, UINT bool_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
unsigned int count, const BOOL *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
+ unsigned int count, const struct wined3d_ivec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;

View File

@ -1,4 +1,4 @@
From 9371749a7b3da74f0f0899fecc86f02bbf132ca7 Mon Sep 17 00:00:00 2001
From 4537d2dac1f5396dd8455ff63ae2aa8747c247f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 4 Jul 2013 23:33:14 +0200
Subject: wined3d: Replace the linked lists with a ringbuffer
@ -9,7 +9,7 @@ Subject: wined3d: Replace the linked lists with a ringbuffer
2 files changed, 161 insertions(+), 222 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 070b937..bbabc3b 100644
index 7e504ab..42cee7c 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -22,20 +22,10 @@
@ -35,7 +35,7 @@ index 070b937..bbabc3b 100644
WINED3D_CS_OP_FENCE,
WINED3D_CS_OP_PRESENT,
WINED3D_CS_OP_CLEAR,
@@ -380,99 +370,30 @@ struct wined3d_cs_texture_unmap
@@ -381,99 +371,30 @@ struct wined3d_cs_texture_unmap
unsigned int sub_resource_idx;
};
@ -149,7 +149,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_fence(struct wined3d_cs *cs, const void *data)
@@ -493,14 +414,14 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
@@ -494,14 +415,14 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
op = cs->ops->require_space(cs, sizeof(*op));
op->opcode = WINED3D_CS_OP_FENCE;
op->signalled = signalled;
@ -166,7 +166,7 @@ index 070b937..bbabc3b 100644
/* A busy wait should be fine, we're not supposed to have to wait very
* long. */
@@ -539,7 +460,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
@@ -540,7 +461,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
pending = InterlockedIncrement(&cs->pending_presents);
@ -175,7 +175,7 @@ index 070b937..bbabc3b 100644
while (pending > 1)
pending = InterlockedCompareExchange(&cs->pending_presents, 0, 0);
@@ -565,8 +486,8 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
@@ -566,8 +487,8 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
{
struct wined3d_cs_clear *op;
@ -186,7 +186,7 @@ index 070b937..bbabc3b 100644
op->opcode = WINED3D_CS_OP_CLEAR;
op->flags = flags;
op->color = *color;
@@ -575,7 +496,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
@@ -576,7 +497,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);
@ -195,7 +195,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
@@ -616,7 +537,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, UINT start_idx, UINT index_coun
@@ -617,7 +538,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, UINT start_idx, UINT index_coun
op->instance_count = instance_count;
op->indexed = indexed;
@ -204,7 +204,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_predication(struct wined3d_cs *cs, const void *data)
@@ -638,7 +559,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
@@ -639,7 +560,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
op->predicate = predicate;
op->value = value;
@ -213,7 +213,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_viewport(struct wined3d_cs *cs, const void *data)
@@ -659,7 +580,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
@@ -660,7 +581,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;
@ -222,7 +222,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_scissor_rect(struct wined3d_cs *cs, const void *data)
@@ -680,7 +601,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
@@ -681,7 +602,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;
@ -231,7 +231,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const void *data)
@@ -703,7 +624,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
@@ -704,7 +625,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
op->view_idx = view_idx;
op->view = view;
@ -240,7 +240,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const void *data)
@@ -757,7 +678,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
@@ -758,7 +679,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;
@ -249,7 +249,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_vertex_declaration(struct wined3d_cs *cs, const void *data)
@@ -778,7 +699,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
@@ -779,7 +700,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
op->declaration = declaration;
@ -258,7 +258,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void *data)
@@ -815,7 +736,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
@@ -816,7 +737,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
op->offset = offset;
op->stride = stride;
@ -267,7 +267,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const void *data)
@@ -842,7 +763,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
@@ -843,7 +764,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
op->frequency = frequency;
op->flags = flags;
@ -276,7 +276,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void *data)
@@ -875,7 +796,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
@@ -876,7 +797,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
op->buffer = buffer;
op->offset = offset;
@ -285,7 +285,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *data)
@@ -907,7 +828,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
@@ -908,7 +829,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
op->buffer = buffer;
op->format_id = format_id;
@ -294,7 +294,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const void *data)
@@ -938,7 +859,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
@@ -939,7 +860,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
op->cb_idx = cb_idx;
op->buffer = buffer;
@ -303,7 +303,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
@@ -1030,7 +951,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
@@ -1031,7 +952,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;
@ -312,7 +312,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, const void *data)
@@ -1054,7 +975,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
@@ -1055,7 +976,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
op->view_idx = view_idx;
op->view = view;
@ -321,7 +321,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
@@ -1078,7 +999,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1079,7 +1000,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
op->sampler_idx = sampler_idx;
op->sampler = sampler;
@ -330,7 +330,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
@@ -1101,7 +1022,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1102,7 +1023,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
op->type = type;
op->shader = shader;
@ -339,7 +339,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_vs_consts_f(struct wined3d_cs *cs, const void *data)
@@ -1137,8 +1058,9 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register,
@@ -1138,8 +1059,9 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register,
{
struct wined3d_cs_set_consts_f *op;
UINT extra_space = vector4f_count - 1;
@ -350,7 +350,7 @@ index 070b937..bbabc3b 100644
switch (type)
{
case WINED3D_SHADER_TYPE_PIXEL:
@@ -1162,7 +1084,7 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register,
@@ -1163,7 +1085,7 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register,
op->vector4f_count = vector4f_count;
memcpy(&op->constants, constants, sizeof(*constants) * vector4f_count);
@ -359,7 +359,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *data)
@@ -1184,8 +1106,8 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
@@ -1185,8 +1107,8 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
op->state = state;
op->value = value;
@ -370,27 +370,27 @@ index 070b937..bbabc3b 100644
static UINT wined3d_cs_exec_set_vs_consts_b(struct wined3d_cs *cs, const void *data)
{
@@ -1218,8 +1140,9 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register,
@@ -1216,8 +1138,9 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
unsigned int count, const BOOL *constants, enum wined3d_shader_type type)
{
struct wined3d_cs_set_consts_b *op;
UINT extra_space = bool_count - 1;
+ size_t size = sizeof(*op) + sizeof(op->constants) * extra_space;
+ size_t size = sizeof(*op) + sizeof(op->constants[0]) * (count - 1);
- op = cs->ops->require_space(cs, sizeof(*op) + sizeof(op->constants) * extra_space);
- op = cs->ops->require_space(cs, sizeof(*op) + sizeof(op->constants[0]) * (count - 1));
+ op = cs->ops->require_space(cs, size);
switch (type)
{
case WINED3D_SHADER_TYPE_PIXEL:
@@ -1243,7 +1166,7 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register,
op->bool_count = bool_count;
memcpy(op->constants, constants, sizeof(op->constants) * bool_count);
@@ -1241,7 +1164,7 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
op->count = count;
memcpy(op->constants, constants, sizeof(op->constants[0]) * count);
- cs->ops->submit(cs);
+ cs->ops->submit(cs, size);
}
static UINT wined3d_cs_exec_set_vs_consts_i(struct wined3d_cs *cs, const void *data)
@@ -1274,8 +1197,9 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
@@ -1272,8 +1195,9 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
const struct wined3d_ivec4 *constants, enum wined3d_shader_type type)
{
struct wined3d_cs_set_consts_i *op;
@ -401,7 +401,7 @@ index 070b937..bbabc3b 100644
switch (type)
{
case WINED3D_SHADER_TYPE_PIXEL:
@@ -1299,7 +1223,7 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
@@ -1297,7 +1221,7 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
op->count = count;
memcpy(op->constants, constants, sizeof(op->constants[0]) * count);
@ -410,7 +410,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
@@ -1323,7 +1247,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -1321,7 +1245,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
op->state = state;
op->value = value;
@ -419,7 +419,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_sampler_state(struct wined3d_cs *cs, const void *data)
@@ -1347,7 +1271,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -1345,7 +1269,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
op->state = state;
op->value = value;
@ -428,7 +428,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *data)
@@ -1371,7 +1295,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
@@ -1369,7 +1293,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
op->state = state;
op->matrix = *matrix;
@ -437,7 +437,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_clip_plane(struct wined3d_cs *cs, const void *data)
@@ -1393,7 +1317,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
@@ -1391,7 +1315,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
op->plane_idx = plane_idx;
op->plane = *plane;
@ -446,7 +446,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *data)
@@ -1478,7 +1402,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
@@ -1476,7 +1400,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
else
op->set = 0;
@ -455,7 +455,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_material(struct wined3d_cs *cs, const void *data)
@@ -1499,7 +1423,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
@@ -1497,7 +1421,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;
@ -464,7 +464,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
@@ -1523,7 +1447,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1521,7 +1445,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;
@ -473,7 +473,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_glfinish(struct wined3d_cs *cs, const void *data)
@@ -1549,7 +1473,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
@@ -1547,7 +1471,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
op = cs->ops->require_space(cs, sizeof(*op));
op->opcode = WINED3D_CS_OP_GLFINISH;
@ -482,7 +482,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_base_vertex_index(struct wined3d_cs *cs, const void *data)
@@ -1571,7 +1495,7 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
@@ -1569,7 +1493,7 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
op->opcode = WINED3D_CS_OP_SET_BASE_VERTEX_INDEX;
op->base_vertex_index = base_vertex_index;
@ -491,7 +491,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_primitive_type(struct wined3d_cs *cs, const void *data)
@@ -1597,7 +1521,7 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
@@ -1595,7 +1519,7 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
op->opcode = WINED3D_CS_OP_SET_PRIMITIVE_TYPE;
op->gl_primitive_type = primitive_type;
@ -500,7 +500,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
@@ -1654,7 +1578,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
@@ -1652,7 +1576,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
op->opcode = WINED3D_CS_OP_SET_LIGHT;
op->light = *light;
@ -509,7 +509,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *data)
@@ -1743,7 +1667,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
@@ -1741,7 +1665,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
op->idx = idx;
op->enable = enable;
@ -518,7 +518,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_blt(struct wined3d_cs *cs, const void *data)
@@ -1775,7 +1699,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
@@ -1773,7 +1697,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
if (fx)
op->fx = *fx;
@ -527,7 +527,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
@@ -1808,7 +1732,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
@@ -1806,7 +1730,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
op->stencil = stencil;
op->blitter = blitter;
@ -536,7 +536,7 @@ index 070b937..bbabc3b 100644
}
static UINT wined3d_cs_exec_texture_map(struct wined3d_cs *cs, const void *data)
@@ -1833,12 +1757,14 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
@@ -1831,12 +1755,14 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
op->flags = flags;
op->mem = &ret;
@ -552,7 +552,7 @@ index 070b937..bbabc3b 100644
return ret;
}
@@ -1861,11 +1787,13 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
@@ -1859,11 +1785,13 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
op->texture = texture;
op->sub_resource_idx = sub_resource_idx;
@ -567,7 +567,7 @@ index 070b937..bbabc3b 100644
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
/* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present,
/* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear,
@@ -1910,42 +1838,59 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1908,42 +1836,59 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
};
@ -650,7 +650,7 @@ index 070b937..bbabc3b 100644
};
/* FIXME: wined3d_device_uninit_3d() should either flush and wait, or be an
@@ -1957,9 +1902,38 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
@@ -1955,9 +1900,38 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
op = wined3d_cs_mt_require_space(cs, sizeof(*op));
op->opcode = WINED3D_CS_OP_STOP;
@ -690,7 +690,7 @@ index 070b937..bbabc3b 100644
void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
struct wined3d_context *context, struct wined3d_surface *depth_stencil)
{
@@ -1983,31 +1957,32 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
@@ -1981,31 +1955,32 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
static DWORD WINAPI wined3d_cs_run(void *thread_param)
{
struct wined3d_cs *cs = thread_param;
@ -737,7 +737,7 @@ index 070b937..bbabc3b 100644
}
done:
@@ -2032,25 +2007,10 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -2030,25 +2005,10 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
cs->ops = &wined3d_cs_st_ops;
cs->device = device;
@ -763,7 +763,7 @@ index 070b937..bbabc3b 100644
if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, NULL)))
{
ERR("Failed to create wined3d command stream thread.\n");
@@ -2062,12 +2022,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -2060,12 +2020,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
err:
if (cs)
@ -776,7 +776,7 @@ index 070b937..bbabc3b 100644
HeapFree(GetProcessHeap(), 0, cs);
return NULL;
}
@@ -2086,17 +2041,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
@@ -2084,17 +2039,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
CloseHandle(cs->thread);
if (ret != WAIT_OBJECT_0)
ERR("Wait failed (%#x).\n", ret);
@ -795,7 +795,7 @@ index 070b937..bbabc3b 100644
HeapFree(GetProcessHeap(), 0, cs);
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 999c770..195ffb3 100644
index ae49f7a..cd8b3d1 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -31,6 +31,7 @@

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
From e5466e251a5dc694ef214d5c96bf59ebb767f6a4 Mon Sep 17 00:00:00 2001
From 39a3448740eddb5083e3508e51c3ec6922275c5b Mon Sep 17 00:00:00 2001
From: Jarkko Korpi <jarkko_korpi@hotmail.com>
Date: Sat, 1 Aug 2015 06:45:35 +0300
Subject: wininet: Silence wininet no support on this platform message.
@ -8,19 +8,19 @@ Subject: wininet: Silence wininet no support on this platform message.
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index ee04f40..c512a5c 100644
index bd380dc..0680c7d 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -2416,7 +2416,8 @@ static BOOL get_proxy_autoconfig_url( char *buf, DWORD buflen )
@@ -2311,7 +2311,8 @@ static WCHAR *get_proxy_autoconfig_url(void)
CFRelease( settings );
return ret;
#else
- FIXME( "no support on this platform\n" );
+ static int once;
+ if (!once++) FIXME( "no support on this platform\n" );
return FALSE;
return NULL;
#endif
}
--
2.5.0
2.8.0

View File

@ -1,4 +1,4 @@
From b2525450e258182b0cb426d392f1677cc7971ae4 Mon Sep 17 00:00:00 2001
From 05c7ce3559767347aa338c002002557ab30d9d5e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 15 May 2015 21:18:37 +0200
Subject: wininet/tests: Test auth credential reusage with host override.
@ -8,12 +8,12 @@ Subject: wininet/tests: Test auth credential reusage with host override.
1 file changed, 92 insertions(+)
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index 661dcc3..546e473 100644
index 90774b8..8fd69a4 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -2413,6 +2413,20 @@ static DWORD CALLBACK server_thread(LPVOID param)
SetEvent(server_req_rec_event);
WaitForSingleObject(conn_wait_event, INFINITE);
@@ -2433,6 +2433,20 @@ static DWORD CALLBACK server_thread(LPVOID param)
send(c, okmsg, sizeof(okmsg)-1, 0);
send(c, buffer, strlen(buffer), 0);
}
+ if (strstr(buffer, "HEAD /test_auth_host1"))
+ {
@ -32,7 +32,7 @@ index 661dcc3..546e473 100644
shutdown(c, 2);
closesocket(c);
c = -1;
@@ -3118,6 +3132,84 @@ static void test_header_override(int port)
@@ -3139,6 +3153,84 @@ static void test_header_override(int port)
InternetCloseHandle(req);
InternetCloseHandle(con);
InternetCloseHandle(ses);

View File

@ -1,4 +1,4 @@
From 842a91f83a472f364f6617f90a657603385fbc59 Mon Sep 17 00:00:00 2001
From 8ee0669fae69b5a23fe2d1d4b36055ca64f93f1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 25 Apr 2016 21:46:29 +0200
Subject: wininet: Handle INTERNET_INVALID_PORT_NUMBER in HttpOpenRequest.
@ -14,10 +14,10 @@ Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index ef0b36e..9d75b59 100644
index 21f6ff2..39f72c6 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -3331,7 +3331,7 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session,
@@ -3356,7 +3356,7 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session,
{
appinfo_t *hIC = session->appInfo;
http_request_t *request;
@ -26,11 +26,11 @@ index ef0b36e..9d75b59 100644
TRACE("-->\n");
@@ -3360,7 +3360,14 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session,
@@ -3385,7 +3385,14 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session,
request->session = session;
list_add_head( &session->hdr.children, &request->hdr.entry );
- request->server = get_server(session->hostName, session->hostPort, (dwFlags & INTERNET_FLAG_SECURE) != 0, TRUE);
- request->server = get_server(substrz(session->hostName), session->hostPort, (dwFlags & INTERNET_FLAG_SECURE) != 0, TRUE);
+ port = session->hostPort;
+ if (port == INTERNET_INVALID_PORT_NUMBER)
+ {
@ -38,15 +38,15 @@ index ef0b36e..9d75b59 100644
+ INTERNET_DEFAULT_HTTPS_PORT : INTERNET_DEFAULT_HTTP_PORT;
+ }
+
+ request->server = get_server(session->hostName, port, (dwFlags & INTERNET_FLAG_SECURE) != 0, TRUE);
+ request->server = get_server(substrz(session->hostName), port, (dwFlags & INTERNET_FLAG_SECURE) != 0, TRUE);
if(!request->server) {
WININET_Release(&request->hdr);
return ERROR_OUTOFMEMORY;
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index 66ba526..6aa0f4c 100644
index 29dd965..a76046d 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -5771,13 +5771,13 @@ static void test_default_service_port(void)
@@ -6079,13 +6079,13 @@ static void test_default_service_port(void)
ok(request != NULL, "HttpOpenRequest failed\n");
ret = HttpSendRequestA(request, NULL, 0, NULL, 0);
@ -62,7 +62,7 @@ index 66ba526..6aa0f4c 100644
InternetCloseHandle(request);
InternetCloseHandle(connect);
@@ -5796,7 +5796,7 @@ static void test_default_service_port(void)
@@ -6104,7 +6104,7 @@ static void test_default_service_port(void)
memset(buffer, 0, sizeof(buffer));
ret = HttpQueryInfoA(request, HTTP_QUERY_HOST | HTTP_QUERY_FLAG_REQUEST_HEADERS, buffer, &size, NULL);
ok(ret, "HttpQueryInfo failed with error %u\n", GetLastError());