mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
wined3d-Dual_Source_Blending: Update patchset.
This commit is contained in:
parent
a231c76ff4
commit
9f619e92e8
@ -1,4 +1,4 @@
|
||||
From ca21ad9fba3f8b30d42f8a69d72ccd4c75c9538a Mon Sep 17 00:00:00 2001
|
||||
From acba6f8004815b8791856edf61c9591ad73e152b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 18 Aug 2017 23:51:59 +0200
|
||||
Subject: wined3d: Implement dual source blending.
|
||||
@ -9,15 +9,15 @@ Subject: wined3d: Implement dual source blending.
|
||||
dlls/wined3d/directx.c | 10 ++++++++++
|
||||
dlls/wined3d/glsl_shader.c | 45 ++++++++++++++++++++++++++++++++----------
|
||||
dlls/wined3d/shader.c | 2 ++
|
||||
dlls/wined3d/state.c | 12 ++++++++++-
|
||||
dlls/wined3d/state.c | 14 +++++++++++--
|
||||
dlls/wined3d/wined3d_private.h | 24 ++++++++++++++++++++--
|
||||
7 files changed, 90 insertions(+), 15 deletions(-)
|
||||
7 files changed, 91 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index 4b956259462..c2192717eee 100644
|
||||
index fbc802b7aca..ce204bd3a0e 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -21397,7 +21397,7 @@ static void test_dual_blending(void)
|
||||
@@ -21580,7 +21580,7 @@ static void test_dual_blending(void)
|
||||
ID3D11DeviceContext_ClearRenderTargetView(context, rtv[1], white);
|
||||
ID3D11DeviceContext_Draw(context, 3, 0);
|
||||
|
||||
@ -49,10 +49,10 @@ index a2c0ba4080c..2ef75cf458b 100644
|
||||
i = 0;
|
||||
while (rt_mask_bits)
|
||||
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
|
||||
index 962485b688a..bfd64b8f73c 100644
|
||||
index baf6d810161..5576101f409 100644
|
||||
--- a/dlls/wined3d/directx.c
|
||||
+++ b/dlls/wined3d/directx.c
|
||||
@@ -3500,6 +3500,12 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
|
||||
@@ -3502,6 +3502,12 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
|
||||
gl_info->limits.buffers = gl_max;
|
||||
TRACE("Max draw buffers: %u.\n", gl_max);
|
||||
}
|
||||
@ -65,7 +65,7 @@ index 962485b688a..bfd64b8f73c 100644
|
||||
if (gl_info->supported[ARB_MULTITEXTURE])
|
||||
{
|
||||
if (gl_info->supported[WINED3D_GL_LEGACY_CONTEXT])
|
||||
@@ -4261,6 +4267,10 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
|
||||
@@ -4265,6 +4271,10 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
|
||||
for (i = 0; i < gl_info->limits.buffers; ++i)
|
||||
adapter->d3d_info.valid_rt_mask |= (1u << i);
|
||||
|
||||
@ -77,7 +77,7 @@ index 962485b688a..bfd64b8f73c 100644
|
||||
{
|
||||
/* We do not want to deal with re-creating immutable texture storage for color keying emulation. */
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index eb6e539ed9d..8c9fae7432f 100644
|
||||
index 04e2b734163..33f179170a2 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -2887,6 +2887,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register *
|
||||
@ -88,7 +88,7 @@ index eb6e539ed9d..8c9fae7432f 100644
|
||||
if (reg->idx[0].offset >= gl_info->limits.buffers)
|
||||
WARN("Write to render target %u, only %d supported.\n",
|
||||
reg->idx[0].offset, gl_info->limits.buffers);
|
||||
@@ -7384,11 +7385,23 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context
|
||||
@@ -7396,11 +7397,23 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context
|
||||
|
||||
if (!needs_legacy_glsl_syntax(gl_info))
|
||||
{
|
||||
@ -116,7 +116,7 @@ index eb6e539ed9d..8c9fae7432f 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9917,13 +9930,25 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
|
||||
@@ -9929,13 +9942,25 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
|
||||
|
||||
if (!needs_legacy_glsl_syntax(gl_info))
|
||||
{
|
||||
@ -149,10 +149,10 @@ index eb6e539ed9d..8c9fae7432f 100644
|
||||
}
|
||||
}
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
index 8ed2cb9ed97..be25be3c093 100644
|
||||
index 02880b0339f..06f8b0a5e74 100644
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -3916,6 +3916,8 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
@@ -3937,6 +3937,8 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
|
||||
args->render_offscreen = shader->reg_maps.vpos && gl_info->supported[ARB_FRAGMENT_COORD_CONVENTIONS]
|
||||
? context->render_offscreen : 0;
|
||||
@ -162,10 +162,10 @@ index 8ed2cb9ed97..be25be3c093 100644
|
||||
|
||||
static HRESULT pixel_shader_init(struct wined3d_shader *shader, struct wined3d_device *device,
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 53be418a623..c9148a51d40 100644
|
||||
index 53be418a623..466db666fd0 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -472,10 +472,13 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st
|
||||
@@ -472,12 +472,14 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st
|
||||
const struct wined3d_format *rt_format;
|
||||
GLenum src_blend, dst_blend;
|
||||
unsigned int rt_fmt_flags;
|
||||
@ -178,9 +178,11 @@ index 53be418a623..c9148a51d40 100644
|
||||
+
|
||||
+ if (enable_blend && !enable_dual_blend)
|
||||
{
|
||||
rt_format = state->fb->render_targets[0]->format;
|
||||
- rt_format = state->fb->render_targets[0]->format;
|
||||
rt_fmt_flags = state->fb->render_targets[0]->format_flags;
|
||||
@@ -487,6 +490,13 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st
|
||||
|
||||
/* Disable blending in all cases even without pixelshaders.
|
||||
@@ -487,6 +489,13 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st
|
||||
enable_blend = FALSE;
|
||||
}
|
||||
|
||||
@ -194,8 +196,16 @@ index 53be418a623..c9148a51d40 100644
|
||||
if (!enable_blend)
|
||||
{
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_BLEND);
|
||||
@@ -497,6 +506,7 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_BLEND);
|
||||
checkGLcall("glEnable(GL_BLEND)");
|
||||
|
||||
+ rt_format = state->fb->render_targets[0]->format;
|
||||
gl_blend_from_d3d(&src_blend, &dst_blend,
|
||||
state->render_states[WINED3D_RS_SRCBLEND],
|
||||
state->render_states[WINED3D_RS_DESTBLEND], rt_format);
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 74043d0a102..e1a764a0f35 100644
|
||||
index 4fca08dbdb7..2d30d748393 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -191,6 +191,7 @@ struct wined3d_d3d_info
|
||||
@ -206,7 +216,7 @@ index 74043d0a102..e1a764a0f35 100644
|
||||
DWORD wined3d_creation_flags;
|
||||
BOOL shader_double_precision;
|
||||
};
|
||||
@@ -1337,7 +1338,8 @@ struct ps_compile_args {
|
||||
@@ -1339,7 +1340,8 @@ struct ps_compile_args {
|
||||
DWORD flatshading : 1;
|
||||
DWORD alpha_test_func : 3;
|
||||
DWORD render_offscreen : 1;
|
||||
@ -216,7 +226,7 @@ index 74043d0a102..e1a764a0f35 100644
|
||||
};
|
||||
|
||||
enum fog_src_type {
|
||||
@@ -1859,7 +1861,8 @@ struct wined3d_context
|
||||
@@ -1861,7 +1863,8 @@ struct wined3d_context
|
||||
DWORD destroy_delayed : 1;
|
||||
DWORD transform_feedback_active : 1;
|
||||
DWORD transform_feedback_paused : 1;
|
||||
@ -226,7 +236,7 @@ index 74043d0a102..e1a764a0f35 100644
|
||||
DWORD last_swizzle_map; /* MAX_ATTRIBS, 16 */
|
||||
DWORD shader_update_mask;
|
||||
DWORD constant_update_mask;
|
||||
@@ -2463,6 +2466,7 @@ struct wined3d_fbo_ops
|
||||
@@ -2465,6 +2468,7 @@ struct wined3d_fbo_ops
|
||||
struct wined3d_gl_limits
|
||||
{
|
||||
UINT buffers;
|
||||
@ -234,7 +244,7 @@ index 74043d0a102..e1a764a0f35 100644
|
||||
UINT lights;
|
||||
UINT textures;
|
||||
UINT texture_coords;
|
||||
@@ -2797,6 +2801,22 @@ struct wined3d_state
|
||||
@@ -2799,6 +2803,22 @@ struct wined3d_state
|
||||
struct wined3d_rasterizer_state *rasterizer_state;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user