mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Revert upstream patch which causes broken rendering in various games.
This commit is contained in:
parent
c7d100897a
commit
4c9804d9f5
@ -39,7 +39,7 @@ Wine. All those differences are also documented on the
|
||||
Included bug fixes and improvements
|
||||
-----------------------------------
|
||||
|
||||
**Bug fixes and features included in the next upcoming release [15]:**
|
||||
**Bug fixes and features included in the next upcoming release [16]:**
|
||||
|
||||
* Add shell32 placeholder icons to match offsets with Windows ([Wine Bug #30185](https://bugs.winehq.org/show_bug.cgi?id=30185))
|
||||
* Add stub for iphlpapi.ConvertInterfaceLuidToGuid ([Wine Bug #38576](https://bugs.winehq.org/show_bug.cgi?id=38576))
|
||||
@ -54,6 +54,7 @@ Included bug fixes and improvements
|
||||
* Fix handling of opening a file with RootDirectory pointing to a file handle
|
||||
* Fix scaling behaviour of images and mipmap levels in IDirect3DTexture2_Load (needed for example by Prezzie Hunt)
|
||||
* Return fake device type when systemroot is located on virtual disk ([Wine Bug #36546](https://bugs.winehq.org/show_bug.cgi?id=36546))
|
||||
* Revert patch which causes broken rendering in various games ([Wine Bug #38654](https://bugs.winehq.org/show_bug.cgi?id=38654))
|
||||
* Support for ws2_32.dll.WSAPoll ([Wine Bug #38601](https://bugs.winehq.org/show_bug.cgi?id=38601))
|
||||
* Use random names when caching very long urls in wininet
|
||||
|
||||
|
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -21,6 +21,7 @@ wine-staging (1.7.44) UNRELEASED; urgency=low
|
||||
* Added patch to fix scaling behaviour of images and mipmap levels in
|
||||
IDirect3DTexture2_Load.
|
||||
* Added patchset to fix various upstream issues detected by Coverity.
|
||||
* Revert upstream patch which causes broken rendering in various games.
|
||||
* Removed patch to reset device state in SysKeyboard*Impl_Acquire (accepted
|
||||
upstream).
|
||||
* Removed patch to avoid creating thread queues for foreign threads in
|
||||
|
@ -260,6 +260,7 @@ patch_enable_all ()
|
||||
enable_wined3d_CSMT_Main="$1"
|
||||
enable_wined3d_DXTn="$1"
|
||||
enable_wined3d_Multisampling="$1"
|
||||
enable_wined3d_Revert_DepthStencil_Location="$1"
|
||||
enable_wined3d_Revert_PixelFormat="$1"
|
||||
enable_wined3d_UnhandledBlendFactor="$1"
|
||||
enable_wined3d_resource_check_usage="$1"
|
||||
@ -849,6 +850,9 @@ patch_enable ()
|
||||
wined3d-Multisampling)
|
||||
enable_wined3d_Multisampling="$2"
|
||||
;;
|
||||
wined3d-Revert_DepthStencil_Location)
|
||||
enable_wined3d_Revert_DepthStencil_Location="$2"
|
||||
;;
|
||||
wined3d-Revert_PixelFormat)
|
||||
enable_wined3d_Revert_PixelFormat="$2"
|
||||
;;
|
||||
@ -1650,9 +1654,13 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
|
||||
if test "$enable_wined3d_DXTn" -gt 1; then
|
||||
abort "Patchset wined3d-DXTn disabled, but wined3d-CSMT_Helper depends on that."
|
||||
fi
|
||||
if test "$enable_wined3d_Revert_DepthStencil_Location" -gt 1; then
|
||||
abort "Patchset wined3d-Revert_DepthStencil_Location disabled, but wined3d-CSMT_Helper depends on that."
|
||||
fi
|
||||
enable_makedep_PARENTSPEC=1
|
||||
enable_ntdll_DllRedirects=1
|
||||
enable_wined3d_DXTn=1
|
||||
enable_wined3d_Revert_DepthStencil_Location=1
|
||||
fi
|
||||
|
||||
if test "$enable_shell32_SHFileOperation" -eq 1; then
|
||||
@ -4986,6 +4994,21 @@ if test "$enable_wineconsole_Insert_Mode" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Revert_DepthStencil_Location
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#38654] Revert patch which causes broken rendering in various games
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/context.c, dlls/wined3d/wined3d_private.h
|
||||
# |
|
||||
if test "$enable_wined3d_Revert_DepthStencil_Location" -eq 1; then
|
||||
patch_apply wined3d-Revert_DepthStencil_Location/0001-Revert-wined3d-Allow-specifying-a-different-depth-st.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Allow specifying a different depth stencil location.\".", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-CSMT_Helper
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -5002,6 +5025,18 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-resource_check_usage
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/resource.c
|
||||
# |
|
||||
if test "$enable_wined3d_resource_check_usage" -eq 1; then
|
||||
patch_apply wined3d-resource_check_usage/0001-wined3d-Silence-repeated-resource_check_usage-FIXME.patch
|
||||
(
|
||||
echo '+ { "Erich E. Hoover", "wined3d: Silence repeated resource_check_usage FIXME.", 2 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-wined3d_swapchain_present
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -5075,18 +5110,6 @@ if test "$enable_wined3d_UnhandledBlendFactor" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-resource_check_usage
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/resource.c
|
||||
# |
|
||||
if test "$enable_wined3d_resource_check_usage" -eq 1; then
|
||||
patch_apply wined3d-resource_check_usage/0001-wined3d-Silence-repeated-resource_check_usage-FIXME.patch
|
||||
(
|
||||
echo '+ { "Erich E. Hoover", "wined3d: Silence repeated resource_check_usage FIXME.", 2 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-CSMT_Main
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -1,3 +1,4 @@
|
||||
Depends: wined3d-DXTn
|
||||
Depends: makedep-PARENTSPEC
|
||||
Depends: ntdll-DllRedirects
|
||||
Depends: wined3d-Revert_DepthStencil_Location
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6386c73e63e8227dda54e77f18fa68031c220710 Mon Sep 17 00:00:00 2001
|
||||
From 4dc10ae70ba7ad248e35fbfa456034fc40af00ba Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 20 Dec 2012 13:09:17 +0100
|
||||
Subject: wined3d: Move the framebuffer into wined3d_state
|
||||
@ -42,10 +42,10 @@ index 83136bd..f21d672 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index c492978..1c4f077 100644
|
||||
index 728a7cc..bf77b69 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -1462,6 +1462,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
@@ -1453,6 +1453,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ index c492978..1c4f077 100644
|
||||
/* Initialize the texture unit mapping to a 1:1 mapping */
|
||||
for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s)
|
||||
{
|
||||
@@ -1779,6 +1785,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
@@ -1770,6 +1776,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
out:
|
||||
device->shader_backend->shader_free_context_data(ret);
|
||||
device->adapter->fragment_pipe->free_context_data(ret);
|
||||
@ -66,7 +66,7 @@ index c492978..1c4f077 100644
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_event_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries);
|
||||
@@ -1813,6 +1820,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
@@ -1804,6 +1811,7 @@ 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);
|
||||
@ -74,7 +74,7 @@ index c492978..1c4f077 100644
|
||||
HeapFree(GetProcessHeap(), 0, context->draw_buffers);
|
||||
HeapFree(GetProcessHeap(), 0, context->blit_targets);
|
||||
device_context_remove(device, context);
|
||||
@@ -2328,7 +2336,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2318,7 +2326,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
DWORD rt_mask = 0, *cur_mask;
|
||||
UINT i;
|
||||
|
||||
@ -82,8 +82,8 @@ index c492978..1c4f077 100644
|
||||
+ if (isStateDirty(context, STATE_FRAMEBUFFER) || !wined3d_fb_equal(fb, &context->current_fb)
|
||||
|| rt_count != context->gl_info->limits.buffers)
|
||||
{
|
||||
if (!context_validate_rt_config(rt_count, rts, dsv))
|
||||
@@ -2373,6 +2381,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
if (!context_validate_rt_config(rt_count, rts, fb->depth_stencil))
|
||||
@@ -2361,6 +2369,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
rt_mask = context_generate_rt_mask_no_fbo(device,
|
||||
rt_count ? wined3d_rendertarget_view_get_surface(rts[0]) : NULL);
|
||||
}
|
||||
@ -92,7 +92,7 @@ index c492978..1c4f077 100644
|
||||
}
|
||||
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
|
||||
&& (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource)))
|
||||
@@ -2423,7 +2433,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2411,7 +2421,7 @@ 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_device *device)
|
||||
{
|
||||
const struct wined3d_state *state = &device->state;
|
||||
@ -101,7 +101,7 @@ index c492978..1c4f077 100644
|
||||
struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL];
|
||||
DWORD rt_mask, rt_mask_bits;
|
||||
unsigned int i;
|
||||
@@ -2453,7 +2463,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
@@ -2441,7 +2451,7 @@ 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)
|
||||
{
|
||||
const struct wined3d_device *device = context->swapchain->device;
|
||||
@ -110,7 +110,7 @@ index c492978..1c4f077 100644
|
||||
DWORD rt_mask = find_draw_buffers_mask(context, device);
|
||||
DWORD *cur_mask;
|
||||
|
||||
@@ -2485,6 +2495,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
@@ -2471,6 +2481,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
context_apply_draw_buffers(context, rt_mask);
|
||||
*cur_mask = rt_mask;
|
||||
}
|
||||
@ -119,7 +119,7 @@ index c492978..1c4f077 100644
|
||||
}
|
||||
|
||||
static void context_map_stage(struct wined3d_context *context, DWORD stage, DWORD unit)
|
||||
@@ -3073,7 +3085,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
|
||||
@@ -3059,7 +3071,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
|
||||
{
|
||||
const struct wined3d_state *state = &device->state;
|
||||
const struct StateEntry *state_table = context->state_table;
|
||||
@ -577,10 +577,10 @@ index f2c2f42..c6a72fc 100644
|
||||
|
||||
surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy);
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index c85508c..ebd94fe 100644
|
||||
index 93863d0..ac74620 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -1465,7 +1465,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
@@ -1500,7 +1500,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
const struct wined3d_state *state = &shader->device->state;
|
||||
const struct ps_compile_args *ps_args = ctx_priv->cur_ps_args;
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
@ -603,7 +603,7 @@ index 279ec42..18e3f0c 100644
|
||||
{
|
||||
static unsigned int warned = 0;
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 28e26ab..38277fb 100644
|
||||
index 37f4498..27cdc8a 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -105,7 +105,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
|
||||
@ -653,7 +653,7 @@ index 28e26ab..38277fb 100644
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
gl_info->gl_ops.gl.p_glStencilMask(mask);
|
||||
@@ -1763,7 +1763,7 @@ static void state_depthbias(struct wined3d_context *context, const struct wined3
|
||||
@@ -1683,7 +1683,7 @@ static void state_depthbias(struct wined3d_context *context, const struct wined3
|
||||
if (state->render_states[WINED3D_RS_SLOPESCALEDEPTHBIAS]
|
||||
|| state->render_states[WINED3D_RS_DEPTHBIAS])
|
||||
{
|
||||
@ -662,7 +662,7 @@ index 28e26ab..38277fb 100644
|
||||
float scale;
|
||||
|
||||
union
|
||||
@@ -4661,7 +4661,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
|
||||
@@ -4581,7 +4581,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
|
||||
|
||||
static void viewport_miscpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@ -671,7 +671,7 @@ index 28e26ab..38277fb 100644
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
struct wined3d_viewport vp = state->viewport;
|
||||
|
||||
@@ -4839,7 +4839,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
@@ -4759,7 +4759,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -680,7 +680,7 @@ index 28e26ab..38277fb 100644
|
||||
UINT height;
|
||||
UINT width;
|
||||
|
||||
@@ -4903,7 +4903,7 @@ static void psorigin(struct wined3d_context *context, const struct wined3d_state
|
||||
@@ -4823,7 +4823,7 @@ static void psorigin(struct wined3d_context *context, const struct wined3d_state
|
||||
|
||||
void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@ -817,7 +817,7 @@ index 1ac5e7a..454cb21 100644
|
||||
struct wined3d_context *context;
|
||||
struct wined3d_surface *front;
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index bd9b710..f486694 100644
|
||||
index 5ad82bd..5106cd5 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -3427,7 +3427,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
@ -829,7 +829,7 @@ index bd9b710..f486694 100644
|
||||
state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE;
|
||||
float z_scale = zenable ? 2.0f : 0.0f;
|
||||
float z_offset = zenable ? -1.0f : 0.0f;
|
||||
@@ -3921,7 +3921,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
@@ -3972,7 +3972,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
unsigned int i;
|
||||
DWORD ttff;
|
||||
DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2;
|
||||
@ -839,10 +839,10 @@ index bd9b710..f486694 100644
|
||||
const struct wined3d_d3d_info *d3d_info = context->d3d_info;
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 16d465f..c163ec2 100644
|
||||
index 12cbdc4..210a23d 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1127,6 +1127,36 @@ struct wined3d_timestamp_query
|
||||
@@ -1128,6 +1128,36 @@ 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;
|
||||
|
||||
@ -879,7 +879,7 @@ index 16d465f..c163ec2 100644
|
||||
struct wined3d_context
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
@@ -1141,6 +1171,7 @@ struct wined3d_context
|
||||
@@ -1142,6 +1172,7 @@ 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 */
|
||||
@ -887,7 +887,7 @@ index 16d465f..c163ec2 100644
|
||||
|
||||
struct wined3d_swapchain *swapchain;
|
||||
struct wined3d_surface *current_rt;
|
||||
@@ -1242,12 +1273,6 @@ struct wined3d_context
|
||||
@@ -1243,12 +1274,6 @@ struct wined3d_context
|
||||
GLuint dummy_arbfp_prog;
|
||||
};
|
||||
|
||||
@ -900,7 +900,7 @@ index 16d465f..c163ec2 100644
|
||||
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
|
||||
|
||||
struct StateEntry
|
||||
@@ -1931,7 +1956,7 @@ struct wined3d_stream_state
|
||||
@@ -1932,7 +1957,7 @@ struct wined3d_stream_state
|
||||
struct wined3d_state
|
||||
{
|
||||
DWORD flags;
|
||||
@ -909,7 +909,7 @@ index 16d465f..c163ec2 100644
|
||||
|
||||
struct wined3d_vertex_declaration *vertex_declaration;
|
||||
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
|
||||
@@ -2037,7 +2062,6 @@ struct wined3d_device
|
||||
@@ -2038,7 +2063,6 @@ struct wined3d_device
|
||||
struct wine_rb_tree samplers;
|
||||
|
||||
/* Render Target Support */
|
||||
@ -917,7 +917,7 @@ index 16d465f..c163ec2 100644
|
||||
struct wined3d_surface *onscreen_depth_stencil;
|
||||
struct wined3d_rendertarget_view *auto_depth_stencil_view;
|
||||
|
||||
@@ -2543,9 +2567,8 @@ struct wined3d_stateblock
|
||||
@@ -2544,9 +2568,8 @@ struct wined3d_stateblock
|
||||
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
|
||||
|
||||
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@ -929,7 +929,7 @@ index 16d465f..c163ec2 100644
|
||||
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
|
||||
struct wined3d_cs_ops
|
||||
@@ -2558,7 +2581,6 @@ struct wined3d_cs
|
||||
@@ -2559,7 +2582,6 @@ struct wined3d_cs
|
||||
{
|
||||
const struct wined3d_cs_ops *ops;
|
||||
struct wined3d_device *device;
|
||||
@ -938,5 +938,5 @@ index 16d465f..c163ec2 100644
|
||||
|
||||
size_t data_size;
|
||||
--
|
||||
2.4.0
|
||||
2.4.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b2574fe8833075c9f1c7fab68bf04dc73b749a42 Mon Sep 17 00:00:00 2001
|
||||
From 6d53bc01b8d6db32aab6c0d9e7b93c20f2a7af94 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sat, 6 Jul 2013 17:05:12 +0200
|
||||
Subject: wined3d: Access the buffer dirty areas through the CS
|
||||
@ -27,7 +27,7 @@ be protected by locks.
|
||||
3 files changed, 37 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index f4c0d07..551cc7a 100644
|
||||
index c0bbfb7..df44ae0 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -41,7 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
@ -52,10 +52,10 @@ index f4c0d07..551cc7a 100644
|
||||
if (!(buffer->flags & WINED3D_BUFFER_DOUBLEBUFFER))
|
||||
{
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 341b51c..179f2e6 100644
|
||||
index 0a246a9..b871d92 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -69,6 +69,7 @@ enum wined3d_cs_op
|
||||
@@ -70,6 +70,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_RESOURCE_MAP,
|
||||
WINED3D_CS_OP_RESOURCE_UNMAP,
|
||||
WINED3D_CS_OP_BUFFER_SWAP_MEM,
|
||||
@ -63,7 +63,7 @@ index 341b51c..179f2e6 100644
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
WINED3D_CS_OP_QUERY_DESTROY,
|
||||
WINED3D_CS_OP_UPDATE_SURFACE,
|
||||
@@ -382,6 +383,13 @@ struct wined3d_cs_buffer_swap_mem
|
||||
@@ -392,6 +393,13 @@ struct wined3d_cs_buffer_swap_mem
|
||||
BYTE *mem;
|
||||
};
|
||||
|
||||
@ -77,7 +77,7 @@ index 341b51c..179f2e6 100644
|
||||
struct wined3d_cs_skip
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -2159,6 +2167,28 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe
|
||||
@@ -2272,6 +2280,28 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ index 341b51c..179f2e6 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2206,6 +2236,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2320,6 +2350,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_RESOURCE_MAP */ wined3d_cs_exec_resource_map,
|
||||
/* WINED3D_CS_OP_RESOURCE_UNMAP */ wined3d_cs_exec_resource_unmap,
|
||||
/* WINED3D_CS_OP_BUFFER_SWAP_MEM */ wined3d_cs_exec_buffer_swap_mem,
|
||||
@ -115,10 +115,10 @@ index 341b51c..179f2e6 100644
|
||||
/* WINED3D_CS_OP_QUERY_DESTROY */ wined3d_cs_exec_query_destroy,
|
||||
/* WINED3D_CS_OP_UPDATE_SURFACE */ wined3d_cs_exec_update_surface,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 7d12df9..c683880 100644
|
||||
index efc5d2d..801c221 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2696,6 +2696,8 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
@@ -2745,6 +2745,8 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
void wined3d_cs_emit_evict_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
|
||||
BYTE *mem) DECLSPEC_HIDDEN;
|
||||
@ -127,7 +127,7 @@ index 7d12df9..c683880 100644
|
||||
|
||||
/* Direct3D terminology with little modifications. We do not have an issued state
|
||||
* because only the driver knows about it, but we have a created state because d3d
|
||||
@@ -2781,6 +2783,7 @@ void buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_context *co
|
||||
@@ -2830,6 +2832,7 @@ void buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_context *co
|
||||
BYTE *buffer_get_sysmem(struct wined3d_buffer *This, struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_context *context,
|
||||
const struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@ -136,5 +136,5 @@ index 7d12df9..c683880 100644
|
||||
struct wined3d_rendertarget_view
|
||||
{
|
||||
--
|
||||
2.1.3
|
||||
2.4.2
|
||||
|
||||
|
@ -1291,7 +1291,7 @@ diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -1462,6 +1462,7 @@
|
||||
@@ -1453,6 +1453,7 @@
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -1299,7 +1299,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
ret->current_fb.render_targets = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||
sizeof(*ret->current_fb.render_targets) * gl_info->limits.buffers);
|
||||
ret->current_fb.rt_size = gl_info->limits.buffers;
|
||||
@@ -1470,6 +1471,7 @@
|
||||
@@ -1461,6 +1462,7 @@
|
||||
if (device->context_count)
|
||||
ret->offscreenBuffer = device->contexts[0]->offscreenBuffer;
|
||||
|
||||
@ -1307,7 +1307,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)
|
||||
{
|
||||
@@ -1787,7 +1789,9 @@
|
||||
@@ -1778,7 +1780,9 @@
|
||||
out:
|
||||
device->shader_backend->shader_free_context_data(ret);
|
||||
device->adapter->fragment_pipe->free_context_data(ret);
|
||||
@ -1317,7 +1317,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);
|
||||
@@ -1822,7 +1826,9 @@
|
||||
@@ -1813,7 +1817,9 @@
|
||||
|
||||
device->shader_backend->shader_free_context_data(context);
|
||||
device->adapter->fragment_pipe->free_context_data(context);
|
||||
@ -1327,7 +1327,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);
|
||||
@@ -2230,7 +2236,11 @@
|
||||
@@ -2221,7 +2227,11 @@
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1339,7 +1339,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
const struct wined3d_rendertarget_view *depth_stencil)
|
||||
{
|
||||
@@ -2246,6 +2256,7 @@
|
||||
@@ -2237,6 +2247,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 */
|
||||
@ -1347,7 +1347,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);
|
||||
@@ -2260,6 +2271,22 @@
|
||||
@@ -2251,6 +2262,22 @@
|
||||
return context_generate_rt_mask_from_surface(rt);
|
||||
else
|
||||
return context_generate_rt_mask(context->offscreenBuffer);
|
||||
@ -1370,7 +1370,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -2291,7 +2318,11 @@
|
||||
@@ -2282,7 +2309,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1382,7 +1382,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;
|
||||
@@ -2338,7 +2369,11 @@
|
||||
@@ -2328,7 +2359,11 @@
|
||||
DWORD rt_mask = 0, *cur_mask;
|
||||
UINT i;
|
||||
|
||||
@ -1393,8 +1393,8 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
+#endif /* STAGING_CSMT */
|
||||
|| rt_count != context->gl_info->limits.buffers)
|
||||
{
|
||||
if (!context_validate_rt_config(rt_count, rts, dsv))
|
||||
@@ -2380,11 +2415,17 @@
|
||||
if (!context_validate_rt_config(rt_count, rts, fb->depth_stencil))
|
||||
@@ -2368,11 +2403,17 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1412,7 +1412,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)))
|
||||
@@ -2397,7 +2438,11 @@
|
||||
@@ -2385,7 +2426,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1424,7 +1424,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
rt_count ? wined3d_rendertarget_view_get_surface(rts[0]) : NULL);
|
||||
}
|
||||
|
||||
@@ -2432,6 +2477,7 @@
|
||||
@@ -2420,6 +2465,7 @@
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1432,7 +1432,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;
|
||||
@@ -2441,6 +2487,18 @@
|
||||
@@ -2429,6 +2475,18 @@
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO)
|
||||
return context_generate_rt_mask_no_fbo(context, wined3d_rendertarget_view_get_surface(rts[0]));
|
||||
@ -1451,7 +1451,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]));
|
||||
|
||||
@@ -2463,8 +2521,14 @@
|
||||
@@ -2451,8 +2509,14 @@
|
||||
/* Context activation is done by the caller. */
|
||||
void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@ -1466,7 +1466,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
DWORD *cur_mask;
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
@@ -2495,8 +2559,10 @@
|
||||
@@ -2481,8 +2545,10 @@
|
||||
context_apply_draw_buffers(context, rt_mask);
|
||||
*cur_mask = rt_mask;
|
||||
}
|
||||
@ -1477,7 +1477,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)
|
||||
@@ -2734,12 +2800,22 @@
|
||||
@@ -2720,12 +2786,22 @@
|
||||
/* Context activation is done by the caller. */
|
||||
void context_state_drawbuf(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@ -1500,7 +1500,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);
|
||||
@@ -2940,7 +3016,11 @@
|
||||
@@ -2926,7 +3002,11 @@
|
||||
{
|
||||
if (state->vertex_declaration->half_float_conv_needed && !stream_info->all_vbo)
|
||||
{
|
||||
@ -1512,7 +1512,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
context->use_immediate_mode_draw = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -3080,11 +3160,19 @@
|
||||
@@ -3066,11 +3146,19 @@
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@ -1532,7 +1532,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
unsigned int i, j;
|
||||
WORD map;
|
||||
|
||||
@@ -3116,12 +3204,17 @@
|
||||
@@ -3102,12 +3190,17 @@
|
||||
for (i = 0, map = context->stream_info.use_map; map; map >>= 1, ++i)
|
||||
{
|
||||
if (map & 1)
|
||||
@ -1550,7 +1550,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
}
|
||||
if (state->index_buffer)
|
||||
{
|
||||
@@ -3225,7 +3318,11 @@
|
||||
@@ -3211,7 +3304,11 @@
|
||||
if (texture->texture_srgb.name)
|
||||
wined3d_texture_load(texture, context, TRUE);
|
||||
wined3d_texture_load(texture, context, FALSE);
|
||||
|
@ -0,0 +1,235 @@
|
||||
From 6cf7705ce1a955e590a9d6a6519a81eb13e6c0e4 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 30 May 2015 20:43:19 +0200
|
||||
Subject: Revert "wined3d: Allow specifying a different depth stencil
|
||||
location."
|
||||
|
||||
This reverts commit 90d8896826043bdf8c294018acc663c5d6684935.
|
||||
---
|
||||
dlls/wined3d/context.c | 60 ++++++++++++++++--------------------------
|
||||
dlls/wined3d/wined3d_private.h | 2 +-
|
||||
2 files changed, 24 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index a68d5d5..8dbfcb1 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -276,10 +276,8 @@ void context_check_fbo_status(const struct wined3d_context *context, GLenum targ
|
||||
return;
|
||||
}
|
||||
|
||||
- FIXME("\tColor Location %s (%#x).\n", wined3d_debug_location(context->current_fbo->color_location),
|
||||
- context->current_fbo->color_location);
|
||||
- FIXME("\tDepth Stencil Location %s (%#x).\n", wined3d_debug_location(context->current_fbo->ds_location),
|
||||
- context->current_fbo->ds_location);
|
||||
+ FIXME("\tLocation %s (%#x).\n", wined3d_debug_location(context->current_fbo->location),
|
||||
+ context->current_fbo->location);
|
||||
|
||||
/* Dump the FBO attachments */
|
||||
for (i = 0; i < gl_info->limits.buffers; ++i)
|
||||
@@ -314,8 +312,7 @@ static inline DWORD context_generate_rt_mask_from_surface(const struct wined3d_s
|
||||
}
|
||||
|
||||
static struct fbo_entry *context_create_fbo_entry(const struct wined3d_context *context,
|
||||
- struct wined3d_surface **render_targets, struct wined3d_surface *depth_stencil,
|
||||
- DWORD color_location, DWORD ds_location)
|
||||
+ struct wined3d_surface **render_targets, struct wined3d_surface *depth_stencil, DWORD location)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
struct fbo_entry *entry;
|
||||
@@ -324,8 +321,7 @@ static struct fbo_entry *context_create_fbo_entry(const struct wined3d_context *
|
||||
entry->render_targets = HeapAlloc(GetProcessHeap(), 0, gl_info->limits.buffers * sizeof(*entry->render_targets));
|
||||
memcpy(entry->render_targets, render_targets, gl_info->limits.buffers * sizeof(*entry->render_targets));
|
||||
entry->depth_stencil = depth_stencil;
|
||||
- entry->color_location = color_location;
|
||||
- entry->ds_location = ds_location;
|
||||
+ entry->location = location;
|
||||
entry->rt_mask = context_generate_rt_mask(GL_COLOR_ATTACHMENT0);
|
||||
entry->attached = FALSE;
|
||||
gl_info->fbo_ops.glGenFramebuffers(1, &entry->id);
|
||||
@@ -338,7 +334,7 @@ static struct fbo_entry *context_create_fbo_entry(const struct wined3d_context *
|
||||
/* Context activation is done by the caller. */
|
||||
static void context_reuse_fbo_entry(struct wined3d_context *context, GLenum target,
|
||||
struct wined3d_surface **render_targets, struct wined3d_surface *depth_stencil,
|
||||
- DWORD color_location, DWORD ds_location, struct fbo_entry *entry)
|
||||
+ DWORD location, struct fbo_entry *entry)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
@@ -347,8 +343,7 @@ static void context_reuse_fbo_entry(struct wined3d_context *context, GLenum targ
|
||||
|
||||
memcpy(entry->render_targets, render_targets, gl_info->limits.buffers * sizeof(*entry->render_targets));
|
||||
entry->depth_stencil = depth_stencil;
|
||||
- entry->color_location = color_location;
|
||||
- entry->ds_location = ds_location;
|
||||
+ entry->location = location;
|
||||
entry->attached = FALSE;
|
||||
}
|
||||
|
||||
@@ -368,8 +363,7 @@ static void context_destroy_fbo_entry(struct wined3d_context *context, struct fb
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
static struct fbo_entry *context_find_fbo_entry(struct wined3d_context *context, GLenum target,
|
||||
- struct wined3d_surface **render_targets, struct wined3d_surface *depth_stencil,
|
||||
- DWORD color_location, DWORD ds_location)
|
||||
+ struct wined3d_surface **render_targets, struct wined3d_surface *depth_stencil, DWORD location)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
struct fbo_entry *entry;
|
||||
@@ -388,8 +382,7 @@ static struct fbo_entry *context_find_fbo_entry(struct wined3d_context *context,
|
||||
{
|
||||
if (!memcmp(entry->render_targets,
|
||||
render_targets, gl_info->limits.buffers * sizeof(*entry->render_targets))
|
||||
- && entry->depth_stencil == depth_stencil && entry->color_location == color_location
|
||||
- && entry->ds_location == ds_location)
|
||||
+ && entry->depth_stencil == depth_stencil && entry->location == location)
|
||||
{
|
||||
list_remove(&entry->entry);
|
||||
list_add_head(&context->fbo_list, &entry->entry);
|
||||
@@ -399,14 +392,14 @@ static struct fbo_entry *context_find_fbo_entry(struct wined3d_context *context,
|
||||
|
||||
if (context->fbo_entry_count < WINED3D_MAX_FBO_ENTRIES)
|
||||
{
|
||||
- entry = context_create_fbo_entry(context, render_targets, depth_stencil, color_location, ds_location);
|
||||
+ entry = context_create_fbo_entry(context, render_targets, depth_stencil, location);
|
||||
list_add_head(&context->fbo_list, &entry->entry);
|
||||
++context->fbo_entry_count;
|
||||
}
|
||||
else
|
||||
{
|
||||
entry = LIST_ENTRY(list_tail(&context->fbo_list), struct fbo_entry, entry);
|
||||
- context_reuse_fbo_entry(context, target, render_targets, depth_stencil, color_location, ds_location, entry);
|
||||
+ context_reuse_fbo_entry(context, target, render_targets, depth_stencil, location, entry);
|
||||
list_remove(&entry->entry);
|
||||
list_add_head(&context->fbo_list, &entry->entry);
|
||||
}
|
||||
@@ -434,13 +427,13 @@ static void context_apply_fbo_entry(struct wined3d_context *context, GLenum targ
|
||||
/* Apply render targets */
|
||||
for (i = 0; i < gl_info->limits.buffers; ++i)
|
||||
{
|
||||
- context_attach_surface_fbo(context, target, i, entry->render_targets[i], entry->color_location);
|
||||
+ context_attach_surface_fbo(context, target, i, entry->render_targets[i], entry->location);
|
||||
}
|
||||
|
||||
/* Apply depth targets */
|
||||
if (entry->depth_stencil)
|
||||
surface_set_compatible_renderbuffer(entry->depth_stencil, entry->render_targets[0]);
|
||||
- context_attach_depth_stencil_fbo(context, target, entry->depth_stencil, entry->ds_location);
|
||||
+ context_attach_depth_stencil_fbo(context, target, entry->depth_stencil, entry->location);
|
||||
|
||||
/* Set valid read and draw buffer bindings to satisfy pedantic pre-ES2_compatibility
|
||||
* GL contexts requirements. */
|
||||
@@ -459,8 +452,7 @@ static void context_apply_fbo_entry(struct wined3d_context *context, GLenum targ
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
static void context_apply_fbo_state(struct wined3d_context *context, GLenum target,
|
||||
- struct wined3d_surface **render_targets, struct wined3d_surface *depth_stencil,
|
||||
- DWORD color_location, DWORD ds_location)
|
||||
+ struct wined3d_surface **render_targets, struct wined3d_surface *depth_stencil, DWORD location)
|
||||
{
|
||||
struct fbo_entry *entry, *entry2;
|
||||
|
||||
@@ -475,15 +467,14 @@ static void context_apply_fbo_state(struct wined3d_context *context, GLenum targ
|
||||
context->rebind_fbo = FALSE;
|
||||
}
|
||||
|
||||
- if (color_location == WINED3D_LOCATION_DRAWABLE)
|
||||
+ if (location == WINED3D_LOCATION_DRAWABLE)
|
||||
{
|
||||
context->current_fbo = NULL;
|
||||
context_bind_fbo(context, target, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
- context->current_fbo = context_find_fbo_entry(context, target, render_targets, depth_stencil,
|
||||
- color_location, ds_location);
|
||||
+ context->current_fbo = context_find_fbo_entry(context, target, render_targets, depth_stencil, location);
|
||||
context_apply_fbo_entry(context, target, context->current_fbo);
|
||||
}
|
||||
}
|
||||
@@ -497,7 +488,7 @@ void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target
|
||||
context->blit_targets[0] = render_target;
|
||||
if (clear_size)
|
||||
memset(&context->blit_targets[1], 0, clear_size);
|
||||
- context_apply_fbo_state(context, target, context->blit_targets, depth_stencil, location, location);
|
||||
+ context_apply_fbo_state(context, target, context->blit_targets, depth_stencil, location);
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -2323,7 +2314,6 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
UINT rt_count, const struct wined3d_fb_state *fb)
|
||||
{
|
||||
struct wined3d_rendertarget_view **rts = fb->render_targets;
|
||||
- struct wined3d_rendertarget_view *dsv = fb->depth_stencil;
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
DWORD rt_mask = 0, *cur_mask;
|
||||
UINT i;
|
||||
@@ -2331,12 +2321,12 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
if (isStateDirty(context, STATE_FRAMEBUFFER) || fb != &device->fb
|
||||
|| rt_count != context->gl_info->limits.buffers)
|
||||
{
|
||||
- if (!context_validate_rt_config(rt_count, rts, dsv))
|
||||
+ if (!context_validate_rt_config(rt_count, rts, fb->depth_stencil))
|
||||
return FALSE;
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
{
|
||||
- context_validate_onscreen_formats(context, dsv);
|
||||
+ context_validate_onscreen_formats(context, fb->depth_stencil);
|
||||
|
||||
if (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource))
|
||||
{
|
||||
@@ -2352,14 +2342,12 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
++i;
|
||||
}
|
||||
context_apply_fbo_state(context, GL_FRAMEBUFFER, context->blit_targets,
|
||||
- wined3d_rendertarget_view_get_surface(dsv),
|
||||
- rt_count ? rts[0]->resource->draw_binding : 0,
|
||||
- dsv ? dsv->resource->draw_binding : 0);
|
||||
+ wined3d_rendertarget_view_get_surface(fb->depth_stencil),
|
||||
+ rt_count ? rts[0]->resource->draw_binding : WINED3D_LOCATION_TEXTURE_RGB);
|
||||
}
|
||||
else
|
||||
{
|
||||
- context_apply_fbo_state(context, GL_FRAMEBUFFER, NULL, NULL,
|
||||
- WINED3D_LOCATION_DRAWABLE, WINED3D_LOCATION_DRAWABLE);
|
||||
+ context_apply_fbo_state(context, GL_FRAMEBUFFER, NULL, NULL, WINED3D_LOCATION_DRAWABLE);
|
||||
rt_mask = context_generate_rt_mask_from_surface(wined3d_rendertarget_view_get_surface(rts[0]));
|
||||
}
|
||||
|
||||
@@ -2461,8 +2449,7 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
{
|
||||
if (!context->render_offscreen)
|
||||
{
|
||||
- context_apply_fbo_state(context, GL_FRAMEBUFFER, NULL, NULL,
|
||||
- WINED3D_LOCATION_DRAWABLE, WINED3D_LOCATION_DRAWABLE);
|
||||
+ context_apply_fbo_state(context, GL_FRAMEBUFFER, NULL, NULL, WINED3D_LOCATION_DRAWABLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2474,8 +2461,7 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
}
|
||||
context_apply_fbo_state(context, GL_FRAMEBUFFER, context->blit_targets,
|
||||
wined3d_rendertarget_view_get_surface(fb->depth_stencil),
|
||||
- fb->render_targets[0]->resource->draw_binding,
|
||||
- fb->depth_stencil ? fb->depth_stencil->resource->draw_binding : 0);
|
||||
+ fb->render_targets[0]->resource->draw_binding);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 75fc2be..142e4de 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2319,7 +2319,7 @@ struct fbo_entry
|
||||
struct list entry;
|
||||
struct wined3d_surface **render_targets;
|
||||
struct wined3d_surface *depth_stencil;
|
||||
- DWORD color_location, ds_location;
|
||||
+ DWORD location;
|
||||
DWORD rt_mask;
|
||||
BOOL attached;
|
||||
GLuint id;
|
||||
--
|
||||
2.4.2
|
||||
|
1
patches/wined3d-Revert_DepthStencil_Location/definition
Normal file
1
patches/wined3d-Revert_DepthStencil_Location/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [38654] Revert patch which causes broken rendering in various games
|
Loading…
Reference in New Issue
Block a user