mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Rebase against b53256b8b752855576252cc2290dfbc9cb0f1280.
This commit is contained in:
parent
ec61f717d5
commit
a51602d5df
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "99033b14534ffe8ff6c88c8d38a70d398c933b4d"
|
||||
echo "b53256b8b752855576252cc2290dfbc9cb0f1280"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -5739,15 +5739,17 @@ fi
|
||||
# | dlls/ddraw/tests/ddraw4.c, dlls/ddraw/tests/ddraw7.c, dlls/wined3d/context.c, dlls/wined3d/wined3d_private.h
|
||||
# |
|
||||
if test "$enable_wined3d_Revert_PixelFormat" -eq 1; then
|
||||
patch_apply wined3d-Revert_PixelFormat/0001-Revert-wined3d-Track-if-a-context-s-private-hdc-has-.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0002-Revert-wined3d-Track-if-a-context-s-hdc-is-private-s.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0003-Revert-wined3d-When-restoring-pixel-format-in-contex.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0004-Revert-wined3d-Don-t-call-GetPixelFormat-to-set-a-fl.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0005-Revert-wined3d-Restore-the-pixel-format-of-the-windo.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0006-d3d8-Mark-tests-which-no-longer-pass-due-to-reverts-.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0007-d3d9-Mark-tests-which-no-longer-pass-due-to-reverts-.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0008-ddraw-Mark-tests-which-no-longer-pass-due-to-reverts.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0001-Revert-wined3d-Call-wglGetPixelFormat-through-the-gl.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0002-Revert-wined3d-Track-if-a-context-s-private-hdc-has-.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0003-Revert-wined3d-Track-if-a-context-s-hdc-is-private-s.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0004-Revert-wined3d-When-restoring-pixel-format-in-contex.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0005-Revert-wined3d-Don-t-call-GetPixelFormat-to-set-a-fl.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0006-Revert-wined3d-Restore-the-pixel-format-of-the-windo.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0007-d3d8-Mark-tests-which-no-longer-pass-due-to-reverts-.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0008-d3d9-Mark-tests-which-no-longer-pass-due-to-reverts-.patch
|
||||
patch_apply wined3d-Revert_PixelFormat/0009-ddraw-Mark-tests-which-no-longer-pass-due-to-reverts.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Call wglGetPixelFormat() through the gl_ops table.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: Track if a context'\''s private hdc has had its pixel format set, so we don'\''t need to check it.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: Track if a context'\''s hdc is private so we never need to restore its pixel format.\".", 1 },';
|
||||
echo '+ { "Ken Thomases", "Revert \"wined3d: When restoring pixel format in context_release(), mark the context as needing to be set on the next context_acquire().\".", 1 },';
|
||||
|
@ -1314,7 +1314,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)
|
||||
{
|
||||
@@ -1764,7 +1766,9 @@
|
||||
@@ -1778,7 +1780,9 @@
|
||||
out:
|
||||
device->shader_backend->shader_free_context_data(ret);
|
||||
device->adapter->fragment_pipe->free_context_data(ret);
|
||||
@ -1324,7 +1324,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);
|
||||
@@ -1799,7 +1803,9 @@
|
||||
@@ -1813,7 +1817,9 @@
|
||||
|
||||
device->shader_backend->shader_free_context_data(context);
|
||||
device->adapter->fragment_pipe->free_context_data(context);
|
||||
@ -1334,7 +1334,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);
|
||||
@@ -2219,6 +2225,7 @@
|
||||
@@ -2233,6 +2239,7 @@
|
||||
WARN("Depth stencil format is not supported by WGL, rendering the backbuffer in an FBO\n");
|
||||
|
||||
/* The currently active context is the necessary context to access the swapchain's onscreen buffers */
|
||||
@ -1342,7 +1342,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
wined3d_resource_load_location(&context->current_rt->resource, context, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
swapchain->render_to_fbo = TRUE;
|
||||
swapchain_update_draw_bindings(swapchain);
|
||||
@@ -2233,6 +2240,22 @@
|
||||
@@ -2247,6 +2254,22 @@
|
||||
return context_generate_rt_mask_from_surface(rt);
|
||||
else
|
||||
return context_generate_rt_mask(context->offscreenBuffer);
|
||||
@ -1365,7 +1365,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -2264,7 +2287,11 @@
|
||||
@@ -2278,7 +2301,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1377,7 +1377,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
}
|
||||
|
||||
cur_mask = context->current_fbo ? &context->current_fbo->rt_mask : &context->draw_buffers_mask;
|
||||
@@ -2311,7 +2338,11 @@
|
||||
@@ -2325,7 +2352,11 @@
|
||||
DWORD rt_mask = 0, *cur_mask;
|
||||
UINT i;
|
||||
|
||||
@ -1389,7 +1389,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
|| rt_count != context->gl_info->limits.buffers)
|
||||
{
|
||||
if (!context_validate_rt_config(rt_count, rts, dsv))
|
||||
@@ -2353,11 +2384,17 @@
|
||||
@@ -2367,11 +2398,17 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1407,7 +1407,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)))
|
||||
@@ -2370,7 +2407,11 @@
|
||||
@@ -2384,7 +2421,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1419,7 +1419,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
rt_count ? wined3d_rendertarget_view_get_surface(rts[0]) : NULL);
|
||||
}
|
||||
|
||||
@@ -2405,6 +2446,7 @@
|
||||
@@ -2419,6 +2460,7 @@
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1427,7 +1427,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_state *state)
|
||||
{
|
||||
struct wined3d_rendertarget_view **rts = state->fb.render_targets;
|
||||
@@ -2414,6 +2456,18 @@
|
||||
@@ -2428,6 +2470,18 @@
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO)
|
||||
return context_generate_rt_mask_no_fbo(context, wined3d_rendertarget_view_get_surface(rts[0]));
|
||||
@ -1446,7 +1446,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
else if (!context->render_offscreen)
|
||||
return context_generate_rt_mask_from_surface(wined3d_rendertarget_view_get_surface(rts[0]));
|
||||
|
||||
@@ -2436,8 +2490,14 @@
|
||||
@@ -2450,8 +2504,14 @@
|
||||
/* Context activation is done by the caller. */
|
||||
void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@ -1461,7 +1461,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
DWORD *cur_mask;
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
@@ -2468,8 +2528,10 @@
|
||||
@@ -2482,8 +2542,10 @@
|
||||
context_apply_draw_buffers(context, rt_mask);
|
||||
*cur_mask = rt_mask;
|
||||
}
|
||||
@ -1472,7 +1472,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
}
|
||||
|
||||
static void context_map_stage(struct wined3d_context *context, DWORD stage, DWORD unit)
|
||||
@@ -2707,12 +2769,22 @@
|
||||
@@ -2721,12 +2783,22 @@
|
||||
/* Context activation is done by the caller. */
|
||||
void context_state_drawbuf(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@ -1495,7 +1495,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
if (rt_mask != *cur_mask)
|
||||
{
|
||||
context_apply_draw_buffers(context, rt_mask);
|
||||
@@ -2914,7 +2986,11 @@
|
||||
@@ -2928,7 +3000,11 @@
|
||||
{
|
||||
if (state->vertex_declaration->half_float_conv_needed && !stream_info->all_vbo)
|
||||
{
|
||||
@ -1507,7 +1507,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
context->use_immediate_mode_draw = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -3089,11 +3165,19 @@
|
||||
@@ -3103,11 +3179,19 @@
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@ -1527,7 +1527,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
unsigned int i;
|
||||
WORD map;
|
||||
|
||||
@@ -3126,12 +3210,17 @@
|
||||
@@ -3140,12 +3224,17 @@
|
||||
for (i = 0, map = context->stream_info.use_map; map; map >>= 1, ++i)
|
||||
{
|
||||
if (map & 1)
|
||||
@ -1545,7 +1545,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
}
|
||||
if (state->index_buffer)
|
||||
{
|
||||
@@ -3226,7 +3315,11 @@
|
||||
@@ -3240,7 +3329,11 @@
|
||||
if (texture->texture_srgb.name)
|
||||
wined3d_texture_load(texture, context, TRUE);
|
||||
wined3d_texture_load(texture, context, FALSE);
|
||||
@ -9729,7 +9729,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
|
||||
--- a/dlls/wined3d/directx.c
|
||||
+++ b/dlls/wined3d/directx.c
|
||||
@@ -5528,9 +5528,15 @@
|
||||
@@ -5529,9 +5529,15 @@
|
||||
DebugBreak();
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,48 @@
|
||||
From 5a0804116847f903004cb018df55938f8363b822 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 5 Nov 2015 01:55:50 +0100
|
||||
Subject: Revert "wined3d: Call wglGetPixelFormat() through the gl_ops table."
|
||||
|
||||
This reverts commit b53256b8b752855576252cc2290dfbc9cb0f1280.
|
||||
---
|
||||
dlls/wined3d/context.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 1692d0d..13b8471 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -820,7 +820,7 @@ static BOOL context_set_pixel_format(struct wined3d_context *context, HDC dc, BO
|
||||
if (dc == context->hdc && context->hdc_is_private && context->hdc_has_format)
|
||||
return TRUE;
|
||||
|
||||
- current = gl_info->gl_ops.wgl.p_wglGetPixelFormat(dc);
|
||||
+ current = GetPixelFormat(dc);
|
||||
if (current == format) goto success;
|
||||
|
||||
if (!current)
|
||||
@@ -1219,7 +1219,7 @@ static void context_enter(struct wined3d_context *context)
|
||||
context->needs_set = 1;
|
||||
}
|
||||
else if (!context->needs_set && !(context->hdc_is_private && context->hdc_has_format)
|
||||
- && context->pixel_format != context->gl_info->gl_ops.wgl.p_wglGetPixelFormat(context->hdc))
|
||||
+ && context->pixel_format != GetPixelFormat(context->hdc))
|
||||
context->needs_set = 1;
|
||||
}
|
||||
}
|
||||
@@ -1588,10 +1588,10 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
goto out;
|
||||
}
|
||||
|
||||
- ret->gl_info = gl_info;
|
||||
-
|
||||
context_enter(ret);
|
||||
|
||||
+ ret->gl_info = gl_info;
|
||||
+
|
||||
if (!context_set_pixel_format(ret, hdc, hdc_is_private, pixel_format))
|
||||
{
|
||||
ERR("Failed to set pixel format %d on device context %p.\n", pixel_format, hdc);
|
||||
--
|
||||
2.6.2
|
||||
|
Loading…
x
Reference in New Issue
Block a user