You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-12-15 08:03:15 -08:00
Revert upstream patch which causes broken rendering in various games.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user