mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Rebase against c43998cb51c53ab9c355c2ff37489d51f9009e2d.
This commit is contained in:
parent
36b8b8cc65
commit
53b02cd0ee
@ -1,4 +1,4 @@
|
||||
From da87296baa62ed82f5334236ef9b259aac818e5d Mon Sep 17 00:00:00 2001
|
||||
From 2097fbe83a66a3a423bdd148ecfc4f16c1237110 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Wed, 29 Jul 2015 17:09:50 +0200
|
||||
Subject: [PATCH] ddraw: Create rendering targets in video memory if possible.
|
||||
@ -12,10 +12,10 @@ Based on a patch by Henri Verbeet.
|
||||
4 files changed, 56 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index 535f33f1c7d..00fd337ead4 100644
|
||||
index 050f625f7..9655f9e47 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -4298,7 +4298,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid,
|
||||
@@ -4214,7 +4214,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid,
|
||||
TRACE("iface %p, riid %s, surface %p, device %p.\n", iface, debugstr_guid(riid), surface, device);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
@ -24,7 +24,7 @@ index 535f33f1c7d..00fd337ead4 100644
|
||||
{
|
||||
*device = &object->IDirect3DDevice7_iface;
|
||||
}
|
||||
@@ -4327,7 +4327,7 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid,
|
||||
@@ -4243,7 +4243,7 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid,
|
||||
return CLASS_E_NOAGGREGATION;
|
||||
|
||||
wined3d_mutex_lock();
|
||||
@ -33,7 +33,7 @@ index 535f33f1c7d..00fd337ead4 100644
|
||||
{
|
||||
*device = &device_impl->IDirect3DDevice3_iface;
|
||||
}
|
||||
@@ -4353,7 +4353,7 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid,
|
||||
@@ -4269,7 +4269,7 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid,
|
||||
iface, debugstr_guid(riid), surface, device);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
@ -43,10 +43,10 @@ index 535f33f1c7d..00fd337ead4 100644
|
||||
*device = &device_impl->IDirect3DDevice2_iface;
|
||||
}
|
||||
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
|
||||
index 42a7a85e4ec..1a7e48fdffa 100644
|
||||
index f4fe970a6..ba0ec73d8 100644
|
||||
--- a/dlls/ddraw/ddraw_private.h
|
||||
+++ b/dlls/ddraw/ddraw_private.h
|
||||
@@ -310,6 +310,7 @@ struct d3d_device
|
||||
@@ -313,6 +313,7 @@ struct d3d_device
|
||||
IUnknown IUnknown_inner;
|
||||
LONG ref;
|
||||
UINT version;
|
||||
@ -54,8 +54,8 @@ index 42a7a85e4ec..1a7e48fdffa 100644
|
||||
|
||||
IUnknown *outer_unknown;
|
||||
struct wined3d_device *wined3d_device;
|
||||
@@ -356,7 +357,7 @@ struct d3d_device
|
||||
struct wined3d_stateblock *recording, *state, *update_state;
|
||||
@@ -360,7 +361,7 @@ struct d3d_device
|
||||
const struct wined3d_stateblock_state *stateblock_state;
|
||||
};
|
||||
|
||||
-HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUnknown *rt_iface,
|
||||
@ -64,10 +64,10 @@ index 42a7a85e4ec..1a7e48fdffa 100644
|
||||
enum wined3d_depth_buffer_type d3d_device_update_depth_stencil(struct d3d_device *device) DECLSPEC_HIDDEN;
|
||||
|
||||
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
|
||||
index 7acc8e0db0b..390d9a9040d 100644
|
||||
index 048ba7fba..ce74a0fb8 100644
|
||||
--- a/dlls/ddraw/device.c
|
||||
+++ b/dlls/ddraw/device.c
|
||||
@@ -1856,7 +1856,7 @@ static HRESULT d3d_device7_SetRenderTarget(IDirect3DDevice7 *iface,
|
||||
@@ -1858,7 +1858,7 @@ static HRESULT d3d_device7_SetRenderTarget(IDirect3DDevice7 *iface,
|
||||
return DDERR_INVALIDCAPS;
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ index 7acc8e0db0b..390d9a9040d 100644
|
||||
{
|
||||
WARN("Surface %p is not in video memory.\n", target_impl);
|
||||
wined3d_mutex_unlock();
|
||||
@@ -1932,7 +1932,7 @@ static HRESULT WINAPI d3d_device3_SetRenderTarget(IDirect3DDevice3 *iface,
|
||||
@@ -1934,7 +1934,7 @@ static HRESULT WINAPI d3d_device3_SetRenderTarget(IDirect3DDevice3 *iface,
|
||||
return DDERR_INVALIDPIXELFORMAT;
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ index 7acc8e0db0b..390d9a9040d 100644
|
||||
{
|
||||
WARN("Surface %p is not in video memory.\n", target_impl);
|
||||
IDirectDrawSurface4_AddRef(target);
|
||||
@@ -1981,7 +1981,7 @@ static HRESULT WINAPI d3d_device2_SetRenderTarget(IDirect3DDevice2 *iface,
|
||||
@@ -1983,7 +1983,7 @@ static HRESULT WINAPI d3d_device2_SetRenderTarget(IDirect3DDevice2 *iface,
|
||||
return DDERR_INVALIDPIXELFORMAT;
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ index 7acc8e0db0b..390d9a9040d 100644
|
||||
{
|
||||
WARN("Surface %p is not in video memory.\n", target_impl);
|
||||
IDirectDrawSurface_AddRef(target);
|
||||
@@ -6956,7 +6956,7 @@ static void ddraw_reset_viewport_state(struct ddraw *ddraw)
|
||||
@@ -6951,7 +6951,7 @@ static void ddraw_reset_viewport_state(struct ddraw *ddraw)
|
||||
wined3d_stateblock_set_scissor_rect(ddraw->state, &rect);
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ index 7acc8e0db0b..390d9a9040d 100644
|
||||
struct ddraw_surface *target, IUnknown *rt_iface, UINT version, IUnknown *outer_unknown)
|
||||
{
|
||||
static const struct wined3d_matrix ident =
|
||||
@@ -6979,6 +6979,7 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
|
||||
@@ -6974,6 +6974,7 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
|
||||
device->IUnknown_inner.lpVtbl = &d3d_device_inner_vtbl;
|
||||
device->ref = 1;
|
||||
device->version = version;
|
||||
@ -111,7 +111,7 @@ index 7acc8e0db0b..390d9a9040d 100644
|
||||
|
||||
if (outer_unknown)
|
||||
device->outer_unknown = outer_unknown;
|
||||
@@ -7036,14 +7037,18 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
|
||||
@@ -7032,14 +7033,18 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
@ -133,7 +133,7 @@ index 7acc8e0db0b..390d9a9040d 100644
|
||||
|
||||
if (!(target->surface_desc.ddsCaps.dwCaps & DDSCAPS_3DDEVICE)
|
||||
|| (target->surface_desc.ddsCaps.dwCaps & DDSCAPS_ZBUFFER))
|
||||
@@ -7066,7 +7071,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
|
||||
@@ -7062,7 +7067,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
|
||||
return DDERR_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
@ -142,7 +142,7 @@ index 7acc8e0db0b..390d9a9040d 100644
|
||||
{
|
||||
WARN("Surface %p is not in video memory.\n", target);
|
||||
return D3DERR_SURFACENOTINVIDMEM;
|
||||
@@ -7084,7 +7089,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
|
||||
@@ -7080,7 +7085,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
|
||||
return DDERR_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
@ -152,7 +152,7 @@ index 7acc8e0db0b..390d9a9040d 100644
|
||||
WARN("Failed to initialize device, hr %#x.\n", hr);
|
||||
heap_free(object);
|
||||
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
|
||||
index da8913c521c..8b40e7de4b8 100644
|
||||
index 85c1ef496..01522f515 100644
|
||||
--- a/dlls/ddraw/surface.c
|
||||
+++ b/dlls/ddraw/surface.c
|
||||
@@ -223,7 +223,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
|
||||
@ -164,7 +164,7 @@ index da8913c521c..8b40e7de4b8 100644
|
||||
1, &This->device1, (IUnknown *)&This->IDirectDrawSurface_iface)))
|
||||
{
|
||||
This->device1 = NULL;
|
||||
@@ -6201,7 +6201,42 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
|
||||
@@ -6192,7 +6192,42 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
|
||||
|
||||
if (desc->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY)
|
||||
{
|
||||
@ -209,5 +209,5 @@ index da8913c521c..8b40e7de4b8 100644
|
||||
}
|
||||
else
|
||||
--
|
||||
2.25.0
|
||||
2.25.1
|
||||
|
||||
|
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "7ad740cd29c6bd87238df6231689b861058bc5a8"
|
||||
echo "c43998cb51c53ab9c355c2ff37489d51f9009e2d"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -309,7 +309,6 @@ patch_enable_all ()
|
||||
enable_winecfg_Unmounted_Devices="$1"
|
||||
enable_wined3d_Accounting="$1"
|
||||
enable_wined3d_CSMT_Main="$1"
|
||||
enable_wined3d_Dual_Source_Blending="$1"
|
||||
enable_wined3d_Indexed_Vertex_Blending="$1"
|
||||
enable_wined3d_SWVP_shaders="$1"
|
||||
enable_wined3d_Silence_FIXMEs="$1"
|
||||
@ -1038,9 +1037,6 @@ patch_enable ()
|
||||
wined3d-CSMT_Main)
|
||||
enable_wined3d_CSMT_Main="$2"
|
||||
;;
|
||||
wined3d-Dual_Source_Blending)
|
||||
enable_wined3d_Dual_Source_Blending="$2"
|
||||
;;
|
||||
wined3d-Indexed_Vertex_Blending)
|
||||
enable_wined3d_Indexed_Vertex_Blending="$2"
|
||||
;;
|
||||
@ -6558,21 +6554,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Dual_Source_Blending
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3d11/tests/d3d11.c, dlls/wined3d/adapter_gl.c, dlls/wined3d/context.c, dlls/wined3d/glsl_shader.c,
|
||||
# | dlls/wined3d/shader.c, dlls/wined3d/state.c, dlls/wined3d/wined3d_private.h
|
||||
# |
|
||||
if test "$enable_wined3d_Dual_Source_Blending" -eq 1; then
|
||||
patch_apply wined3d-Dual_Source_Blending/0002-d3d11-tests-Add-basic-dual-source-blend-test.patch
|
||||
patch_apply wined3d-Dual_Source_Blending/0003-wined3d-Implement-dual-source-blending.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Michael Müller", "d3d11/tests: Add basic dual source blend test.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "wined3d: Implement dual source blending.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-SWVP-shaders
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -1,199 +0,0 @@
|
||||
From fc96c8cfd68aa488574cedb2654bddab47849059 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:22:16 +0200
|
||||
Subject: [PATCH] d3d11/tests: Add basic dual source blend test.
|
||||
|
||||
---
|
||||
dlls/d3d11/tests/d3d11.c | 169 +++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 169 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index c63bae8bbab..ad79e419b09 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -29680,6 +29680,174 @@ static void test_sample_attached_rtv(void)
|
||||
release_test_context(&test_context);
|
||||
}
|
||||
|
||||
+static void test_dual_blending(void)
|
||||
+{
|
||||
+ struct d3d11_test_context test_context;
|
||||
+ D3D11_TEXTURE2D_DESC texture_desc;
|
||||
+ ID3D11Texture2D *render_target;
|
||||
+ ID3D11RenderTargetView *rtv[2];
|
||||
+ ID3D11BlendState *blend_state;
|
||||
+ ID3D11DeviceContext *context;
|
||||
+ ID3D11VertexShader *vs;
|
||||
+ ID3D11PixelShader *ps;
|
||||
+ D3D11_BLEND_DESC desc;
|
||||
+ ID3D11Device *device;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ static const DWORD vs_code[] =
|
||||
+ {
|
||||
+#if 0
|
||||
+ struct output
|
||||
+ {
|
||||
+ float4 position : SV_PoSiTion;
|
||||
+ float4 color0 : COLOR0;
|
||||
+ float4 color1 : COLOR1;
|
||||
+ };
|
||||
+
|
||||
+ void main(uint id : SV_VertexID, out output o)
|
||||
+ {
|
||||
+ float2 coords = float2((id << 1) & 2, id & 2);
|
||||
+ o.position = float4(coords * float2(2, -2) + float2(-1, 1), 0, 1);
|
||||
+ o.color0 = float4(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
+ o.color1 = float4(0.0f, 1.0f, 0.0f, 1.0f);
|
||||
+ }
|
||||
+#endif
|
||||
+ 0x43425844, 0x93c216a1, 0xbaa7e8d4, 0xd5368c6a, 0x4e889e07, 0x00000001, 0x00000224, 0x00000003,
|
||||
+ 0x0000002c, 0x00000060, 0x000000cc, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020,
|
||||
+ 0x00000000, 0x00000006, 0x00000001, 0x00000000, 0x00000101, 0x565f5653, 0x65747265, 0x00444978,
|
||||
+ 0x4e47534f, 0x00000064, 0x00000003, 0x00000008, 0x00000050, 0x00000000, 0x00000001, 0x00000003,
|
||||
+ 0x00000000, 0x0000000f, 0x0000005c, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000000f,
|
||||
+ 0x0000005c, 0x00000001, 0x00000000, 0x00000003, 0x00000002, 0x0000000f, 0x505f5653, 0x5469536f,
|
||||
+ 0x006e6f69, 0x4f4c4f43, 0xabab0052, 0x52444853, 0x00000150, 0x00010040, 0x00000054, 0x04000060,
|
||||
+ 0x00101012, 0x00000000, 0x00000006, 0x04000067, 0x001020f2, 0x00000000, 0x00000001, 0x03000065,
|
||||
+ 0x001020f2, 0x00000001, 0x03000065, 0x001020f2, 0x00000002, 0x02000068, 0x00000001, 0x07000029,
|
||||
+ 0x00100012, 0x00000000, 0x0010100a, 0x00000000, 0x00004001, 0x00000001, 0x07000001, 0x00100012,
|
||||
+ 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x00000002, 0x07000001, 0x00100042, 0x00000000,
|
||||
+ 0x0010100a, 0x00000000, 0x00004001, 0x00000002, 0x05000056, 0x00100032, 0x00000000, 0x00100086,
|
||||
+ 0x00000000, 0x0f000032, 0x00102032, 0x00000000, 0x00100046, 0x00000000, 0x00004002, 0x40000000,
|
||||
+ 0xc0000000, 0x00000000, 0x00000000, 0x00004002, 0xbf800000, 0x3f800000, 0x00000000, 0x00000000,
|
||||
+ 0x08000036, 0x001020c2, 0x00000000, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x3f800000,
|
||||
+ 0x08000036, 0x001020f2, 0x00000001, 0x00004002, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000,
|
||||
+ 0x08000036, 0x001020f2, 0x00000002, 0x00004002, 0x00000000, 0x3f800000, 0x00000000, 0x3f800000,
|
||||
+ 0x0100003e,
|
||||
+ };
|
||||
+ static const DWORD ps_code[] =
|
||||
+ {
|
||||
+#if 0
|
||||
+ struct input
|
||||
+ {
|
||||
+ float4 position : SV_PoSiTiOn;
|
||||
+ float4 color1 : COLOR1;
|
||||
+ float4 color0 : COLOR0;
|
||||
+ };
|
||||
+
|
||||
+ struct output
|
||||
+ {
|
||||
+ float4 target0 : SV_Target0;
|
||||
+ float4 target1 : SV_Target1;
|
||||
+ };
|
||||
+
|
||||
+ void main(const in input i, out output o)
|
||||
+ {
|
||||
+ o.target0 = i.color0;
|
||||
+ o.target1 = i.color1;
|
||||
+ }
|
||||
+#endif
|
||||
+ 0x43425844, 0x620ef963, 0xed8f19fe, 0x7b3a0a53, 0x126ce021, 0x00000001, 0x00000150, 0x00000003,
|
||||
+ 0x0000002c, 0x00000098, 0x000000e4, 0x4e475349, 0x00000064, 0x00000003, 0x00000008, 0x00000050,
|
||||
+ 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x0000005c, 0x00000001, 0x00000000,
|
||||
+ 0x00000003, 0x00000001, 0x00000f0f, 0x0000005c, 0x00000000, 0x00000000, 0x00000003, 0x00000002,
|
||||
+ 0x00000f0f, 0x505f5653, 0x5469536f, 0x006e4f69, 0x4f4c4f43, 0xabab0052, 0x4e47534f, 0x00000044,
|
||||
+ 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f,
|
||||
+ 0x00000038, 0x00000001, 0x00000000, 0x00000003, 0x00000001, 0x0000000f, 0x545f5653, 0x65677261,
|
||||
+ 0xabab0074, 0x52444853, 0x00000064, 0x00000040, 0x00000019, 0x03001062, 0x001010f2, 0x00000001,
|
||||
+ 0x03001062, 0x001010f2, 0x00000002, 0x03000065, 0x001020f2, 0x00000000, 0x03000065, 0x001020f2,
|
||||
+ 0x00000001, 0x05000036, 0x001020f2, 0x00000000, 0x00101e46, 0x00000002, 0x05000036, 0x001020f2,
|
||||
+ 0x00000001, 0x00101e46, 0x00000001, 0x0100003e,
|
||||
+ };
|
||||
+
|
||||
+ static const float white[] = {1.0f, 1.0f, 1.0f, 1.0f};
|
||||
+
|
||||
+ if (!init_test_context(&test_context, NULL))
|
||||
+ return;
|
||||
+
|
||||
+ device = test_context.device;
|
||||
+ context = test_context.immediate_context;
|
||||
+
|
||||
+ hr = ID3D11Device_CreateVertexShader(device, vs_code, sizeof(vs_code), NULL, &vs);
|
||||
+ ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#x.\n", hr);
|
||||
+ hr = ID3D11Device_CreatePixelShader(device, ps_code, sizeof(ps_code), NULL, &ps);
|
||||
+ ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr);
|
||||
+
|
||||
+ ID3D11Texture2D_GetDesc(test_context.backbuffer, &texture_desc);
|
||||
+ hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, &render_target);
|
||||
+ ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
|
||||
+
|
||||
+ rtv[0] = test_context.backbuffer_rtv;
|
||||
+ hr = ID3D11Device_CreateRenderTargetView(device, (ID3D11Resource *)render_target, NULL, &rtv[1]);
|
||||
+ ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr);
|
||||
+
|
||||
+ ID3D11DeviceContext_VSSetShader(context, vs, NULL, 0);
|
||||
+ ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0);
|
||||
+ ID3D11DeviceContext_IASetPrimitiveTopology(context, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
|
||||
+ ID3D11DeviceContext_OMSetRenderTargets(context, 2, rtv, NULL);
|
||||
+
|
||||
+ ID3D11DeviceContext_ClearRenderTargetView(context, rtv[0], white);
|
||||
+ ID3D11DeviceContext_ClearRenderTargetView(context, rtv[1], white);
|
||||
+ ID3D11DeviceContext_Draw(context, 3, 0);
|
||||
+
|
||||
+ check_texture_color(test_context.backbuffer, 0xff00ff00, 0);
|
||||
+ check_texture_color(render_target, 0xff0000ff, 0);
|
||||
+
|
||||
+ memset(&desc, 0, sizeof(desc));
|
||||
+ desc.AlphaToCoverageEnable = FALSE;
|
||||
+ desc.IndependentBlendEnable = FALSE;
|
||||
+ desc.RenderTarget[0].BlendEnable = TRUE;
|
||||
+ desc.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_COLOR;
|
||||
+ desc.RenderTarget[0].DestBlend = D3D11_BLEND_SRC1_COLOR;
|
||||
+ desc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD;
|
||||
+ desc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_SRC_ALPHA;
|
||||
+ desc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_SRC1_ALPHA;
|
||||
+ desc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
|
||||
+ desc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
|
||||
+
|
||||
+ hr = ID3D11Device_CreateBlendState(device, &desc, &blend_state);
|
||||
+ ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr);
|
||||
+
|
||||
+ ID3D11DeviceContext_OMSetBlendState(context, blend_state, NULL, D3D11_DEFAULT_SAMPLE_MASK);
|
||||
+ ID3D11DeviceContext_ClearRenderTargetView(context, rtv[0], white);
|
||||
+ ID3D11DeviceContext_ClearRenderTargetView(context, rtv[1], white);
|
||||
+ ID3D11DeviceContext_Draw(context, 3, 0);
|
||||
+
|
||||
+ todo_wine check_texture_color(test_context.backbuffer, 0xff00ffff, 0);
|
||||
+ todo_wine check_texture_color(render_target, 0xff0000ff, 0);
|
||||
+
|
||||
+ ID3D11BlendState_Release(blend_state);
|
||||
+
|
||||
+ desc.RenderTarget[0].SrcBlend = D3D11_BLEND_ONE;
|
||||
+ desc.RenderTarget[0].DestBlend = D3D11_BLEND_ZERO;
|
||||
+ desc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_ONE;
|
||||
+ desc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_ZERO;
|
||||
+ hr = ID3D11Device_CreateBlendState(device, &desc, &blend_state);
|
||||
+ ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr);
|
||||
+
|
||||
+ ID3D11DeviceContext_OMSetBlendState(context, blend_state, NULL, D3D11_DEFAULT_SAMPLE_MASK);
|
||||
+ ID3D11DeviceContext_ClearRenderTargetView(context, rtv[0], white);
|
||||
+ ID3D11DeviceContext_ClearRenderTargetView(context, rtv[1], white);
|
||||
+ ID3D11DeviceContext_Draw(context, 3, 0);
|
||||
+
|
||||
+ check_texture_color(test_context.backbuffer, 0xff00ff00, 0);
|
||||
+ check_texture_color(render_target, 0xff0000ff, 0);
|
||||
+
|
||||
+ ID3D11BlendState_Release(blend_state);
|
||||
+
|
||||
+ ID3D11RenderTargetView_Release(rtv[1]);
|
||||
+ ID3D11Texture2D_Release(render_target);
|
||||
+ ID3D11PixelShader_Release(ps);
|
||||
+ ID3D11VertexShader_Release(vs);
|
||||
+ release_test_context(&test_context);
|
||||
+}
|
||||
+
|
||||
START_TEST(d3d11)
|
||||
{
|
||||
unsigned int argc, i;
|
||||
@@ -29824,6 +29992,7 @@ START_TEST(d3d11)
|
||||
queue_for_each_feature_level_in_range(D3D_FEATURE_LEVEL_10_0, D3D_FEATURE_LEVEL_11_0, test_negative_viewports);
|
||||
queue_test(test_early_depth_stencil);
|
||||
queue_test(test_conservative_depth_output);
|
||||
+ queue_test(test_dual_blending);
|
||||
queue_test(test_format_compatibility);
|
||||
queue_test(test_clip_distance);
|
||||
queue_test(test_combined_clip_and_cull_distances);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,296 +0,0 @@
|
||||
From 6d56e47c0705141ce605adaf70355a01bcaf22d2 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: [PATCH] wined3d: Implement dual source blending.
|
||||
|
||||
---
|
||||
dlls/d3d11/tests/d3d11.c | 2 +-
|
||||
dlls/wined3d/adapter_gl.c | 11 +++++++++++
|
||||
dlls/wined3d/context.c | 15 ++++++++++++++-
|
||||
dlls/wined3d/glsl_shader.c | 20 +++++++++++++++++---
|
||||
dlls/wined3d/shader.c | 2 ++
|
||||
dlls/wined3d/state.c | 24 ++++++++++++++++++++++++
|
||||
dlls/wined3d/wined3d_private.h | 26 ++++++++++++++++++++++++--
|
||||
7 files changed, 93 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index 3ee35502e..db261383f 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -30132,7 +30132,7 @@ static void test_dual_blending(void)
|
||||
ID3D11DeviceContext_ClearRenderTargetView(context, rtv[1], white);
|
||||
ID3D11DeviceContext_Draw(context, 3, 0);
|
||||
|
||||
- todo_wine check_texture_color(test_context.backbuffer, 0xff00ffff, 0);
|
||||
+ check_texture_color(test_context.backbuffer, 0xff00ffff, 0);
|
||||
todo_wine check_texture_color(render_target, 0xff0000ff, 0);
|
||||
|
||||
ID3D11BlendState_Release(blend_state);
|
||||
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
|
||||
index 1860dd4bd..f84ab9780 100644
|
||||
--- a/dlls/wined3d/adapter_gl.c
|
||||
+++ b/dlls/wined3d/adapter_gl.c
|
||||
@@ -2987,6 +2987,12 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
|
||||
gl_info->limits.buffers = min(MAX_RENDER_TARGET_VIEWS, gl_max);
|
||||
TRACE("Max draw buffers: %u.\n", gl_max);
|
||||
}
|
||||
+ if (gl_info->supported[ARB_BLEND_FUNC_EXTENDED])
|
||||
+ {
|
||||
+ gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_DUAL_SOURCE_DRAW_BUFFERS, &gl_max);
|
||||
+ gl_info->limits.dual_buffers = gl_max;
|
||||
+ TRACE("Max dual source draw buffers: %u.\n", gl_max);
|
||||
+ }
|
||||
if (gl_info->supported[ARB_MULTITEXTURE])
|
||||
{
|
||||
if (gl_info->supported[WINED3D_GL_LEGACY_CONTEXT])
|
||||
@@ -5117,6 +5123,7 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_
|
||||
struct fragment_caps fragment_caps;
|
||||
struct shader_caps shader_caps;
|
||||
GLfloat f[2];
|
||||
+ int i;
|
||||
|
||||
adapter_gl->a.shader_backend->shader_get_caps(&adapter_gl->a, &shader_caps);
|
||||
adapter_gl->a.vertex_pipe->vp_get_caps(&adapter_gl->a, &vertex_caps);
|
||||
@@ -5137,6 +5144,10 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_
|
||||
d3d_info->limits.ffp_vertex_blend_matrices = vertex_caps.max_vertex_blend_matrices;
|
||||
d3d_info->limits.active_light_count = vertex_caps.max_active_lights;
|
||||
|
||||
+ d3d_info->valid_dual_rt_mask = 0;
|
||||
+ for (i = 0; i < gl_info->limits.dual_buffers; ++i)
|
||||
+ d3d_info->valid_dual_rt_mask |= (1u << i);
|
||||
+
|
||||
d3d_info->limits.max_rt_count = gl_info->limits.buffers;
|
||||
d3d_info->limits.max_clip_distances = gl_info->limits.user_clip_distances;
|
||||
d3d_info->limits.texture_size = gl_info->limits.texture_size;
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index e4f174b9f..08f3d84d6 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -3442,10 +3442,23 @@ static uint32_t find_draw_buffers_mask(const struct wined3d_context_gl *context_
|
||||
else if (!context_gl->c.render_offscreen)
|
||||
return context_generate_rt_mask_from_resource(rts[0]->resource);
|
||||
|
||||
+ /* If we attach more buffers than supported in dual blend mode, the NVIDIA
|
||||
+ * driver generates the following error:
|
||||
+ * GL_INVALID_OPERATION error generated. State(s) are invalid: blend.
|
||||
+ * DX11 does not treat this configuration as invalid, so disable the unused ones.
|
||||
+ */
|
||||
rt_mask = ps ? ps->reg_maps.rt_mask : 1;
|
||||
- rt_mask &= (1u << gl_info->limits.buffers) - 1;
|
||||
+
|
||||
+ if (wined3d_dualblend_enabled(state, gl_info) && ps)
|
||||
+ {
|
||||
+ const struct wined3d_d3d_info *d3d_info = &ps->device->adapter->d3d_info;
|
||||
+ rt_mask &= d3d_info->valid_dual_rt_mask;
|
||||
+ }
|
||||
+ else
|
||||
+ rt_mask &= (1u << gl_info->limits.buffers) - 1;
|
||||
|
||||
mask = rt_mask;
|
||||
+ i = 0;
|
||||
while (mask)
|
||||
{
|
||||
i = wined3d_bit_scan(&mask);
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 4a2fbce55..d48c35c9c 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -2829,6 +2829,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register *
|
||||
break;
|
||||
|
||||
case WINED3DSPR_COLOROUT:
|
||||
+ /* FIXME: should check dual_buffers when dual blending is enabled */
|
||||
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);
|
||||
@@ -7772,7 +7773,10 @@ static GLuint shader_glsl_generate_fragment_shader(const struct wined3d_context_
|
||||
{
|
||||
const struct wined3d_shader_signature *output_signature = &shader->output_signature;
|
||||
|
||||
- shader_addline(buffer, "vec4 ps_out[%u];\n", gl_info->limits.buffers);
|
||||
+ if (args->dual_source_blend)
|
||||
+ shader_addline(buffer, "vec4 ps_out[%u];\n", gl_info->limits.dual_buffers * 2);
|
||||
+ else
|
||||
+ shader_addline(buffer, "vec4 ps_out[%u];\n", gl_info->limits.buffers);
|
||||
if (output_signature->element_count)
|
||||
{
|
||||
for (i = 0; i < output_signature->element_count; ++i)
|
||||
@@ -7787,7 +7791,12 @@ static GLuint shader_glsl_generate_fragment_shader(const struct wined3d_context_
|
||||
continue;
|
||||
}
|
||||
if (shader_glsl_use_explicit_attrib_location(gl_info))
|
||||
- shader_addline(buffer, "layout(location = %u) ", output->semantic_idx);
|
||||
+ {
|
||||
+ if (args->dual_source_blend)
|
||||
+ shader_addline(buffer, "layout(location = %u, index = %u) ", output->semantic_idx / 2, output->semantic_idx % 2);
|
||||
+ else
|
||||
+ shader_addline(buffer, "layout(location = %u) ", output->semantic_idx);
|
||||
+ }
|
||||
shader_addline(buffer, "out %s4 color_out%u;\n",
|
||||
component_type_info[output->component_type].glsl_vector_type, output->semantic_idx);
|
||||
}
|
||||
@@ -7800,7 +7809,12 @@ static GLuint shader_glsl_generate_fragment_shader(const struct wined3d_context_
|
||||
{
|
||||
i = wined3d_bit_scan(&mask);
|
||||
if (shader_glsl_use_explicit_attrib_location(gl_info))
|
||||
- shader_addline(buffer, "layout(location = %u) ", i);
|
||||
+ {
|
||||
+ if (args->dual_source_blend)
|
||||
+ shader_addline(buffer, "layout(location = %u, index = %u) ", i / 2, i % 2);
|
||||
+ else
|
||||
+ shader_addline(buffer, "layout(location = %u) ", i);
|
||||
+ }
|
||||
shader_addline(buffer, "out vec4 color_out%u;\n", i);
|
||||
}
|
||||
}
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
index d9ef1a96e..bd7fcd75c 100644
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -4167,6 +4167,8 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
if (rtv && rtv->format->id == WINED3DFMT_A8_UNORM && !is_identity_fixup(rtv->format->color_fixup))
|
||||
args->rt_alpha_swizzle |= 1u << i;
|
||||
}
|
||||
+
|
||||
+ args->dual_source_blend = wined3d_dualblend_enabled(state, gl_info);
|
||||
}
|
||||
|
||||
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 628931793..3868eb324 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -564,6 +564,7 @@ static BOOL is_blend_enabled(struct wined3d_context *context, const struct wined
|
||||
static void blend(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = wined3d_context_gl(context)->gl_info;
|
||||
+ BOOL enable_dual_blend = wined3d_dualblend_enabled(state, gl_info);
|
||||
const struct wined3d_blend_state *b = state->blend_state;
|
||||
const struct wined3d_format *rt_format;
|
||||
GLenum src_blend, dst_blend;
|
||||
@@ -589,6 +590,13 @@ static void blend(struct wined3d_context *context, const struct wined3d_state *s
|
||||
mask & WINED3DCOLORWRITEENABLE_ALPHA ? GL_TRUE : GL_FALSE);
|
||||
checkGLcall("glColorMask");
|
||||
|
||||
+ /* Dual state blending changes the assignment of the output variables */
|
||||
+ if (context->last_was_dual_blend != enable_dual_blend)
|
||||
+ {
|
||||
+ context->shader_update_mask |= 1u << WINED3D_SHADER_TYPE_PIXEL;
|
||||
+ context->last_was_dual_blend = enable_dual_blend;
|
||||
+ }
|
||||
+
|
||||
if (!b || !is_blend_enabled(context, state, 0))
|
||||
{
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_BLEND);
|
||||
@@ -647,6 +655,7 @@ static void set_color_mask(const struct wined3d_gl_info *gl_info, UINT index, DW
|
||||
static void blend_db2(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = wined3d_context_gl(context)->gl_info;
|
||||
+ BOOL enable_dual_blend = wined3d_dualblend_enabled(state, gl_info);
|
||||
GLenum src_blend, dst_blend, src_blend_alpha, dst_blend_alpha;
|
||||
const struct wined3d_blend_state *b = state->blend_state;
|
||||
const struct wined3d_format *rt_format;
|
||||
@@ -664,6 +673,13 @@ static void blend_db2(struct wined3d_context *context, const struct wined3d_stat
|
||||
return;
|
||||
}
|
||||
|
||||
+ /* Dual state blending changes the assignment of the output variables */
|
||||
+ if (context->last_was_dual_blend != enable_dual_blend)
|
||||
+ {
|
||||
+ context->shader_update_mask |= 1u << WINED3D_SHADER_TYPE_PIXEL;
|
||||
+ context->last_was_dual_blend = enable_dual_blend;
|
||||
+ }
|
||||
+
|
||||
rt_format = state->fb->render_targets[0]->format;
|
||||
gl_blend_from_d3d(&src_blend, &dst_blend, b->desc.rt[0].src, b->desc.rt[0].dst, rt_format);
|
||||
gl_blend_from_d3d(&src_blend_alpha, &dst_blend_alpha, b->desc.rt[0].src_alpha, b->desc.rt[0].dst_alpha, rt_format);
|
||||
@@ -707,6 +723,7 @@ static void blend_db2(struct wined3d_context *context, const struct wined3d_stat
|
||||
static void blend_dbb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = wined3d_context_gl(context)->gl_info;
|
||||
+ BOOL enable_dual_blend = wined3d_dualblend_enabled(state, gl_info);
|
||||
const struct wined3d_blend_state *b = state->blend_state;
|
||||
unsigned int i;
|
||||
|
||||
@@ -722,6 +739,13 @@ static void blend_dbb(struct wined3d_context *context, const struct wined3d_stat
|
||||
return;
|
||||
}
|
||||
|
||||
+ /* Dual state blending changes the assignment of the output variables */
|
||||
+ if (context->last_was_dual_blend != enable_dual_blend)
|
||||
+ {
|
||||
+ context->shader_update_mask |= 1u << WINED3D_SHADER_TYPE_PIXEL;
|
||||
+ context->last_was_dual_blend = enable_dual_blend;
|
||||
+ }
|
||||
+
|
||||
for (i = 0; i < WINED3D_MAX_RENDER_TARGETS; ++i)
|
||||
{
|
||||
GLenum src_blend, dst_blend, src_blend_alpha, dst_blend_alpha;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 9240b0e45..1815759af 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -205,6 +205,7 @@ struct wined3d_d3d_info
|
||||
{
|
||||
struct wined3d_d3d_limits limits;
|
||||
struct wined3d_ffp_attrib_ops ffp_attrib_ops;
|
||||
+ DWORD valid_dual_rt_mask;
|
||||
uint32_t wined3d_creation_flags;
|
||||
uint32_t xyzrhw : 1;
|
||||
uint32_t emulated_flatshading : 1;
|
||||
@@ -1394,7 +1395,8 @@ struct ps_compile_args
|
||||
DWORD alpha_test_func : 3;
|
||||
DWORD render_offscreen : 1;
|
||||
DWORD rt_alpha_swizzle : 8; /* MAX_RENDER_TARGET_VIEWS, 8 */
|
||||
- DWORD padding : 18;
|
||||
+ DWORD dual_source_blend : 1;
|
||||
+ DWORD padding : 17;
|
||||
};
|
||||
|
||||
enum fog_src_type
|
||||
@@ -1971,7 +1973,8 @@ struct wined3d_context
|
||||
DWORD destroyed : 1;
|
||||
DWORD destroy_delayed : 1;
|
||||
DWORD clip_distance_mask : 8; /* WINED3D_MAX_CLIP_DISTANCES, 8 */
|
||||
- DWORD padding : 14;
|
||||
+ DWORD last_was_dual_blend : 1;
|
||||
+ DWORD padding : 13;
|
||||
|
||||
DWORD constant_update_mask;
|
||||
DWORD numbered_array_mask;
|
||||
@@ -2719,6 +2722,7 @@ struct wined3d_fbo_ops
|
||||
struct wined3d_gl_limits
|
||||
{
|
||||
UINT buffers;
|
||||
+ UINT dual_buffers;
|
||||
UINT lights;
|
||||
UINT textures;
|
||||
UINT texture_coords;
|
||||
@@ -3231,6 +3235,24 @@ struct wined3d_state
|
||||
struct wined3d_rasterizer_state *rasterizer_state;
|
||||
};
|
||||
|
||||
+static inline BOOL wined3d_dualblend_enabled(const struct wined3d_state *state, const struct wined3d_gl_info *gl_info)
|
||||
+{
|
||||
+ const struct wined3d_blend_state *b = state->blend_state;
|
||||
+
|
||||
+ if (!state->fb->render_targets[0]) return FALSE;
|
||||
+ if (!b || !b->desc.rt[0].enable) return FALSE;
|
||||
+ if (!gl_info->supported[ARB_BLEND_FUNC_EXTENDED]) return FALSE;
|
||||
+
|
||||
+#define IS_DUAL_SOURCE_BLEND(x) ((x) >= WINED3D_BLEND_SRC1COLOR && (x) <= WINED3D_BLEND_INVSRC1ALPHA)
|
||||
+ if (IS_DUAL_SOURCE_BLEND(b->desc.rt[0].src)) return TRUE;
|
||||
+ if (IS_DUAL_SOURCE_BLEND(b->desc.rt[0].dst)) return TRUE;
|
||||
+ if (IS_DUAL_SOURCE_BLEND(b->desc.rt[0].src_alpha)) return TRUE;
|
||||
+ if (IS_DUAL_SOURCE_BLEND(b->desc.rt[0].dst_alpha)) return TRUE;
|
||||
+#undef IS_DUAL_SOURCE_BLEND
|
||||
+
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
struct wined3d_dummy_textures
|
||||
{
|
||||
GLuint tex_1d;
|
||||
--
|
||||
2.25.1
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: Implement dual source blending in wined3d
|
@ -1,4 +1,4 @@
|
||||
From c08f3b5637a9d43e29b7d72cb61068f270d82133 Mon Sep 17 00:00:00 2001
|
||||
From 54647a8a35d864c07adfe10ed6206a33483bed21 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 15:05:12 +0300
|
||||
Subject: [PATCH] wined3d: Support SWVP vertex shader constants limit in state
|
||||
@ -15,10 +15,10 @@ Subject: [PATCH] wined3d: Support SWVP vertex shader constants limit in state
|
||||
7 files changed, 31 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
|
||||
index d00a26b942..09446d0be6 100644
|
||||
index 16f42216c..75251ef02 100644
|
||||
--- a/dlls/d3d9/tests/device.c
|
||||
+++ b/dlls/d3d9/tests/device.c
|
||||
@@ -6413,13 +6413,10 @@ static void test_vertex_shader_constant(void)
|
||||
@@ -6428,13 +6428,10 @@ static void test_vertex_shader_constant(void)
|
||||
ok(consts_swvp == 8192, "Unexpected consts_swvp %u.\n", consts_swvp);
|
||||
|
||||
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts + 0, c, 1);
|
||||
@ -32,7 +32,7 @@ index d00a26b942..09446d0be6 100644
|
||||
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts_swvp - 1, c, 1);
|
||||
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
@@ -6444,7 +6441,6 @@ static void test_vertex_shader_constant(void)
|
||||
@@ -6459,7 +6456,6 @@ static void test_vertex_shader_constant(void)
|
||||
|
||||
IDirect3DDevice9_SetSoftwareVertexProcessing(device, 0);
|
||||
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts + 0, c, 1);
|
||||
@ -40,7 +40,7 @@ index d00a26b942..09446d0be6 100644
|
||||
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts_swvp - 1, c, 1);
|
||||
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
@@ -6452,7 +6448,6 @@ static void test_vertex_shader_constant(void)
|
||||
@@ -6467,7 +6463,6 @@ static void test_vertex_shader_constant(void)
|
||||
IDirect3DDevice9_SetSoftwareVertexProcessing(device, 1);
|
||||
|
||||
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts + 0, c, 1);
|
||||
@ -49,7 +49,7 @@ index d00a26b942..09446d0be6 100644
|
||||
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts_swvp - 1, c, 1);
|
||||
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index 9ceb758c60..0ae4eb7a34 100644
|
||||
index 9ceb758c6..0ae4eb7a3 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -24877,7 +24877,6 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
@ -61,7 +61,7 @@ index 9ceb758c60..0ae4eb7a34 100644
|
||||
|
||||
hr = IDirect3DDevice9_BeginScene(device);
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index b2db48ecf0..1db974f118 100644
|
||||
index 119721d22..cf26b46ba 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3484,7 +3484,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
|
||||
@ -87,7 +87,7 @@ index b2db48ecf0..1db974f118 100644
|
||||
|
||||
wined3d_device_set_vs_consts_f(device, range.offset, range.size, &state->vs_consts_f[range.offset]);
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 4f7cc772be..a88f92cc03 100644
|
||||
index b8b463372..99273becb 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -1913,7 +1913,7 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
|
||||
@ -100,7 +100,7 @@ index 4f7cc772be..a88f92cc03 100644
|
||||
update_heap_entry(heap, i, priv->next_constant_version);
|
||||
}
|
||||
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
|
||||
index db0019adbf..6be1115f82 100644
|
||||
index b6c3169c4..a7201a8df 100644
|
||||
--- a/dlls/wined3d/stateblock.c
|
||||
+++ b/dlls/wined3d/stateblock.c
|
||||
@@ -714,8 +714,8 @@ void CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock,
|
||||
@ -136,9 +136,9 @@ index db0019adbf..6be1115f82 100644
|
||||
DWORD map;
|
||||
|
||||
TRACE("stateblock %p, device_state %p.\n", stateblock, device_state);
|
||||
@@ -986,9 +988,11 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock,
|
||||
if (stateblock->changed.vertexShader)
|
||||
wined3d_stateblock_set_vertex_shader(device_state, state->vs);
|
||||
@@ -988,9 +990,11 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock,
|
||||
if (stateblock->changed.pixelShader)
|
||||
wined3d_stateblock_set_pixel_shader(device_state, state->ps);
|
||||
|
||||
+ vs_uniform_count = wined3d_device_get_vs_uniform_count(stateblock->device);
|
||||
+
|
||||
@ -149,7 +149,7 @@ index db0019adbf..6be1115f82 100644
|
||||
break;
|
||||
wined3d_stateblock_set_vs_consts_f(device_state, range.offset, range.size, &state->vs_consts_f[range.offset]);
|
||||
}
|
||||
@@ -1183,13 +1187,14 @@ static void wined3d_bitmap_set_bits(uint32_t *bitmap, unsigned int start, unsign
|
||||
@@ -1182,13 +1186,14 @@ static void wined3d_bitmap_set_bits(uint32_t *bitmap, unsigned int start, unsign
|
||||
HRESULT CDECL wined3d_stateblock_set_vs_consts_f(struct wined3d_stateblock *stateblock,
|
||||
unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants)
|
||||
{
|
||||
@ -167,7 +167,7 @@ index db0019adbf..6be1115f82 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
memcpy(&stateblock->stateblock_state.vs_consts_f[start_idx], constants, count * sizeof(*constants));
|
||||
@@ -1937,7 +1942,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru
|
||||
@@ -1936,7 +1941,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru
|
||||
stateblock_init_lights(stateblock->stateblock_state.light_state->light_map,
|
||||
device_state->stateblock_state.light_state->light_map);
|
||||
stateblock_savedstates_set_all(&stateblock->changed,
|
||||
@ -176,7 +176,7 @@ index db0019adbf..6be1115f82 100644
|
||||
break;
|
||||
|
||||
case WINED3D_SBT_PIXEL_STATE:
|
||||
@@ -1949,7 +1954,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru
|
||||
@@ -1948,7 +1953,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru
|
||||
stateblock_init_lights(stateblock->stateblock_state.light_state->light_map,
|
||||
device_state->stateblock_state.light_state->light_map);
|
||||
stateblock_savedstates_set_vertex(&stateblock->changed,
|
||||
@ -186,10 +186,10 @@ index db0019adbf..6be1115f82 100644
|
||||
|
||||
default:
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 51b5cc4ac7..eef5d4fec2 100644
|
||||
index 1a1568818..2f8ee1fc1 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3206,7 +3206,7 @@ struct wined3d_state
|
||||
@@ -3209,7 +3209,7 @@ struct wined3d_state
|
||||
struct wined3d_shader_resource_view *shader_resource_view[WINED3D_SHADER_TYPE_COUNT][MAX_SHADER_RESOURCE_VIEWS];
|
||||
struct wined3d_unordered_access_view *unordered_access_view[WINED3D_PIPELINE_COUNT][MAX_UNORDERED_ACCESS_VIEWS];
|
||||
|
||||
@ -198,7 +198,7 @@ index 51b5cc4ac7..eef5d4fec2 100644
|
||||
struct wined3d_ivec4 vs_consts_i[WINED3D_MAX_CONSTS_I];
|
||||
BOOL vs_consts_b[WINED3D_MAX_CONSTS_B];
|
||||
|
||||
@@ -3354,6 +3354,15 @@ HRESULT wined3d_device_set_implicit_swapchain(struct wined3d_device *device,
|
||||
@@ -3357,6 +3357,15 @@ HRESULT wined3d_device_set_implicit_swapchain(struct wined3d_device *device,
|
||||
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
void wined3d_device_uninit_3d(struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
|
||||
@ -214,7 +214,7 @@ index 51b5cc4ac7..eef5d4fec2 100644
|
||||
struct wined3d_device_no3d
|
||||
{
|
||||
struct wined3d_device d;
|
||||
@@ -3923,7 +3932,7 @@ struct wined3d_vertex_declaration
|
||||
@@ -3926,7 +3935,7 @@ struct wined3d_vertex_declaration
|
||||
|
||||
struct wined3d_saved_states
|
||||
{
|
||||
@ -224,7 +224,7 @@ index 51b5cc4ac7..eef5d4fec2 100644
|
||||
WORD vertexShaderConstantsB; /* WINED3D_MAX_CONSTS_B, 16 */
|
||||
DWORD ps_consts_f[WINED3D_MAX_PS_CONSTS_F >> 5];
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index 3606c4e245..845cd6745f 100644
|
||||
index 3606c4e24..845cd6745 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -2165,7 +2165,7 @@ struct wined3d_stateblock_state
|
||||
|
Loading…
x
Reference in New Issue
Block a user