From 72d96cb61f226ea88953772ebae9105d35c594da Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 17 Dec 2016 18:41:09 +0100 Subject: [PATCH] Rebase against 56040acaa3f584150b3ab7fc644cd1a81e34fece. --- ...d-implicit-cast-of-interface-pointer.patch | 15 +- patches/patchinstall.sh | 23 +-- ...ompute-buffer_type_hint-from-buffer-.patch | 10 +- ...e-the-initial-context-through-the-CS.patch | 24 +-- .../wined3d-CSMT_Main/9999-IfDefined.patch | 192 +++++++++--------- ...-wined3d_check_device_format_support.patch | 16 +- ...NTERNET_INVALID_PORT_NUMBER-in-HttpO.patch | 76 ------- patches/wininet-HttpOpenRequestW/definition | 1 - staging/VERSION | 2 +- 9 files changed, 131 insertions(+), 228 deletions(-) delete mode 100644 patches/wininet-HttpOpenRequestW/0001-wininet-Handle-INTERNET_INVALID_PORT_NUMBER-in-HttpO.patch delete mode 100644 patches/wininet-HttpOpenRequestW/definition diff --git a/patches/Compiler_Warnings/0026-dwrite-Avoid-implicit-cast-of-interface-pointer.patch b/patches/Compiler_Warnings/0026-dwrite-Avoid-implicit-cast-of-interface-pointer.patch index 3d6af32e..75a7347c 100644 --- a/patches/Compiler_Warnings/0026-dwrite-Avoid-implicit-cast-of-interface-pointer.patch +++ b/patches/Compiler_Warnings/0026-dwrite-Avoid-implicit-cast-of-interface-pointer.patch @@ -1,18 +1,18 @@ -From c695e014f25fd613ead12115a715cdb4303d632f Mon Sep 17 00:00:00 2001 +From 744549e1ecc76c3764079d337c09445d01a3527e Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Tue, 22 Mar 2016 21:58:40 +0100 Subject: dwrite: Avoid implicit cast of interface pointer. --- - dlls/dwrite/font.c | 6 +++--- + dlls/dwrite/font.c | 4 ++-- dlls/dwrite/layout.c | 2 +- - 2 files changed, 4 insertions(+), 4 deletions(-) + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c -index ba97025..0a90c20 100644 +index d9ddce0..0a90c20 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c -@@ -1684,15 +1684,15 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface) +@@ -1684,7 +1684,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface) if (!iface) return NULL; assert(iface->lpVtbl == (IDWriteFontVtbl*)&dwritefontvtbl); @@ -21,12 +21,11 @@ index ba97025..0a90c20 100644 } static struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface) - { +@@ -1692,7 +1692,7 @@ static struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace if (!iface) return NULL; -- assert(iface->lpVtbl = (IDWriteFontFaceVtbl*)&dwritefontfacevtbl); + assert(iface->lpVtbl == (IDWriteFontFaceVtbl*)&dwritefontfacevtbl); - return CONTAINING_RECORD(iface, struct dwrite_fontface, IDWriteFontFace4_iface); -+ assert(iface->lpVtbl == (IDWriteFontFaceVtbl*)&dwritefontfacevtbl); + return CONTAINING_RECORD((IDWriteFontFace4 *)iface, struct dwrite_fontface, IDWriteFontFace4_iface); } diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index cff5091d..6b21075d 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,13 +52,13 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "4c7f3f8af856888f5ab020b2a32d0b01db0c82f7" + echo "56040acaa3f584150b3ab7fc644cd1a81e34fece" } # Show version information version() { - echo "Wine Staging 2.0-rc1" + echo "Wine Staging 2.0-rc2 (unreleased)" echo "Copyright (C) 2014-2016 the Wine Staging project authors." echo "" echo "Patchset to be applied on upstream Wine:" @@ -390,7 +390,6 @@ patch_enable_all () enable_winex11_wglShareLists="$1" enable_winhttp_System_Proxy_Autoconfig="$1" enable_wininet_Cleanup="$1" - enable_wininet_HttpOpenRequestW="$1" enable_wininet_InternetCrackUrlW="$1" enable_wininet_Internet_Settings="$1" enable_wininet_ParseX509EncodedCertificateForListBoxEntry="$1" @@ -1350,9 +1349,6 @@ patch_enable () wininet-Cleanup) enable_wininet_Cleanup="$2" ;; - wininet-HttpOpenRequestW) - enable_wininet_HttpOpenRequestW="$2" - ;; wininet-InternetCrackUrlW) enable_wininet_InternetCrackUrlW="$2" ;; @@ -8024,21 +8020,6 @@ if test "$enable_wininet_Cleanup" -eq 1; then ) >> "$patchlist" fi -# Patchset wininet-HttpOpenRequestW -# | -# | This patchset fixes the following Wine bugs: -# | * [#40169] Fix handling of INTERNET_INVALID_PORT_NUMBER in HttpOpenRequestW -# | -# | Modified files: -# | * dlls/wininet/http.c, dlls/wininet/tests/http.c -# | -if test "$enable_wininet_HttpOpenRequestW" -eq 1; then - patch_apply wininet-HttpOpenRequestW/0001-wininet-Handle-INTERNET_INVALID_PORT_NUMBER-in-HttpO.patch - ( - echo '+ { "Michael Müller", "wininet: Handle INTERNET_INVALID_PORT_NUMBER in HttpOpenRequest.", 1 },'; - ) >> "$patchlist" -fi - # Patchset wininet-InternetCrackUrlW # | # | This patchset fixes the following Wine bugs: diff --git a/patches/wined3d-CSMT_Main/0012-Revert-wined3d-Compute-buffer_type_hint-from-buffer-.patch b/patches/wined3d-CSMT_Main/0012-Revert-wined3d-Compute-buffer_type_hint-from-buffer-.patch index c65126c0..1d033285 100644 --- a/patches/wined3d-CSMT_Main/0012-Revert-wined3d-Compute-buffer_type_hint-from-buffer-.patch +++ b/patches/wined3d-CSMT_Main/0012-Revert-wined3d-Compute-buffer_type_hint-from-buffer-.patch @@ -1,4 +1,4 @@ -From 280cb6e8d37df26215688bfe2ec13ad76faff8d4 Mon Sep 17 00:00:00 2001 +From 351c41e11b0cf2a664c626626bd8143733598cae Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Tue, 15 Nov 2016 22:13:29 +0100 Subject: Revert "wined3d: Compute "buffer_type_hint" from buffer bind flags." @@ -10,7 +10,7 @@ This reverts commit e3c692151f9199d7e37b2c788daa629d0c2c1b3b. 2 files changed, 8 insertions(+), 32 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c -index a30e467..5cecce5 100644 +index 0cd08f9..93ff479 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -1410,28 +1410,14 @@ static const struct wined3d_resource_ops buffer_resource_ops = @@ -37,7 +37,7 @@ index a30e467..5cecce5 100644 const struct wined3d_sub_resource_data *data, void *parent, const struct wined3d_parent_ops *parent_ops) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - const struct wined3d_format *format = wined3d_get_format(gl_info, format_id); + const struct wined3d_format *format = wined3d_get_format(gl_info, format_id, usage); - BOOL dynamic_buffer_ok; HRESULT hr; + BOOL dynamic_buffer_ok; @@ -88,10 +88,10 @@ index a30e467..5cecce5 100644 if (FAILED(hr)) { diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h -index c7ecef1..8cbb76c 100644 +index 8c8fbcb..e249e95 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h -@@ -833,15 +833,6 @@ enum wined3d_display_rotation +@@ -840,15 +840,6 @@ enum wined3d_display_rotation #define WINED3DDP_MAXTEXCOORD 8 diff --git a/patches/wined3d-CSMT_Main/0121-wined3d-Create-the-initial-context-through-the-CS.patch b/patches/wined3d-CSMT_Main/0121-wined3d-Create-the-initial-context-through-the-CS.patch index 66ecb90a..312d2fa6 100644 --- a/patches/wined3d-CSMT_Main/0121-wined3d-Create-the-initial-context-through-the-CS.patch +++ b/patches/wined3d-CSMT_Main/0121-wined3d-Create-the-initial-context-through-the-CS.patch @@ -1,4 +1,4 @@ -From 9015c6fda2f38e2552ee7056b7f97ad994d75310 Mon Sep 17 00:00:00 2001 +From 5559a51191a5cae71dd6e1b1378a17b1faf539ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Thu, 10 Oct 2013 16:43:19 +0200 Subject: wined3d: Create the initial context through the CS. @@ -11,10 +11,10 @@ Very hacky. 3 files changed, 103 insertions(+), 54 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c -index cf11c3c..230c04d 100644 +index 342cfc4..22c1031 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c -@@ -84,6 +84,7 @@ enum wined3d_cs_op +@@ -83,6 +83,7 @@ enum wined3d_cs_op WINED3D_CS_OP_GET_DC, WINED3D_CS_OP_RELEASE_DC, WINED3D_CS_OP_CREATE_DUMMY_TEXTURES, @@ -22,7 +22,7 @@ index cf11c3c..230c04d 100644 WINED3D_CS_OP_STOP, }; -@@ -496,6 +497,13 @@ struct wined3d_cs_create_dummy_textures +@@ -490,6 +491,13 @@ struct wined3d_cs_create_dummy_textures enum wined3d_cs_op opcode; }; @@ -36,7 +36,7 @@ index cf11c3c..230c04d 100644 static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size) { LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1); -@@ -2587,6 +2595,31 @@ void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs) +@@ -2557,6 +2565,31 @@ void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs) cs->ops->finish(cs); } @@ -68,7 +68,7 @@ index cf11c3c..230c04d 100644 static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) = { /* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop, -@@ -2649,6 +2682,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void +@@ -2618,6 +2651,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void /* WINED3D_CS_OP_GET_DC */ wined3d_cs_exec_get_dc, /* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc, /* WINED3D_CS_OP_CREATE_DUMMY_TEXTURES */ wined3d_cs_exec_create_dummy_textures, @@ -77,7 +77,7 @@ index cf11c3c..230c04d 100644 static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio) diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c -index 256f9db..eac171b 100644 +index 9d0cabd..0efaa88 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -817,6 +817,69 @@ static void wined3d_swapchain_apply_sample_count_override(const struct wined3d_s @@ -120,7 +120,7 @@ index 256f9db..eac171b 100644 + * issue needs to be fixed. */ + for (i = 0; i < (sizeof(formats) / sizeof(*formats)); i++) + { -+ swapchain->ds_format = wined3d_get_format(gl_info, formats[i]); ++ swapchain->ds_format = wined3d_get_format(gl_info, formats[i], WINED3DUSAGE_DEPTHSTENCIL); + swapchain->context[0] = context_create(swapchain, swapchain->front_buffer, swapchain->ds_format); + if (swapchain->context[0]) break; + TRACE("Depth stencil format %s is not supported, trying next format\n", @@ -189,7 +189,7 @@ index 256f9db..eac171b 100644 - * issue needs to be fixed. */ - for (i = 0; i < (sizeof(formats) / sizeof(*formats)); i++) - { -- swapchain->ds_format = wined3d_get_format(gl_info, formats[i]); +- swapchain->ds_format = wined3d_get_format(gl_info, formats[i], WINED3DUSAGE_DEPTHSTENCIL); - swapchain->context[0] = context_create(swapchain, swapchain->front_buffer, swapchain->ds_format); - if (swapchain->context[0]) break; - TRACE("Depth stencil format %s is not supported, trying next format\n", @@ -215,10 +215,10 @@ index 256f9db..eac171b 100644 if (swapchain->desc.backbuffer_count > 0) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index a635118..f18858b 100644 +index 175b5a0..875c59d 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -3126,6 +3126,8 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge +@@ -3222,6 +3222,8 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil, const struct blit_shader *blitter) DECLSPEC_HIDDEN; void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs) DECLSPEC_HIDDEN; @@ -227,7 +227,7 @@ index a635118..f18858b 100644 void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN; void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void *object), void *object) DECLSPEC_HIDDEN; -@@ -3367,6 +3369,8 @@ struct wined3d_swapchain +@@ -3476,6 +3478,8 @@ struct wined3d_swapchain void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activate) DECLSPEC_HIDDEN; struct wined3d_context *swapchain_get_context(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; diff --git a/patches/wined3d-CSMT_Main/9999-IfDefined.patch b/patches/wined3d-CSMT_Main/9999-IfDefined.patch index 867322e8..44bd2734 100644 --- a/patches/wined3d-CSMT_Main/9999-IfDefined.patch +++ b/patches/wined3d-CSMT_Main/9999-IfDefined.patch @@ -66,7 +66,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); } -@@ -8008,8 +8032,16 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_ +@@ -8010,8 +8034,16 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_ /* Leave the opengl state valid for blitting */ arbfp_blit_unset(context->gl_info); @@ -1037,7 +1037,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c const struct wined3d_sub_resource_data *data, void *parent, const struct wined3d_parent_ops *parent_ops) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - const struct wined3d_format *format = wined3d_get_format(gl_info, format_id); + const struct wined3d_format *format = wined3d_get_format(gl_info, format_id, usage); +#if !defined(STAGING_CSMT) BOOL dynamic_buffer_ok; HRESULT hr; @@ -1134,7 +1134,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c -@@ -1706,6 +1706,13 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, +@@ -1707,6 +1707,13 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, goto out; } @@ -1148,7 +1148,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c /* Initialize the texture unit mapping to a 1:1 mapping */ for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s) { -@@ -2026,6 +2033,9 @@ out: +@@ -2028,6 +2035,9 @@ out: if (hdc) wined3d_release_dc(swapchain->win_handle, hdc); device->shader_backend->shader_free_context_data(ret); device->adapter->fragment_pipe->free_context_data(ret); @@ -1158,7 +1158,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c HeapFree(GetProcessHeap(), 0, ret->free_event_queries); HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries); HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries); -@@ -2073,6 +2083,9 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont +@@ -2075,6 +2085,9 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont device->shader_backend->shader_free_context_data(context); device->adapter->fragment_pipe->free_context_data(context); HeapFree(GetProcessHeap(), 0, context->fbo_key); @@ -1168,7 +1168,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c HeapFree(GetProcessHeap(), 0, context->draw_buffers); HeapFree(GetProcessHeap(), 0, context->blit_targets); device_context_remove(device, context); -@@ -2618,7 +2631,11 @@ static BOOL context_validate_rt_config(UINT rt_count, struct wined3d_rendertarge +@@ -2620,7 +2633,11 @@ static BOOL context_validate_rt_config(UINT rt_count, struct wined3d_rendertarge } /* Context activation is done by the caller. */ @@ -1180,7 +1180,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c UINT rt_count, const struct wined3d_fb_state *fb) { struct wined3d_rendertarget_view **rts = fb->render_targets; -@@ -2627,7 +2644,11 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2629,7 +2646,11 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win DWORD rt_mask = 0, *cur_mask; UINT i; @@ -1192,7 +1192,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c || rt_count != gl_info->limits.buffers) { if (!context_validate_rt_config(rt_count, rts, dsv)) -@@ -2672,6 +2693,10 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2674,6 +2695,10 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win rt_mask = context_generate_rt_mask_no_fbo(context, rt_count ? wined3d_rendertarget_view_get_surface(rts[0])->container : NULL); } @@ -1203,7 +1203,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c } else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO && (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource))) -@@ -2712,7 +2737,12 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2714,7 +2739,12 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win gl_info->gl_ops.gl.p_glEnable(GL_SCISSOR_TEST); if (rt_count && gl_info->supported[ARB_FRAMEBUFFER_SRGB]) { @@ -1216,7 +1216,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c gl_info->gl_ops.gl.p_glEnable(GL_FRAMEBUFFER_SRGB); else gl_info->gl_ops.gl.p_glDisable(GL_FRAMEBUFFER_SRGB); -@@ -2729,7 +2759,11 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2731,7 +2761,11 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_state *state) { @@ -1228,7 +1228,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL]; DWORD rt_mask, rt_mask_bits; unsigned int i; -@@ -2759,7 +2793,11 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const +@@ -2761,7 +2795,11 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { DWORD rt_mask = find_draw_buffers_mask(context, state); @@ -1240,7 +1240,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c DWORD *cur_mask; if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) -@@ -3048,6 +3086,10 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d +@@ -3050,6 +3088,10 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d context_apply_draw_buffers(context, rt_mask); *cur_mask = rt_mask; } @@ -1251,7 +1251,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c } static BOOL fixed_get_input(BYTE usage, BYTE usage_idx, unsigned int *regnum) -@@ -3232,7 +3274,11 @@ static void context_update_stream_info(struct wined3d_context *context, const st +@@ -3234,7 +3276,11 @@ static void context_update_stream_info(struct wined3d_context *context, const st else { wined3d_buffer_load(buffer, context, state); @@ -1263,7 +1263,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c element->data.buffer_object = data.buffer_object; element->data.addr += (ULONG_PTR)data.addr; } -@@ -3479,7 +3525,11 @@ BOOL context_apply_draw_state(struct wined3d_context *context, +@@ -3481,7 +3527,11 @@ BOOL context_apply_draw_state(struct wined3d_context *context, const struct wined3d_device *device, const struct wined3d_state *state) { const struct StateEntry *state_table = context->state_table; @@ -1275,7 +1275,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c unsigned int i; WORD map; -@@ -3512,8 +3562,17 @@ BOOL context_apply_draw_state(struct wined3d_context *context, +@@ -3514,8 +3564,17 @@ BOOL context_apply_draw_state(struct wined3d_context *context, for (i = 0, map = context->stream_info.use_map; map; map >>= 1, ++i) { if (map & 1) @@ -1293,7 +1293,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c } if (state->index_buffer) { -@@ -3639,6 +3698,11 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str +@@ -3641,6 +3700,11 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str TRACE("device %p, target %p.\n", device, target); @@ -6115,7 +6115,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 -@@ -3198,7 +3198,11 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3 +@@ -3208,7 +3208,11 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3 UINT i; memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */ @@ -7674,7 +7674,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c + * issue needs to be fixed. */ + for (i = 0; i < (sizeof(formats) / sizeof(*formats)); i++) + { -+ swapchain->ds_format = wined3d_get_format(gl_info, formats[i]); ++ swapchain->ds_format = wined3d_get_format(gl_info, formats[i], WINED3DUSAGE_DEPTHSTENCIL); + swapchain->context[0] = context_create(swapchain, swapchain->front_buffer, swapchain->ds_format); + if (swapchain->context[0]) break; + TRACE("Depth stencil format %s is not supported, trying next format\n", @@ -7960,7 +7960,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c data->addr += sub_resource->offset; data->buffer_object = 0; return; -@@ -339,6 +491,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc +@@ -341,6 +493,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc /* Context activation is done by the caller. */ static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture, @@ -7968,7 +7968,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c unsigned int sub_resource_idx, const struct wined3d_gl_info *gl_info) { GLuint *buffer_object; -@@ -351,6 +504,24 @@ static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture +@@ -353,6 +506,24 @@ static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture TRACE("Deleted buffer object %u for texture %p, sub-resource %u.\n", *buffer_object, texture, sub_resource_idx); @@ -7993,7 +7993,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } static void wined3d_texture_update_map_binding(struct wined3d_texture *texture) -@@ -370,7 +541,11 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture) +@@ -372,7 +543,11 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture) && !wined3d_texture_load_location(texture, i, context, map_binding)) ERR("Failed to load location %s.\n", wined3d_debug_location(map_binding)); if (texture->resource.map_binding == WINED3D_LOCATION_BUFFER) @@ -8005,7 +8005,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } if (context) -@@ -527,28 +702,51 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture) +@@ -529,28 +704,51 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture) unsigned int sub_count = texture->level_count * texture->layer_count; struct wined3d_device *device = texture->resource.device; struct wined3d_context *context = NULL; @@ -8057,7 +8057,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } if (context) context_release(context); -@@ -1020,7 +1218,17 @@ DWORD CDECL wined3d_texture_set_lod(struct wined3d_texture *texture, DWORD lod) +@@ -1022,7 +1220,17 @@ DWORD CDECL wined3d_texture_set_lod(struct wined3d_texture *texture, DWORD lod) if (texture->lod != lod) { @@ -8075,7 +8075,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c texture->lod = lod; texture->texture_rgb.base_level = ~0u; -@@ -1159,6 +1367,9 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT +@@ -1161,6 +1369,9 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT } wined3d_resource_free_sysmem(&texture->resource); @@ -8085,7 +8085,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if ((texture->row_pitch = pitch)) texture->slice_pitch = height * pitch; -@@ -1215,18 +1426,31 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT +@@ -1217,18 +1428,31 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT wined3d_texture_invalidate_location(texture, 0, ~valid_location); if (create_dib) @@ -8117,7 +8117,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (sub_resource->buffer_object) return; -@@ -1238,6 +1462,25 @@ static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *textur +@@ -1240,6 +1464,25 @@ static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *textur TRACE("Created buffer object %u for texture %p, sub-resource %u.\n", sub_resource->buffer_object, texture, sub_resource_idx); @@ -8143,7 +8143,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } static void wined3d_texture_force_reload(struct wined3d_texture *texture) -@@ -1355,6 +1598,9 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned +@@ -1357,6 +1600,9 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned ERR("Failed to allocate system memory.\n"); return FALSE; } @@ -8153,7 +8153,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return TRUE; case WINED3D_LOCATION_USER_MEMORY: -@@ -1363,7 +1609,11 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned +@@ -1365,7 +1611,11 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned return TRUE; case WINED3D_LOCATION_BUFFER: @@ -8165,7 +8165,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return TRUE; case WINED3D_LOCATION_TEXTURE_RGB: -@@ -1418,7 +1668,9 @@ struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(struct win +@@ -1420,7 +1670,9 @@ struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(struct win HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture, UINT layer, const struct wined3d_box *dirty_region) { @@ -8175,7 +8175,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c unsigned int sub_resource_idx; TRACE("texture %p, layer %u, dirty_region %s.\n", texture, layer, debug_box(dirty_region)); -@@ -1430,6 +1682,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture, +@@ -1432,6 +1684,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture, } sub_resource_idx = layer * texture->level_count; @@ -8183,7 +8183,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (dirty_region) WARN("Ignoring dirty_region %s.\n", debug_box(dirty_region)); -@@ -1443,6 +1696,9 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture, +@@ -1445,6 +1698,9 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture, wined3d_texture_invalidate_location(texture, sub_resource_idx, ~texture->resource.map_binding); context_release(context); @@ -8193,7 +8193,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3D_OK; } -@@ -1630,7 +1886,9 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in +@@ -1632,7 +1888,9 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in struct wined3d_context *context, DWORD location) { struct wined3d_texture_sub_resource *sub_resource = &texture->sub_resources[sub_resource_idx]; @@ -8203,7 +8203,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c unsigned int row_pitch, slice_pitch; TRACE("texture %p, sub_resource_idx %u, context %p, location %s.\n", -@@ -1638,6 +1896,7 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in +@@ -1640,6 +1898,7 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in TRACE("Current resource location %s.\n", wined3d_debug_location(sub_resource->locations)); @@ -8211,7 +8211,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if ((sub_resource->locations & location) == location) { TRACE("Location(s) already up to date.\n"); -@@ -1651,9 +1910,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in +@@ -1653,9 +1912,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in return FALSE; } @@ -8223,7 +8223,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (sub_resource->locations & WINED3D_LOCATION_DISCARDED) { TRACE("1d texture previously discarded, nothing to do.\n"); -@@ -1662,6 +1923,7 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in +@@ -1664,6 +1925,7 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in goto done; } @@ -8231,7 +8231,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c switch (location) { case WINED3D_LOCATION_TEXTURE_RGB: -@@ -1676,7 +1938,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in +@@ -1678,7 +1940,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in } else if (sub_resource->locations & WINED3D_LOCATION_BUFFER) { @@ -8243,7 +8243,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c wined3d_texture_bind_and_dirtify(texture, context, location == WINED3D_LOCATION_TEXTURE_SRGB); wined3d_texture_get_pitch(texture, sub_resource_idx, &row_pitch, &slice_pitch); texture1d_upload_data(texture, sub_resource_idx, context, NULL, &data, row_pitch, slice_pitch); -@@ -1721,7 +1987,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in +@@ -1723,7 +1989,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in case WINED3D_LOCATION_BUFFER: if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)) { @@ -8255,7 +8255,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB) wined3d_texture_bind_and_dirtify(texture, context, FALSE); -@@ -1744,7 +2014,9 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in +@@ -1746,7 +2016,9 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in return FALSE; } @@ -8265,7 +8265,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c wined3d_texture_validate_location(texture, sub_resource_idx, location); return TRUE; -@@ -1852,7 +2124,12 @@ static void texture2d_upload_data(struct wined3d_texture *texture, unsigned int +@@ -1854,7 +2126,12 @@ static void texture2d_upload_data(struct wined3d_texture *texture, unsigned int static BOOL texture2d_load_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, DWORD location) { @@ -8278,7 +8278,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } /* Context activation is done by the caller. */ -@@ -2015,8 +2292,13 @@ static void wined3d_texture_unload(struct wined3d_resource *resource) +@@ -2017,8 +2294,13 @@ static void wined3d_texture_unload(struct wined3d_resource *resource) wined3d_texture_invalidate_location(texture, i, ~WINED3D_LOCATION_DISCARDED); } @@ -8292,7 +8292,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (resource->type == WINED3D_RTYPE_TEXTURE_2D) { -@@ -2041,6 +2323,89 @@ static void wined3d_texture_unload(struct wined3d_resource *resource) +@@ -2043,6 +2325,89 @@ static void wined3d_texture_unload(struct wined3d_resource *resource) wined3d_texture_unload_gl_texture(texture); } @@ -8382,7 +8382,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags) { -@@ -2048,6 +2413,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour +@@ -2050,6 +2415,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour struct wined3d_texture_sub_resource *sub_resource; struct wined3d_device *device = resource->device; unsigned int fmt_flags = resource->format_flags; @@ -8390,7 +8390,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c const struct wined3d_gl_info *gl_info = NULL; struct wined3d_context *context = NULL; struct wined3d_texture *texture; -@@ -2055,6 +2421,11 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour +@@ -2057,6 +2423,11 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour unsigned int texture_level; BYTE *base_memory; BOOL ret; @@ -8402,7 +8402,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c TRACE("resource %p, sub_resource_idx %u, map_desc %p, box %s, flags %#x.\n", resource, sub_resource_idx, map_desc, debug_box(box), flags); -@@ -2099,14 +2470,22 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour +@@ -2101,14 +2472,22 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour return WINED3DERR_INVALIDCALL; } @@ -8425,7 +8425,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c TRACE("WINED3D_MAP_DISCARD flag passed, marking %s as up to date.\n", wined3d_debug_location(texture->resource.map_binding)); if ((ret = wined3d_texture_prepare_location(texture, sub_resource_idx, -@@ -2137,6 +2516,24 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour +@@ -2139,6 +2518,24 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour if (context) context_release(context); @@ -8450,7 +8450,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH) { -@@ -2172,6 +2569,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour +@@ -2174,6 +2571,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour } } @@ -8458,7 +8458,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (texture->swapchain && texture->swapchain->front_buffer == texture) { RECT *r = &texture->swapchain->front_buffer_update; -@@ -2183,6 +2581,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour +@@ -2185,6 +2583,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour TRACE("Mapped front buffer %s.\n", wine_dbgstr_rect(r)); } @@ -8466,7 +8466,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c ++resource->map_count; ++sub_resource->map_count; -@@ -2192,14 +2591,71 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour +@@ -2194,14 +2593,71 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour return WINED3D_OK; } @@ -8538,7 +8538,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c TRACE("resource %p, sub_resource_idx %u.\n", resource, sub_resource_idx); -@@ -2215,6 +2671,7 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso +@@ -2217,6 +2673,7 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso return WINEDDERR_NOTLOCKED; } @@ -8546,7 +8546,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (device->d3d_initialized) { context = context_acquire(device, NULL); -@@ -2235,6 +2692,15 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso +@@ -2237,6 +2694,15 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso else if (resource->format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)) { FIXME("Depth / stencil buffer locking is not implemented.\n"); @@ -8562,7 +8562,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } --sub_resource->map_count; -@@ -2598,11 +3064,23 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3 +@@ -2600,11 +3066,23 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3 TRACE("Created surface level %u, layer %u @ %p.\n", i, j, surface); @@ -8586,7 +8586,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } } } -@@ -2758,7 +3236,9 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in +@@ -2760,7 +3238,9 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in struct wined3d_context *context, DWORD location) { struct wined3d_texture_sub_resource *sub_resource = &texture->sub_resources[sub_resource_idx]; @@ -8596,7 +8596,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c unsigned int row_pitch, slice_pitch; TRACE("texture %p, sub_resource_idx %u, context %p, location %s.\n", -@@ -2766,6 +3246,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in +@@ -2768,6 +3248,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in TRACE("Current resource location %s.\n", wined3d_debug_location(sub_resource->locations)); @@ -8604,7 +8604,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if ((sub_resource->locations & location) == location) { TRACE("Location(s) already up to date.\n"); -@@ -2779,9 +3260,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in +@@ -2781,9 +3262,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in return FALSE; } @@ -8616,7 +8616,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (sub_resource->locations & WINED3D_LOCATION_DISCARDED) { TRACE("Volume previously discarded, nothing to do.\n"); -@@ -2790,6 +3273,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in +@@ -2792,6 +3275,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in goto done; } @@ -8624,7 +8624,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c switch (location) { case WINED3D_LOCATION_TEXTURE_RGB: -@@ -2805,7 +3289,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in +@@ -2807,7 +3291,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in } else if (sub_resource->locations & WINED3D_LOCATION_BUFFER) { @@ -8636,7 +8636,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c wined3d_texture_bind_and_dirtify(texture, context, location == WINED3D_LOCATION_TEXTURE_SRGB); wined3d_texture_get_pitch(texture, sub_resource_idx, &row_pitch, &slice_pitch); -@@ -2851,7 +3339,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in +@@ -2853,7 +3341,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in case WINED3D_LOCATION_BUFFER: if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)) { @@ -8648,7 +8648,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB) wined3d_texture_bind_and_dirtify(texture, context, FALSE); -@@ -2874,7 +3366,9 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in +@@ -2876,7 +3368,9 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in return FALSE; } @@ -8658,7 +8658,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c wined3d_texture_validate_location(texture, sub_resource_idx, location); return TRUE; -@@ -3038,6 +3532,9 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct +@@ -3040,6 +3534,9 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct if (wined3d_texture_use_pbo(texture, gl_info)) { wined3d_resource_free_sysmem(&texture->resource); @@ -8668,7 +8668,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c texture->resource.map_binding = WINED3D_LOCATION_BUFFER; } -@@ -3387,13 +3884,47 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct +@@ -3390,13 +3887,47 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct return WINED3D_OK; } @@ -8716,7 +8716,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c TRACE("texture %p, sub_resource_idx %u, dc %p.\n", texture, sub_resource_idx, dc); -@@ -3418,6 +3949,7 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i +@@ -3421,6 +3952,7 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i if (texture->resource.map_count && !(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT)) return WINED3DERR_INVALIDCALL; @@ -8724,7 +8724,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (device->d3d_initialized) context = context_acquire(device, NULL); -@@ -3440,6 +3972,32 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i +@@ -3443,6 +3975,32 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i TRACE("Returning dc %p.\n", *dc); return hr; @@ -8757,7 +8757,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC dc) -@@ -3470,6 +4028,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign +@@ -3473,6 +4031,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign return WINED3DERR_INVALIDCALL; } @@ -8765,7 +8765,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (!(texture->resource.usage & WINED3DUSAGE_OWNDC) && !(device->wined3d->flags & WINED3D_NO3D)) wined3d_surface_destroy_dc(surface); -@@ -3478,6 +4037,9 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign +@@ -3481,6 +4040,9 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign wined3d_texture_update_map_binding(texture); if (!(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT)) texture->flags &= ~WINED3D_TEXTURE_DC_IN_USE; @@ -8778,7 +8778,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c -@@ -4595,7 +4595,11 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w +@@ -4636,7 +4636,11 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w float y_offset = flip ? (center_offset - (2.0f * y) - h) / h : (center_offset - (2.0f * y) - h) / -h; @@ -8790,7 +8790,7 @@ diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE; float z_scale = zenable ? clip_control ? 1.0f : 2.0f : 0.0f; float z_offset = zenable ? clip_control ? 0.0f : -1.0f : 0.0f; -@@ -5394,7 +5398,11 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d +@@ -5435,7 +5439,11 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d break; } } @@ -8878,7 +8878,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN; -@@ -1434,7 +1440,11 @@ enum wined3d_query_state +@@ -1438,7 +1444,11 @@ enum wined3d_query_state struct wined3d_query_ops { BOOL (*query_poll)(struct wined3d_query *query); @@ -8890,7 +8890,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_query -@@ -1448,6 +1458,10 @@ struct wined3d_query +@@ -1452,6 +1462,10 @@ struct wined3d_query const void *data; DWORD data_size; const struct wined3d_query_ops *query_ops; @@ -8901,7 +8901,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; union wined3d_gl_query_object -@@ -1489,6 +1503,9 @@ struct wined3d_occlusion_query +@@ -1493,6 +1507,9 @@ struct wined3d_occlusion_query GLuint id; struct wined3d_context *context; UINT64 samples; @@ -8911,7 +8911,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_timestamp_query -@@ -1504,6 +1521,38 @@ struct wined3d_timestamp_query +@@ -1508,6 +1525,38 @@ struct wined3d_timestamp_query void context_alloc_timestamp_query(struct wined3d_context *context, struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN; void context_free_timestamp_query(struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN; @@ -8950,7 +8950,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_context { const struct wined3d_gl_info *gl_info; -@@ -1518,6 +1567,9 @@ struct wined3d_context +@@ -1522,6 +1571,9 @@ struct wined3d_context DWORD dirtyArray[STATE_HIGHEST + 1]; /* Won't get bigger than that, a state is never marked dirty 2 times */ DWORD numDirtyEntries; DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */ @@ -8960,7 +8960,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_device *device; struct wined3d_swapchain *swapchain; -@@ -1630,12 +1682,14 @@ struct wined3d_context +@@ -1634,12 +1686,14 @@ struct wined3d_context GLuint dummy_arbfp_prog; }; @@ -8975,7 +8975,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 -@@ -1774,7 +1828,11 @@ void context_alloc_event_query(struct wined3d_context *context, +@@ -1778,7 +1832,11 @@ void context_alloc_event_query(struct wined3d_context *context, 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; @@ -8987,7 +8987,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; -@@ -2443,7 +2501,11 @@ struct wined3d_stream_state +@@ -2447,7 +2505,11 @@ struct wined3d_stream_state struct wined3d_state { DWORD flags; @@ -8999,7 +8999,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]; -@@ -2491,6 +2553,16 @@ struct wined3d_state +@@ -2495,6 +2557,16 @@ struct wined3d_state struct wined3d_rasterizer_state *rasterizer_state; }; @@ -9016,7 +9016,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 -@@ -2543,16 +2615,21 @@ struct wined3d_device +@@ -2547,16 +2619,21 @@ struct wined3d_device struct wined3d_rendertarget_view *back_buffer_view; struct wined3d_swapchain **swapchains; UINT swapchain_count; @@ -9038,7 +9038,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; -@@ -2604,9 +2681,23 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL +@@ -2608,9 +2685,23 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN; void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN; void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN; @@ -9062,7 +9062,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) { -@@ -2651,7 +2742,11 @@ struct wined3d_resource +@@ -2655,7 +2746,11 @@ struct wined3d_resource UINT depth; UINT size; DWORD priority; @@ -9074,7 +9074,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct list resource_list_entry; LONG access_count; -@@ -2698,6 +2793,9 @@ void wined3d_resource_free_sysmem(struct wined3d_resource *resource) DECLSPEC_HI +@@ -2702,6 +2797,9 @@ void wined3d_resource_free_sysmem(struct wined3d_resource *resource) DECLSPEC_HI GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN; GLenum wined3d_resource_gl_legacy_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN; BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource) DECLSPEC_HIDDEN; @@ -9084,7 +9084,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_resource_update_draw_binding(struct wined3d_resource *resource) DECLSPEC_HIDDEN; /* Tests show that the start address of resources is 32 byte aligned */ -@@ -2759,6 +2857,9 @@ struct wined3d_texture +@@ -2763,6 +2861,9 @@ struct wined3d_texture DWORD flags; GLenum target; DWORD update_map_binding; @@ -9094,7 +9094,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h GLuint rb_multisample; GLuint rb_resolved; -@@ -2795,7 +2896,12 @@ struct wined3d_texture +@@ -2799,7 +2900,12 @@ struct wined3d_texture unsigned int map_count; DWORD locations; @@ -9107,7 +9107,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h } sub_resources[1]; }; -@@ -2846,11 +2952,23 @@ void wined3d_texture_bind(struct wined3d_texture *texture, +@@ -2850,11 +2956,23 @@ void wined3d_texture_bind(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN; void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN; @@ -9131,7 +9131,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, -@@ -2863,13 +2981,26 @@ void *wined3d_texture_map_bo_address(const struct wined3d_bo_address *data, size +@@ -2867,13 +2985,26 @@ void *wined3d_texture_map_bo_address(const struct wined3d_bo_address *data, size const struct wined3d_gl_info *gl_info, GLenum binding, DWORD flags) DECLSPEC_HIDDEN; BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN; @@ -9158,7 +9158,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx, const struct wined3d_context *context, const struct wined3d_box *box, const struct wined3d_const_bo_address *data, unsigned int row_pitch, unsigned int slice_pitch) DECLSPEC_HIDDEN; -@@ -2974,9 +3105,17 @@ HRESULT surface_color_fill(struct wined3d_surface *s, +@@ -2978,9 +3109,17 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const struct wined3d_color *color) DECLSPEC_HIDDEN; HRESULT wined3d_surface_create_dc(struct wined3d_surface *surface) DECLSPEC_HIDDEN; void wined3d_surface_destroy_dc(struct wined3d_surface *surface) DECLSPEC_HIDDEN; @@ -9176,7 +9176,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, -@@ -2987,6 +3126,11 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P +@@ -2991,6 +3130,11 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point, BOOL srgb, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN; @@ -9188,7 +9188,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; -@@ -3001,6 +3145,12 @@ struct wined3d_sampler +@@ -3005,6 +3149,12 @@ struct wined3d_sampler GLuint name; }; @@ -9201,7 +9201,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; -@@ -3096,6 +3246,7 @@ struct wined3d_stateblock +@@ -3100,6 +3250,7 @@ struct wined3d_stateblock void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN; void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN; @@ -9209,7 +9209,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void state_init(struct wined3d_state *state, struct wined3d_fb_state *fb, const struct wined3d_gl_info *gl_info, const struct wined3d_d3d_info *d3d_info, DWORD flags) DECLSPEC_HIDDEN; -@@ -3109,54 +3260,150 @@ enum wined3d_push_constants +@@ -3113,54 +3264,150 @@ enum wined3d_push_constants WINED3D_PUSH_CONSTANTS_PS_I, WINED3D_PUSH_CONSTANTS_VS_B, WINED3D_PUSH_CONSTANTS_PS_B, @@ -9360,7 +9360,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs, struct wined3d_rasterizer_state *rasterizer_state) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, -@@ -3188,6 +3435,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, unsigned i +@@ -3192,6 +3439,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, unsigned i 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; @@ -9368,7 +9368,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN; HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, unsigned int flags) DECLSPEC_HIDDEN; -@@ -3199,6 +3447,24 @@ static inline void wined3d_cs_push_constants(struct wined3d_cs *cs, enum wined3d +@@ -3203,6 +3451,24 @@ static inline void wined3d_cs_push_constants(struct wined3d_cs *cs, enum wined3d { cs->ops->push_constants(cs, p, start_idx, count, constants); } @@ -9393,7 +9393,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 */ -@@ -3224,13 +3490,20 @@ struct wined3d_buffer +@@ -3228,13 +3494,20 @@ struct wined3d_buffer GLuint buffer_object; GLenum buffer_object_usage; GLenum buffer_type_hint; @@ -9414,7 +9414,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_event_query *query; /* conversion stuff */ -@@ -3246,6 +3519,7 @@ static inline struct wined3d_buffer *buffer_from_resource(struct wined3d_resourc +@@ -3250,6 +3523,7 @@ static inline struct wined3d_buffer *buffer_from_resource(struct wined3d_resourc return CONTAINING_RECORD(resource, struct wined3d_buffer, resource); } @@ -9422,7 +9422,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void buffer_mark_used(struct wined3d_buffer *buffer) DECLSPEC_HIDDEN; DWORD wined3d_buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_bo_address *data, DWORD locations) DECLSPEC_HIDDEN; -@@ -3254,12 +3528,25 @@ void wined3d_buffer_load(struct wined3d_buffer *buffer, struct wined3d_context * +@@ -3258,12 +3532,25 @@ void wined3d_buffer_load(struct wined3d_buffer *buffer, struct wined3d_context * const struct wined3d_state *state) DECLSPEC_HIDDEN; BOOL wined3d_buffer_load_location(struct wined3d_buffer *buffer, struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN; @@ -9448,7 +9448,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_rendertarget_view { -@@ -3292,9 +3579,11 @@ static inline struct wined3d_surface *wined3d_rendertarget_view_get_surface( +@@ -3296,9 +3583,11 @@ static inline struct wined3d_surface *wined3d_rendertarget_view_get_surface( return texture->sub_resources[view->sub_resource_idx].u.surface; } @@ -9460,7 +9460,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_gl_view { GLenum target; -@@ -3336,7 +3625,12 @@ void wined3d_unordered_access_view_invalidate_location(struct wined3d_unordered_ +@@ -3340,7 +3629,12 @@ void wined3d_unordered_access_view_invalidate_location(struct wined3d_unordered_ struct wined3d_swapchain_ops { void (*swapchain_present)(struct wined3d_swapchain *swapchain, @@ -9473,7 +9473,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void (*swapchain_frontbuffer_updated)(struct wined3d_swapchain *swapchain); }; -@@ -3373,6 +3667,10 @@ struct wined3d_swapchain +@@ -3377,6 +3671,10 @@ struct wined3d_swapchain void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activate) DECLSPEC_HIDDEN; struct wined3d_context *swapchain_get_context(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; diff --git a/patches/wined3d-check_format_support/0001-wined3d-Add-wined3d_check_device_format_support.patch b/patches/wined3d-check_format_support/0001-wined3d-Add-wined3d_check_device_format_support.patch index 4b00a005..d3c0a008 100644 --- a/patches/wined3d-check_format_support/0001-wined3d-Add-wined3d_check_device_format_support.patch +++ b/patches/wined3d-check_format_support/0001-wined3d-Add-wined3d_check_device_format_support.patch @@ -1,4 +1,4 @@ -From 73895e9d37b40608589bbe25c2e6b7defcc1cf7b Mon Sep 17 00:00:00 2001 +From 0864f18c99567a16025d2cda9b70e23db43b2ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 28 Aug 2016 04:07:01 +0200 Subject: wined3d: Add wined3d_check_device_format_support. @@ -10,17 +10,17 @@ Subject: wined3d: Add wined3d_check_device_format_support. 3 files changed, 110 insertions(+) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index c2a8c55..03ef744 100644 +index a8de282..83fa003 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -3330,6 +3330,82 @@ struct wined3d_texture * CDECL wined3d_device_get_texture(const struct wined3d_d +@@ -3343,6 +3343,82 @@ struct wined3d_texture * CDECL wined3d_device_get_texture(const struct wined3d_d return device->state.textures[stage]; } +void CDECL wined3d_check_device_format_support(struct wined3d_device *device, + enum wined3d_format_id check_format_id, UINT *support) +{ -+ const struct wined3d_format *format = wined3d_get_format(&device->adapter->gl_info, check_format_id); ++ const struct wined3d_format *format = wined3d_get_format(&device->adapter->gl_info, check_format_id, 0); + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + + UINT support_flags = 0; @@ -97,7 +97,7 @@ index c2a8c55..03ef744 100644 { TRACE("device %p, caps %p.\n", device, caps); diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec -index 0db371d..758d3b0 100644 +index 34b2d0a..efd7501 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -5,6 +5,7 @@ @@ -109,10 +109,10 @@ index 0db371d..758d3b0 100644 @ cdecl wined3d_check_device_type(ptr long long long long long) @ cdecl wined3d_create(long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h -index 81dffea..a2c9657 100644 +index 7271ec0..c5ccee1 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h -@@ -797,6 +797,37 @@ enum wined3d_display_rotation +@@ -796,6 +796,37 @@ enum wined3d_display_rotation WINED3D_DISPLAY_ROTATION_270 = 4, }; @@ -150,7 +150,7 @@ index 81dffea..a2c9657 100644 #define WINED3DCOLORWRITEENABLE_RED (1u << 0) #define WINED3DCOLORWRITEENABLE_GREEN (1u << 1) #define WINED3DCOLORWRITEENABLE_BLUE (1u << 2) -@@ -2095,6 +2126,8 @@ HRESULT __cdecl wined3d_check_device_format(const struct wined3d *wined3d, UINT +@@ -2066,6 +2097,8 @@ HRESULT __cdecl wined3d_check_device_format(const struct wined3d *wined3d, UINT HRESULT __cdecl wined3d_check_device_format_conversion(const struct wined3d *wined3d, UINT adapter_idx, enum wined3d_device_type device_type, enum wined3d_format_id source_format_id, enum wined3d_format_id target_format_id); diff --git a/patches/wininet-HttpOpenRequestW/0001-wininet-Handle-INTERNET_INVALID_PORT_NUMBER-in-HttpO.patch b/patches/wininet-HttpOpenRequestW/0001-wininet-Handle-INTERNET_INVALID_PORT_NUMBER-in-HttpO.patch deleted file mode 100644 index 4db97988..00000000 --- a/patches/wininet-HttpOpenRequestW/0001-wininet-Handle-INTERNET_INVALID_PORT_NUMBER-in-HttpO.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 8ee0669fae69b5a23fe2d1d4b36055ca64f93f1a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Mon, 25 Apr 2016 21:46:29 +0200 -Subject: wininet: Handle INTERNET_INVALID_PORT_NUMBER in HttpOpenRequest. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Michael Müller -Signed-off-by: Sebastian Lackner ---- - dlls/wininet/http.c | 11 +++++++++-- - dlls/wininet/tests/http.c | 6 +++--- - 2 files changed, 12 insertions(+), 5 deletions(-) - -diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c -index 21f6ff2..39f72c6 100644 ---- a/dlls/wininet/http.c -+++ b/dlls/wininet/http.c -@@ -3356,7 +3356,7 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session, - { - appinfo_t *hIC = session->appInfo; - http_request_t *request; -- DWORD len; -+ DWORD port, len; - - TRACE("-->\n"); - -@@ -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(substrz(session->hostName), session->hostPort, (dwFlags & INTERNET_FLAG_SECURE) != 0, TRUE); -+ port = session->hostPort; -+ if (port == INTERNET_INVALID_PORT_NUMBER) -+ { -+ port = (session->hdr.dwFlags & INTERNET_FLAG_SECURE) ? -+ INTERNET_DEFAULT_HTTPS_PORT : INTERNET_DEFAULT_HTTP_PORT; -+ } -+ -+ 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 29dd965..a76046d 100644 ---- a/dlls/wininet/tests/http.c -+++ b/dlls/wininet/tests/http.c -@@ -6079,13 +6079,13 @@ static void test_default_service_port(void) - ok(request != NULL, "HttpOpenRequest failed\n"); - - ret = HttpSendRequestA(request, NULL, 0, NULL, 0); -- todo_wine ok(ret, "HttpSendRequest failed with error %u\n", GetLastError()); -+ ok(ret, "HttpSendRequest failed with error %u\n", GetLastError()); - - size = sizeof(buffer); - 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()); -- todo_wine ok(!strcmp(buffer, "test.winehq.org"), "Expected test.winehg.org, got '%s'\n", buffer); -+ ok(!strcmp(buffer, "test.winehq.org"), "Expected test.winehg.org, got '%s'\n", buffer); - - InternetCloseHandle(request); - InternetCloseHandle(connect); -@@ -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()); -- todo_wine ok(!strcmp(buffer, "test.winehq.org:443"), "Expected test.winehg.org:443, got '%s'\n", buffer); -+ ok(!strcmp(buffer, "test.winehq.org:443"), "Expected test.winehg.org:443, got '%s'\n", buffer); - - InternetCloseHandle(request); - InternetCloseHandle(connect); --- -2.8.0 - diff --git a/patches/wininet-HttpOpenRequestW/definition b/patches/wininet-HttpOpenRequestW/definition deleted file mode 100644 index 4d4f1aeb..00000000 --- a/patches/wininet-HttpOpenRequestW/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [40169] Fix handling of INTERNET_INVALID_PORT_NUMBER in HttpOpenRequestW diff --git a/staging/VERSION b/staging/VERSION index 35ce58e4..3f5cbc3c 100644 --- a/staging/VERSION +++ b/staging/VERSION @@ -1 +1 @@ -Wine Staging 2.0-rc1 +Wine Staging 2.0-rc2 (unreleased)