mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Rebase against 28cfa306b467abb026da1f9442bc247c4c9dc790.
This commit is contained in:
parent
6dd07ec3e7
commit
f7c96c2f6f
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "1dedd90e8c56ff61772915d575a43ad6c95813cd"
|
||||
echo "28cfa306b467abb026da1f9442bc247c4c9dc790"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 8e1386c0554f62676043789b7ce60997ffde3b6f Mon Sep 17 00:00:00 2001
|
||||
From cb9504f39ea96c130f77483275831c0435f745a2 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 2edac17..dbcbbb0 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 42f9d8b..3160d03 100644
|
||||
index e7d0121..200a899 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -1704,6 +1704,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
@@ -1705,6 +1705,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ index 42f9d8b..3160d03 100644
|
||||
/* Initialize the texture unit mapping to a 1:1 mapping */
|
||||
for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s)
|
||||
{
|
||||
@@ -2012,6 +2017,7 @@ out:
|
||||
@@ -2013,6 +2018,7 @@ 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);
|
||||
@ -65,7 +65,7 @@ index 42f9d8b..3160d03 100644
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_event_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries);
|
||||
@@ -2059,6 +2065,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
@@ -2060,6 +2066,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);
|
||||
HeapFree(GetProcessHeap(), 0, context->fbo_key);
|
||||
@ -73,7 +73,7 @@ index 42f9d8b..3160d03 100644
|
||||
HeapFree(GetProcessHeap(), 0, context->draw_buffers);
|
||||
HeapFree(GetProcessHeap(), 0, context->blit_targets);
|
||||
device_context_remove(device, context);
|
||||
@@ -2613,7 +2620,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2614,7 +2621,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
DWORD rt_mask = 0, *cur_mask;
|
||||
UINT i;
|
||||
|
||||
@ -82,7 +82,7 @@ index 42f9d8b..3160d03 100644
|
||||
|| rt_count != gl_info->limits.buffers)
|
||||
{
|
||||
if (!context_validate_rt_config(rt_count, rts, dsv))
|
||||
@@ -2658,6 +2665,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2659,6 +2666,8 @@ 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);
|
||||
}
|
||||
@ -91,7 +91,7 @@ index 42f9d8b..3160d03 100644
|
||||
}
|
||||
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
|
||||
&& (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource)))
|
||||
@@ -2715,7 +2724,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2716,7 +2725,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_state *state)
|
||||
{
|
||||
@ -100,7 +100,7 @@ index 42f9d8b..3160d03 100644
|
||||
struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL];
|
||||
DWORD rt_mask, rt_mask_bits;
|
||||
unsigned int i;
|
||||
@@ -2745,7 +2754,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
@@ -2746,7 +2755,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)
|
||||
{
|
||||
DWORD rt_mask = find_draw_buffers_mask(context, state);
|
||||
@ -109,7 +109,7 @@ index 42f9d8b..3160d03 100644
|
||||
DWORD *cur_mask;
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
@@ -3034,6 +3043,8 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d
|
||||
@@ -3035,6 +3044,8 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d
|
||||
context_apply_draw_buffers(context, rt_mask);
|
||||
*cur_mask = rt_mask;
|
||||
}
|
||||
@ -118,7 +118,7 @@ index 42f9d8b..3160d03 100644
|
||||
}
|
||||
|
||||
static BOOL fixed_get_input(BYTE usage, BYTE usage_idx, unsigned int *regnum)
|
||||
@@ -3408,7 +3419,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
|
||||
@@ -3409,7 +3420,7 @@ 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;
|
||||
@ -607,7 +607,7 @@ index e5b30db..1188009 100644
|
||||
struct wined3d_event_query *ib_query = NULL;
|
||||
struct wined3d_stream_info si_emulated;
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 892b582..8b9485d 100644
|
||||
index 7befe07..d594362 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -1514,7 +1514,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
@ -620,7 +620,7 @@ index 892b582..8b9485d 100644
|
||||
0.0f,
|
||||
0.0f,
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
index 4455416..48d53a3 100644
|
||||
index 61509d9..a2fb749 100644
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -3066,7 +3066,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
@ -633,7 +633,7 @@ index 4455416..48d53a3 100644
|
||||
static unsigned int warned = 0;
|
||||
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 50e65c2..315e670 100644
|
||||
index 5776995..d3dd978 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -152,7 +152,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
|
||||
@ -717,7 +717,7 @@ index 50e65c2..315e670 100644
|
||||
+ const struct wined3d_rendertarget_view *target = state->fb.render_targets[0];
|
||||
/* See get_projection_matrix() in utils.c for a discussion about those
|
||||
* values. */
|
||||
float pixel_center_offset = context->device->wined3d->flags
|
||||
float pixel_center_offset = context->d3d_info->wined3d_creation_flags
|
||||
@@ -4858,7 +4858,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
}
|
||||
else
|
||||
@ -837,7 +837,7 @@ index 2fbfa2c..bb3c0cc 100644
|
||||
if (type == WINED3D_SBT_RECORDED)
|
||||
return WINED3D_OK;
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 4991928..a2bab0c 100644
|
||||
index e4a430c..1701b2d 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -2568,7 +2568,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
@ -863,7 +863,7 @@ index d5478f4..f649b2f 100644
|
||||
struct wined3d_texture *logo_texture;
|
||||
struct wined3d_context *context;
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index bf366d3..2c8409c 100644
|
||||
index e2959bb..8427e37 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -4532,7 +4532,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
@ -885,7 +885,7 @@ index bf366d3..2c8409c 100644
|
||||
|| !state->render_states[WINED3D_RS_CLIPPLANEENABLE])
|
||||
{
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 9d40df6..ec14ea5 100644
|
||||
index 6d5cb1b..a74a988 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1447,6 +1447,36 @@ struct wined3d_timestamp_query
|
||||
|
@ -467,7 +467,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
|
||||
@@ -1704,6 +1704,13 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
@@ -1705,6 +1705,13 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -481,7 +481,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)
|
||||
{
|
||||
@@ -2012,6 +2019,9 @@ out:
|
||||
@@ -2013,6 +2020,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);
|
||||
@ -491,7 +491,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);
|
||||
@@ -2059,6 +2069,9 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
@@ -2060,6 +2070,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);
|
||||
@ -501,7 +501,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);
|
||||
@@ -2604,7 +2617,11 @@ static BOOL context_validate_rt_config(UINT rt_count, struct wined3d_rendertarge
|
||||
@@ -2605,7 +2618,11 @@ static BOOL context_validate_rt_config(UINT rt_count, struct wined3d_rendertarge
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@ -513,7 +513,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;
|
||||
@@ -2613,7 +2630,11 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2614,7 +2631,11 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
DWORD rt_mask = 0, *cur_mask;
|
||||
UINT i;
|
||||
|
||||
@ -525,7 +525,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))
|
||||
@@ -2658,6 +2679,10 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2659,6 +2680,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);
|
||||
}
|
||||
@ -536,7 +536,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)))
|
||||
@@ -2698,7 +2723,12 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2699,7 +2724,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])
|
||||
{
|
||||
@ -549,7 +549,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);
|
||||
@@ -2715,7 +2745,11 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2716,7 +2746,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)
|
||||
{
|
||||
@ -561,7 +561,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;
|
||||
@@ -2745,7 +2779,11 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
@@ -2746,7 +2780,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);
|
||||
@ -573,7 +573,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
DWORD *cur_mask;
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
@@ -3034,6 +3072,10 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d
|
||||
@@ -3035,6 +3073,10 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d
|
||||
context_apply_draw_buffers(context, rt_mask);
|
||||
*cur_mask = rt_mask;
|
||||
}
|
||||
@ -584,7 +584,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)
|
||||
@@ -3408,7 +3450,11 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
|
||||
@@ -3409,7 +3451,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;
|
||||
@ -596,7 +596,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
unsigned int i;
|
||||
WORD map;
|
||||
|
||||
@@ -3441,8 +3487,17 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
|
||||
@@ -3442,8 +3488,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)
|
||||
@ -614,7 +614,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
}
|
||||
if (state->index_buffer)
|
||||
{
|
||||
@@ -3562,6 +3617,11 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str
|
||||
@@ -3563,6 +3618,11 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str
|
||||
|
||||
TRACE("device %p, target %p.\n", device, target);
|
||||
|
||||
@ -5532,7 +5532,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
+#endif /* STAGING_CSMT */
|
||||
/* See get_projection_matrix() in utils.c for a discussion about those
|
||||
* values. */
|
||||
float pixel_center_offset = context->device->wined3d->flags
|
||||
float pixel_center_offset = context->d3d_info->wined3d_creation_flags
|
||||
@@ -4858,7 +4900,11 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
}
|
||||
else
|
||||
@ -6256,7 +6256,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
static HRESULT ffp_blit_alloc(struct wined3d_device *device) { return WINED3D_OK; }
|
||||
@@ -3615,16 +3847,41 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
|
||||
@@ -3617,16 +3849,41 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
|
||||
const BYTE *sbuf;
|
||||
BYTE *dbuf;
|
||||
int x, y;
|
||||
@ -6298,7 +6298,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
src_map = dst_map;
|
||||
src_format = dst_texture->resource.format;
|
||||
dst_format = src_format;
|
||||
@@ -3649,7 +3906,20 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
|
||||
@@ -3651,7 +3908,20 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
|
||||
src_texture = converted_texture;
|
||||
src_sub_resource_idx = 0;
|
||||
}
|
||||
@ -6319,7 +6319,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
src_format = src_texture->resource.format;
|
||||
src_fmt_flags = src_texture->resource.format_flags;
|
||||
}
|
||||
@@ -3659,7 +3929,17 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
|
||||
@@ -3661,7 +3931,17 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
|
||||
src_fmt_flags = dst_fmt_flags;
|
||||
}
|
||||
|
||||
@ -6337,7 +6337,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
bpp = dst_format->byte_count;
|
||||
@@ -3673,12 +3953,18 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
|
||||
@@ -3675,12 +3955,18 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
|
||||
sbase = (BYTE *)src_map.data
|
||||
+ ((src_box->top / src_format->block_height) * src_map.row_pitch)
|
||||
+ ((src_box->left / src_format->block_width) * src_format->block_byte_count);
|
||||
@ -6356,7 +6356,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
|
||||
if (src_fmt_flags & dst_fmt_flags & WINED3DFMT_FLAG_BLOCKS)
|
||||
{
|
||||
@@ -4071,16 +4357,42 @@ do { \
|
||||
@@ -4073,16 +4359,42 @@ do { \
|
||||
}
|
||||
}
|
||||
|
||||
@ -6399,7 +6399,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -4125,7 +4437,11 @@ const struct blit_shader cpu_blit = {
|
||||
@@ -4127,7 +4439,11 @@ const struct blit_shader cpu_blit = {
|
||||
cpu_blit_blit_surface,
|
||||
};
|
||||
|
||||
@ -6411,7 +6411,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
|
||||
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
|
||||
{
|
||||
@@ -4135,9 +4451,14 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4137,9 +4453,14 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
struct wined3d_texture *dst_texture = dst_surface->container;
|
||||
struct wined3d_device *device = dst_texture->resource.device;
|
||||
struct wined3d_swapchain *src_swapchain, *dst_swapchain;
|
||||
@ -6426,7 +6426,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
DWORD src_ds_flags, dst_ds_flags;
|
||||
BOOL scale, convert;
|
||||
|
||||
@@ -4150,6 +4471,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4152,6 +4473,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
| WINED3D_BLT_DO_NOT_WAIT
|
||||
| WINED3D_BLT_ALPHA_TEST;
|
||||
|
||||
@ -6434,7 +6434,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n",
|
||||
dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect),
|
||||
flags, fx, debug_d3dtexturefiltertype(filter));
|
||||
@@ -4167,10 +4489,12 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4169,10 +4491,12 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
fx->src_color_key.color_space_high_value);
|
||||
}
|
||||
|
||||
@ -6447,7 +6447,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
if (dst_texture->sub_resources[dst_sub_resource_idx].map_count
|
||||
@@ -4228,6 +4552,15 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4230,6 +4554,15 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
if (!once++)
|
||||
FIXME("Can't handle WINED3D_BLT_DO_NOT_WAIT flag.\n");
|
||||
flags &= ~WINED3D_BLT_DO_NOT_WAIT;
|
||||
@ -6463,7 +6463,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
if (!device->d3d_initialized)
|
||||
@@ -4252,11 +4585,13 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4254,11 +4587,13 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
goto fallback;
|
||||
}
|
||||
|
||||
@ -6477,7 +6477,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
dst_swapchain = dst_texture->swapchain;
|
||||
|
||||
/* This isn't strictly needed. FBO blits for example could deal with
|
||||
@@ -4292,13 +4627,21 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4294,13 +4629,21 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
TRACE("Depth fill.\n");
|
||||
|
||||
if (!surface_convert_depth_to_float(dst_surface, fx->fill_color, &depth))
|
||||
@ -6499,7 +6499,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
if (src_ds_flags != dst_ds_flags)
|
||||
{
|
||||
WARN("Rejecting depth / stencil blit between incompatible formats.\n");
|
||||
@@ -4308,6 +4651,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4310,6 +4653,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
if (SUCCEEDED(wined3d_surface_depth_blt(src_surface, src_texture->resource.draw_binding,
|
||||
src_rect, dst_surface, dst_texture->resource.draw_binding, dst_rect)))
|
||||
return WINED3D_OK;
|
||||
@ -6511,7 +6511,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -4343,7 +4691,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4345,7 +4693,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
goto fallback;
|
||||
|
||||
if (SUCCEEDED(surface_color_fill(dst_surface, dst_rect, &color)))
|
||||
@ -6523,7 +6523,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4386,7 +4738,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4388,7 +4740,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
context, dst_texture->resource.draw_binding);
|
||||
context_release(context);
|
||||
}
|
||||
@ -6535,7 +6535,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4410,7 +4766,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4412,7 +4768,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, 0);
|
||||
dst_swapchain->desc.swap_effect = swap_effect;
|
||||
|
||||
@ -6547,7 +6547,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
if (fbo_blit_supported(&device->adapter->gl_info, blit_op,
|
||||
@@ -4431,7 +4791,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4433,7 +4793,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
wined3d_texture_invalidate_location(dst_texture, dst_sub_resource_idx,
|
||||
~dst_texture->resource.draw_binding);
|
||||
|
||||
@ -6559,7 +6559,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
|
||||
blitter = wined3d_select_blitter(&device->adapter->gl_info, &device->adapter->d3d_info, blit_op,
|
||||
@@ -4441,7 +4805,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4443,7 +4807,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
{
|
||||
blitter->blit_surface(device, blit_op, filter, src_surface,
|
||||
src_rect, dst_surface, dst_rect, color_key);
|
||||
@ -6571,7 +6571,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4449,9 +4817,156 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4451,9 +4819,156 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
fallback:
|
||||
/* Special cases for render targets. */
|
||||
if (SUCCEEDED(surface_blt_special(dst_surface, dst_rect, src_surface, src_rect, flags, fx, filter)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user