Rebase against 417e94f19936c738a274a2ae879fc6c17db113e1

This commit is contained in:
Alistair Leslie-Hughes 2018-10-19 10:06:11 +11:00
parent 8519a9eaf6
commit 20f1d05973
2 changed files with 30 additions and 30 deletions

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "e55aca8f498536af974a031c2e9a4d905de9a7cf"
echo "417e94f19936c738a274a2ae879fc6c17db113e1"
}
# Show version information

View File

@ -1,4 +1,4 @@
From bc274efa29b8d384aa2945c8703cefa3a60820e4 Mon Sep 17 00:00:00 2001
From 4044faddca34f8d7a8813e8ae35f7481de637c84 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 20 Jul 2017 13:50:07 +0200
Subject: [PATCH] wined3d: Implement all 8 d3d11 color write masks.
@ -17,7 +17,7 @@ Subject: [PATCH] wined3d: Implement all 8 d3d11 color write masks.
10 files changed, 73 insertions(+), 71 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 157ff03..753efde 100644
index e4c2c80..176df88 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -702,6 +702,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
@ -29,8 +29,8 @@ index 157ff03..753efde 100644
TRACE("iface %p, blend_state %p, blend_factor %s, sample_mask 0x%08x.\n",
iface, blend_state, debug_float4(blend_factor), sample_mask);
@@ -716,14 +717,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
{
wined3d_device_set_blend_state(device->wined3d_device, NULL);
wined3d_device_set_blend_state(device->wined3d_device, NULL,
(const struct wined3d_color *)blend_factor);
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_ALPHABLENDENABLE, FALSE);
- wined3d_device_set_render_state(device->wined3d_device,
- WINED3D_RS_COLORWRITEENABLE, D3D11_COLOR_WRITE_ENABLE_ALL);
@ -48,9 +48,9 @@ index 157ff03..753efde 100644
wined3d_mutex_unlock();
return;
}
@@ -751,14 +749,13 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
|| d->DestBlendAlpha == D3D11_BLEND_BLEND_FACTOR || d->DestBlendAlpha == D3D11_BLEND_INV_BLEND_FACTOR))
FIXME("Ignoring blend factor %s.\n", debug_float4(blend_factor));
@@ -745,14 +743,13 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11Devi
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_DESTBLENDALPHA, d->DestBlendAlpha);
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_BLENDOPALPHA, d->BlendOpAlpha);
}
- wined3d_device_set_render_state(device->wined3d_device,
- WINED3D_RS_COLORWRITEENABLE, desc->RenderTarget[0].RenderTargetWriteMask);
@ -121,7 +121,7 @@ index 8199afa..ec8adbf 100644
wined3d_rendertarget_view_load_location(rtv, context, rtv->resource->draw_binding);
wined3d_rendertarget_view_invalidate_location(rtv, ~rtv->resource->draw_binding);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index abb2a89..02b1454 100644
index b50d667..7d9e40c 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -392,10 +392,8 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
@ -138,10 +138,10 @@ index abb2a89..02b1454 100644
checkGLcall("glClearColor");
clear_mask = clear_mask | GL_COLOR_BUFFER_BIT;
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 375bc65..c89e50a 100644
index fc076bb..65c1993 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -1555,9 +1555,6 @@ static void state_debug_monitor(struct wined3d_context *context, const struct wi
@@ -1554,9 +1554,6 @@ static void state_debug_monitor(struct wined3d_context *context, const struct wi
static void state_colorwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
DWORD mask0 = state->render_states[WINED3D_RS_COLORWRITEENABLE];
@ -151,7 +151,7 @@ index 375bc65..c89e50a 100644
const struct wined3d_gl_info *gl_info = context->gl_info;
TRACE("Color mask: r(%d) g(%d) b(%d) a(%d)\n",
@@ -1571,13 +1568,7 @@ static void state_colorwrite(struct wined3d_context *context, const struct wined
@@ -1570,13 +1567,7 @@ static void state_colorwrite(struct wined3d_context *context, const struct wined
mask0 & WINED3DCOLORWRITEENABLE_ALPHA ? GL_TRUE : GL_FALSE);
checkGLcall("glColorMask(...)");
@ -166,7 +166,7 @@ index 375bc65..c89e50a 100644
}
static void set_color_mask(const struct wined3d_gl_info *gl_info, UINT index, DWORD mask)
@@ -1590,24 +1581,20 @@ static void set_color_mask(const struct wined3d_gl_info *gl_info, UINT index, DW
@@ -1589,24 +1580,20 @@ static void set_color_mask(const struct wined3d_gl_info *gl_info, UINT index, DW
checkGLcall("glColorMaski");
}
@ -201,7 +201,7 @@ index 375bc65..c89e50a 100644
}
static void state_localviewer(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
@@ -4677,18 +4664,26 @@ const struct StateEntryTemplate misc_state_template[] =
@@ -4678,18 +4665,26 @@ const struct StateEntryTemplate misc_state_template[] =
{ STATE_RENDER(WINED3D_RS_MULTISAMPLEANTIALIAS), { STATE_RENDER(WINED3D_RS_MULTISAMPLEANTIALIAS), state_msaa_w }, WINED3D_GL_EXT_NONE },
{ STATE_RENDER(WINED3D_RS_MULTISAMPLEMASK), { STATE_RENDER(WINED3D_RS_MULTISAMPLEMASK), state_multisampmask }, WINED3D_GL_EXT_NONE },
{ STATE_RENDER(WINED3D_RS_DEBUGMONITORTOKEN), { STATE_RENDER(WINED3D_RS_DEBUGMONITORTOKEN), state_debug_monitor }, WINED3D_GL_EXT_NONE },
@ -232,14 +232,14 @@ index 375bc65..c89e50a 100644
- { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE2), { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE), NULL }, WINED3D_GL_EXT_NONE },
- { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE3), { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE3), state_colorwrite3 }, EXT_DRAW_BUFFERS2 },
- { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE3), { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE), NULL }, WINED3D_GL_EXT_NONE },
{ STATE_RENDER(WINED3D_RS_BLENDFACTOR), { STATE_RENDER(WINED3D_RS_BLENDFACTOR), state_blendfactor }, EXT_BLEND_COLOR },
{ STATE_RENDER(WINED3D_RS_BLENDFACTOR), { STATE_RENDER(WINED3D_RS_BLENDFACTOR), state_blendfactor_w }, WINED3D_GL_EXT_NONE },
{ STATE_RENDER(WINED3D_RS_DEPTHBIAS), { STATE_RENDER(WINED3D_RS_DEPTHBIAS), state_depthbias }, WINED3D_GL_EXT_NONE },
{ STATE_RENDER(WINED3D_RS_ZVISIBLE), { STATE_RENDER(WINED3D_RS_ZVISIBLE), state_zvisible }, WINED3D_GL_EXT_NONE },
/* Samplers */
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 45a4008..0a6b10f 100644
index 0b2ce50..7634ccc 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -45,6 +45,10 @@ static const DWORD pixel_states_render[] =
@@ -44,6 +44,10 @@ static const DWORD pixel_states_render[] =
WINED3D_RS_COLORWRITEENABLE1,
WINED3D_RS_COLORWRITEENABLE2,
WINED3D_RS_COLORWRITEENABLE3,
@ -250,7 +250,7 @@ index 45a4008..0a6b10f 100644
WINED3D_RS_DEPTHBIAS,
WINED3D_RS_DESTBLEND,
WINED3D_RS_DESTBLENDALPHA,
@@ -1226,7 +1230,6 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
@@ -1245,7 +1249,6 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
tmpfloat.f = d3d_info->limits.pointsize_max;
state->render_states[WINED3D_RS_POINTSIZE_MAX] = tmpfloat.d;
state->render_states[WINED3D_RS_INDEXEDVERTEXBLENDENABLE] = FALSE;
@ -258,17 +258,17 @@ index 45a4008..0a6b10f 100644
tmpfloat.f = 0.0f;
state->render_states[WINED3D_RS_TWEENFACTOR] = tmpfloat.d;
state->render_states[WINED3D_RS_BLENDOP] = WINED3D_BLEND_OP_ADD;
@@ -1252,9 +1255,6 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
@@ -1271,9 +1274,6 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
state->render_states[WINED3D_RS_BACK_STENCILZFAIL] = WINED3D_STENCIL_OP_KEEP;
state->render_states[WINED3D_RS_BACK_STENCILPASS] = WINED3D_STENCIL_OP_KEEP;
state->render_states[WINED3D_RS_BACK_STENCILFUNC] = WINED3D_CMP_ALWAYS;
- state->render_states[WINED3D_RS_COLORWRITEENABLE1] = 0x0000000f;
- state->render_states[WINED3D_RS_COLORWRITEENABLE2] = 0x0000000f;
- state->render_states[WINED3D_RS_COLORWRITEENABLE3] = 0x0000000f;
state->render_states[WINED3D_RS_BLENDFACTOR] = 0xffffffff;
state->render_states[WINED3D_RS_SRGBWRITEENABLE] = 0;
state->render_states[WINED3D_RS_DEPTHBIAS] = 0;
@@ -1270,6 +1270,8 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
state->render_states[WINED3D_RS_WRAP8] = 0;
@@ -1288,6 +1288,8 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
state->render_states[WINED3D_RS_SRCBLENDALPHA] = WINED3D_BLEND_ONE;
state->render_states[WINED3D_RS_DESTBLENDALPHA] = WINED3D_BLEND_ZERO;
state->render_states[WINED3D_RS_BLENDOPALPHA] = WINED3D_BLEND_OP_ADD;
@ -303,10 +303,10 @@ index 71693ad..c54e4d5 100644
gl_info->gl_ops.gl.p_glDisable(GL_SCISSOR_TEST);
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE));
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index e3df24a..7dbf960 100644
index 9ddfd5c..eb1e81a 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -4693,7 +4693,6 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
@@ -4739,7 +4739,6 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
D3DSTATE_TO_STR(WINED3D_RS_DEBUGMONITORTOKEN);
D3DSTATE_TO_STR(WINED3D_RS_POINTSIZE_MAX);
D3DSTATE_TO_STR(WINED3D_RS_INDEXEDVERTEXBLENDENABLE);
@ -314,7 +314,7 @@ index e3df24a..7dbf960 100644
D3DSTATE_TO_STR(WINED3D_RS_TWEENFACTOR);
D3DSTATE_TO_STR(WINED3D_RS_BLENDOP);
D3DSTATE_TO_STR(WINED3D_RS_POSITIONDEGREE);
@@ -4713,9 +4712,14 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
@@ -4759,9 +4758,14 @@ const char *debug_d3drenderstate(enum wined3d_render_state state)
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILZFAIL);
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILPASS);
D3DSTATE_TO_STR(WINED3D_RS_BACK_STENCILFUNC);
@ -326,11 +326,11 @@ index e3df24a..7dbf960 100644
+ D3DSTATE_TO_STR(WINED3D_RS_COLORWRITEENABLE5);
+ D3DSTATE_TO_STR(WINED3D_RS_COLORWRITEENABLE6);
+ D3DSTATE_TO_STR(WINED3D_RS_COLORWRITEENABLE7);
D3DSTATE_TO_STR(WINED3D_RS_BLENDFACTOR);
D3DSTATE_TO_STR(WINED3D_RS_SRGBWRITEENABLE);
D3DSTATE_TO_STR(WINED3D_RS_DEPTHBIAS);
D3DSTATE_TO_STR(WINED3D_RS_WRAP8);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 20e626c..dc4ab10 100644
index d5bf612..9f9b966 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -266,6 +266,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
@ -342,10 +342,10 @@ index 20e626c..dc4ab10 100644
struct min_lookup
{
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index c62d364..4247124 100644
index 95549e9..a3dd0e7 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -403,8 +403,20 @@ enum wined3d_render_state
@@ -402,8 +402,20 @@ enum wined3d_render_state
WINED3D_RS_SRCBLENDALPHA = 207,
WINED3D_RS_DESTBLENDALPHA = 208,
WINED3D_RS_BLENDOPALPHA = 209,
@ -368,5 +368,5 @@ index c62d364..4247124 100644
enum wined3d_blend
{
--
2.7.4
1.9.1