Rebase against 3852d3357d087353d71d4d11359014a97dbf3e5a.

[d3dx9_36-D3DXDisassembleShader]
Removed patch to implement stub for d3dx9_36.D3DXFillCubeTextureTX (fixed upstream).
This commit is contained in:
Sebastian Lackner 2016-08-06 01:56:00 +02:00
parent eaf5582379
commit d95ae10e5a
50 changed files with 1124 additions and 1727 deletions

View File

@ -1,310 +0,0 @@
From 49076031703fa90ccaf5fe20bed5b000ff470a91 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sat, 13 Feb 2016 15:27:46 +0100
Subject: d3dx9_36: Add stub for D3DXFillCubeTextureTX.
---
dlls/d3dx9_24/d3dx9_24.spec | 2 +-
dlls/d3dx9_25/d3dx9_25.spec | 2 +-
dlls/d3dx9_26/d3dx9_26.spec | 2 +-
dlls/d3dx9_27/d3dx9_27.spec | 2 +-
dlls/d3dx9_28/d3dx9_28.spec | 2 +-
dlls/d3dx9_29/d3dx9_29.spec | 2 +-
dlls/d3dx9_30/d3dx9_30.spec | 2 +-
dlls/d3dx9_31/d3dx9_31.spec | 2 +-
dlls/d3dx9_32/d3dx9_32.spec | 2 +-
dlls/d3dx9_33/d3dx9_33.spec | 2 +-
dlls/d3dx9_34/d3dx9_34.spec | 2 +-
dlls/d3dx9_35/d3dx9_35.spec | 2 +-
dlls/d3dx9_36/d3dx9_36.spec | 2 +-
dlls/d3dx9_36/shader.c | 10 ++++++++++
dlls/d3dx9_37/d3dx9_37.spec | 2 +-
dlls/d3dx9_38/d3dx9_38.spec | 2 +-
dlls/d3dx9_39/d3dx9_39.spec | 2 +-
dlls/d3dx9_40/d3dx9_40.spec | 2 +-
dlls/d3dx9_41/d3dx9_41.spec | 2 +-
dlls/d3dx9_42/d3dx9_42.spec | 2 +-
dlls/d3dx9_43/d3dx9_43.spec | 2 +-
21 files changed, 30 insertions(+), 20 deletions(-)
diff --git a/dlls/d3dx9_24/d3dx9_24.spec b/dlls/d3dx9_24/d3dx9_24.spec
index f182d7e..70710d2 100644
--- a/dlls/d3dx9_24/d3dx9_24.spec
+++ b/dlls/d3dx9_24/d3dx9_24.spec
@@ -119,7 +119,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_25/d3dx9_25.spec b/dlls/d3dx9_25/d3dx9_25.spec
index 300dc1d..aff943b 100644
--- a/dlls/d3dx9_25/d3dx9_25.spec
+++ b/dlls/d3dx9_25/d3dx9_25.spec
@@ -119,7 +119,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_26/d3dx9_26.spec b/dlls/d3dx9_26/d3dx9_26.spec
index 79e0a0c..28aafdf 100644
--- a/dlls/d3dx9_26/d3dx9_26.spec
+++ b/dlls/d3dx9_26/d3dx9_26.spec
@@ -123,7 +123,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_27/d3dx9_27.spec b/dlls/d3dx9_27/d3dx9_27.spec
index 79e0a0c..28aafdf 100644
--- a/dlls/d3dx9_27/d3dx9_27.spec
+++ b/dlls/d3dx9_27/d3dx9_27.spec
@@ -123,7 +123,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_28/d3dx9_28.spec b/dlls/d3dx9_28/d3dx9_28.spec
index abbfa94..3e2a6a5 100644
--- a/dlls/d3dx9_28/d3dx9_28.spec
+++ b/dlls/d3dx9_28/d3dx9_28.spec
@@ -123,7 +123,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_29/d3dx9_29.spec b/dlls/d3dx9_29/d3dx9_29.spec
index abbfa94..3e2a6a5 100644
--- a/dlls/d3dx9_29/d3dx9_29.spec
+++ b/dlls/d3dx9_29/d3dx9_29.spec
@@ -123,7 +123,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_30/d3dx9_30.spec b/dlls/d3dx9_30/d3dx9_30.spec
index 0269caa..f131737 100644
--- a/dlls/d3dx9_30/d3dx9_30.spec
+++ b/dlls/d3dx9_30/d3dx9_30.spec
@@ -123,7 +123,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_31/d3dx9_31.spec b/dlls/d3dx9_31/d3dx9_31.spec
index be37e8f..cb5f68c 100644
--- a/dlls/d3dx9_31/d3dx9_31.spec
+++ b/dlls/d3dx9_31/d3dx9_31.spec
@@ -122,7 +122,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_32/d3dx9_32.spec b/dlls/d3dx9_32/d3dx9_32.spec
index 6d9e244..882058f 100644
--- a/dlls/d3dx9_32/d3dx9_32.spec
+++ b/dlls/d3dx9_32/d3dx9_32.spec
@@ -122,7 +122,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_33/d3dx9_33.spec b/dlls/d3dx9_33/d3dx9_33.spec
index 6d9e244..882058f 100644
--- a/dlls/d3dx9_33/d3dx9_33.spec
+++ b/dlls/d3dx9_33/d3dx9_33.spec
@@ -122,7 +122,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_34/d3dx9_34.spec b/dlls/d3dx9_34/d3dx9_34.spec
index 6d9e244..882058f 100644
--- a/dlls/d3dx9_34/d3dx9_34.spec
+++ b/dlls/d3dx9_34/d3dx9_34.spec
@@ -122,7 +122,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_35/d3dx9_35.spec b/dlls/d3dx9_35/d3dx9_35.spec
index 6d9e244..882058f 100644
--- a/dlls/d3dx9_35/d3dx9_35.spec
+++ b/dlls/d3dx9_35/d3dx9_35.spec
@@ -122,7 +122,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec
index 2db0152..88f1b4b 100644
--- a/dlls/d3dx9_36/d3dx9_36.spec
+++ b/dlls/d3dx9_36/d3dx9_36.spec
@@ -123,7 +123,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
index 4dbecb1..5e03098 100644
--- a/dlls/d3dx9_36/shader.c
+++ b/dlls/d3dx9_36/shader.c
@@ -2413,3 +2413,13 @@ HRESULT WINAPI D3DXCreateTextureShader(const DWORD *function, ID3DXTextureShader
return D3D_OK;
}
+
+HRESULT WINAPI D3DXFillCubeTextureTX(IDirect3DCubeTexture9 *texture, ID3DXTextureShader *texture_shader)
+{
+ FIXME("texture %p, texture_shader %p stub.\n", texture, texture_shader);
+
+ if (!texture || !texture_shader)
+ return E_POINTER;
+
+ return D3D_OK;
+}
diff --git a/dlls/d3dx9_37/d3dx9_37.spec b/dlls/d3dx9_37/d3dx9_37.spec
index 2db0152..88f1b4b 100644
--- a/dlls/d3dx9_37/d3dx9_37.spec
+++ b/dlls/d3dx9_37/d3dx9_37.spec
@@ -123,7 +123,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_38/d3dx9_38.spec b/dlls/d3dx9_38/d3dx9_38.spec
index 2db0152..88f1b4b 100644
--- a/dlls/d3dx9_38/d3dx9_38.spec
+++ b/dlls/d3dx9_38/d3dx9_38.spec
@@ -123,7 +123,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_39/d3dx9_39.spec b/dlls/d3dx9_39/d3dx9_39.spec
index 2db0152..88f1b4b 100644
--- a/dlls/d3dx9_39/d3dx9_39.spec
+++ b/dlls/d3dx9_39/d3dx9_39.spec
@@ -123,7 +123,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_40/d3dx9_40.spec b/dlls/d3dx9_40/d3dx9_40.spec
index 2db0152..88f1b4b 100644
--- a/dlls/d3dx9_40/d3dx9_40.spec
+++ b/dlls/d3dx9_40/d3dx9_40.spec
@@ -123,7 +123,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_41/d3dx9_41.spec b/dlls/d3dx9_41/d3dx9_41.spec
index 2db0152..88f1b4b 100644
--- a/dlls/d3dx9_41/d3dx9_41.spec
+++ b/dlls/d3dx9_41/d3dx9_41.spec
@@ -123,7 +123,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_42/d3dx9_42.spec b/dlls/d3dx9_42/d3dx9_42.spec
index 9a69e76..e996089 100644
--- a/dlls/d3dx9_42/d3dx9_42.spec
+++ b/dlls/d3dx9_42/d3dx9_42.spec
@@ -121,7 +121,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
diff --git a/dlls/d3dx9_43/d3dx9_43.spec b/dlls/d3dx9_43/d3dx9_43.spec
index 9a69e76..e996089 100644
--- a/dlls/d3dx9_43/d3dx9_43.spec
+++ b/dlls/d3dx9_43/d3dx9_43.spec
@@ -121,7 +121,7 @@
@ stdcall D3DXDisassembleShader(ptr long str ptr)
@ stdcall D3DXFileCreate(ptr)
@ stdcall D3DXFillCubeTexture(ptr ptr ptr)
-@ stub D3DXFillCubeTextureTX(ptr ptr)
+@ stdcall D3DXFillCubeTextureTX(ptr ptr)
@ stdcall D3DXFillTexture(ptr ptr ptr)
@ stub D3DXFillTextureTX(ptr ptr)
@ stdcall D3DXFillVolumeTexture(ptr ptr ptr)
--
2.9.0

View File

@ -1,3 +1,2 @@
Fixes: Implement stub for d3dx9_36.D3DXFillCubeTextureTX
Fixes: Initial implementation for d3dx9_36.D3DXDisassembleShader
Depends: d3dx9_36-GetShaderSemantics

View File

@ -1,4 +1,4 @@
From 204794b8da1f17308574230feee919c28f065c2e Mon Sep 17 00:00:00 2001
From 18084b4d4ce50242019c9493e64497fc153a58dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 19 Aug 2014 22:47:51 +0200
Subject: dxgi: Improve stubs for MakeWindowAssociation and
@ -10,10 +10,10 @@ Subject: dxgi: Improve stubs for MakeWindowAssociation and
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h
index 129f6b4..1b3f49d 100644
index 987370f1..a1b3392 100644
--- a/dlls/dxgi/dxgi_private.h
+++ b/dlls/dxgi/dxgi_private.h
@@ -102,6 +102,7 @@ struct dxgi_factory
@@ -109,6 +109,7 @@ struct dxgi_factory
struct wined3d *wined3d;
BOOL extended;
HWND device_window;
@ -22,7 +22,7 @@ index 129f6b4..1b3f49d 100644
HRESULT dxgi_factory_create(REFIID riid, void **factory, BOOL extended) DECLSPEC_HIDDEN;
diff --git a/dlls/dxgi/factory.c b/dlls/dxgi/factory.c
index 1af7f72..2ec85e3 100644
index d54eea9..662b0cf 100644
--- a/dlls/dxgi/factory.c
+++ b/dlls/dxgi/factory.c
@@ -168,16 +168,28 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapters(IDXGIFactory1 *iface,
@ -54,7 +54,7 @@ index 1af7f72..2ec85e3 100644
+ return S_OK;
}
static UINT dxgi_rational_to_uint(const DXGI_RATIONAL *rational)
static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IDXGIFactory1 *iface,
--
2.7.1
2.9.0

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "0b49495b8ed9e725b47b7ca791312a2a3c3e3c97"
echo "3852d3357d087353d71d4d11359014a97dbf3e5a"
}
# Show version information
@ -3005,20 +3005,13 @@ fi
# | * d3dx9_36-GetShaderSemantics
# |
# | Modified files:
# | * dlls/d3dx9_24/d3dx9_24.spec, dlls/d3dx9_25/d3dx9_25.spec, dlls/d3dx9_26/d3dx9_26.spec, dlls/d3dx9_27/d3dx9_27.spec,
# | dlls/d3dx9_28/d3dx9_28.spec, dlls/d3dx9_29/d3dx9_29.spec, dlls/d3dx9_30/d3dx9_30.spec, dlls/d3dx9_31/d3dx9_31.spec,
# | dlls/d3dx9_32/d3dx9_32.spec, dlls/d3dx9_33/d3dx9_33.spec, dlls/d3dx9_34/d3dx9_34.spec, dlls/d3dx9_35/d3dx9_35.spec,
# | dlls/d3dx9_36/d3dx9_36.spec, dlls/d3dx9_36/shader.c, dlls/d3dx9_36/tests/shader.c, dlls/d3dx9_37/d3dx9_37.spec,
# | dlls/d3dx9_38/d3dx9_38.spec, dlls/d3dx9_39/d3dx9_39.spec, dlls/d3dx9_40/d3dx9_40.spec, dlls/d3dx9_41/d3dx9_41.spec,
# | dlls/d3dx9_42/d3dx9_42.spec, dlls/d3dx9_43/d3dx9_43.spec
# | * dlls/d3dx9_36/shader.c, dlls/d3dx9_36/tests/shader.c
# |
if test "$enable_d3dx9_36_D3DXDisassembleShader" -eq 1; then
patch_apply d3dx9_36-D3DXDisassembleShader/0003-d3dx9_36-Add-stub-for-D3DXFillCubeTextureTX.patch
patch_apply d3dx9_36-D3DXDisassembleShader/0004-d3dx9_36-Implement-D3DXDisassembleShader.patch
patch_apply d3dx9_36-D3DXDisassembleShader/0005-d3dx9_36-tests-Add-initial-tests-for-D3DXDisassemble.patch
patch_apply d3dx9_36-D3DXDisassembleShader/0006-d3dx9_36-tests-Add-additional-tests-for-special-case.patch
(
echo '+ { "Christian Costa", "d3dx9_36: Add stub for D3DXFillCubeTextureTX.", 1 },';
echo '+ { "Christian Costa", "d3dx9_36: Implement D3DXDisassembleShader.", 2 },';
echo '+ { "Sebastian Lackner", "d3dx9_36/tests: Add initial tests for D3DXDisassembleShader.", 1 },';
echo '+ { "Christian Costa", "d3dx9_36/tests: Add additional tests for special cases.", 1 },';
@ -7306,8 +7299,8 @@ fi
# | * [#11674] Support for CSMT (command stream) to increase graphic performance
# |
# | Modified files:
# | * dlls/d3d9/tests/visual.c, dlls/wined3d/arb_program_shader.c, dlls/wined3d/buffer.c, dlls/wined3d/context.c,
# | dlls/wined3d/cs.c, dlls/wined3d/device.c, dlls/wined3d/drawprim.c, dlls/wined3d/glsl_shader.c, dlls/wined3d/query.c,
# | * dlls/wined3d/arb_program_shader.c, dlls/wined3d/buffer.c, dlls/wined3d/context.c, dlls/wined3d/cs.c,
# | dlls/wined3d/device.c, dlls/wined3d/drawprim.c, dlls/wined3d/glsl_shader.c, dlls/wined3d/query.c,
# | dlls/wined3d/resource.c, dlls/wined3d/sampler.c, dlls/wined3d/shader.c, dlls/wined3d/state.c, dlls/wined3d/stateblock.c,
# | dlls/wined3d/surface.c, dlls/wined3d/swapchain.c, dlls/wined3d/texture.c, dlls/wined3d/utils.c,
# | dlls/wined3d/wined3d_main.c, dlls/wined3d/wined3d_private.h
@ -7317,7 +7310,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
(
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Send shader constant updates through the command stream.\".", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Make surface_load_location return nothing.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Start to move surface/volume_load_location into the texture.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Call texture_load_location instead of surface_load_location.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Share surface and volume system memory loading code.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t call the public map function in surface_convert_format.", 1 },';
@ -7367,13 +7359,11 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
echo '+ { "Stefan Dösinger", "wined3d: Send update_texture calls through the CS.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Get rid of the surface_upload_data glFinish.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t lock the src volume in device_update_volume.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Handle evit_managed_resources through the CS.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Fence update_texture calls.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Dirtify resources on unmap.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Fence render targets and depth stencils.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Fence blit operations.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Fence color_fill operations.", 1 },';
echo '+ { "Stefan Dösinger", "d3d9/tests: Remove a TODO that has been hacked away.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Make resource maps and unmaps a priority command.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Send update_sub_resource calls through the command stream.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Dirtify changed textures through the command stream.", 1 },';
@ -7406,7 +7396,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
echo '+ { "Stefan Dösinger", "wined3d: Fence preload operations.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Set map_heap_memory = NULL when allocating a PBO.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Wait only for the buffer to be idle.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Add a comment about worker thread lag.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Put GL_APPLE_flush_buffer_range syncing back in place.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Wait for the resource to be idle when destroying user memory surfaces.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t sync on redundant discard calls.", 1 },';
@ -7423,7 +7412,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
echo '+ { "Stefan Dösinger", "wined3d: Delete GL contexts through the CS in uninit_3d.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Update the swap interval through the CS in reset.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Do the sampler GL init through the CS.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Remove the device_reset CS sync fixme.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Create initial DCs through the CS.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Assign a read buffer when discarding a new texture.", 1 },';
echo '+ { "Sebastian Lackner", "wined3d: Do not query available GPU memory on main thread when CSMT is enabled.", 1 },';

View File

@ -1,4 +1,4 @@
From 0d374fc445002f29914f0f4c08fdfcb29084f64e Mon Sep 17 00:00:00 2001
From b511e356c40c80d73abc26519f1aeca401317840 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 25 May 2016 01:50:36 +0200
Subject: Revert "wined3d: Send shader constant updates through the command
@ -14,7 +14,7 @@ This reverts commit aa666adfed929a2f711d9570fe389856bcaac346.
5 files changed, 38 insertions(+), 68 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 945abe5..3f551b6 100644
index c206745..f877149 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -729,6 +729,12 @@ static void shader_arb_update_float_vertex_constants(struct wined3d_device *devi
@ -44,10 +44,10 @@ index 945abe5..3f551b6 100644
/* We don't want shader constant dirtification to be an O(contexts), so just dirtify the active
* context. On a context switch the old context will be fully dirtified */
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 8ed049e..5931569 100644
index 0d5c151..f51c06a 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -1243,54 +1243,10 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs)
@@ -1327,54 +1327,10 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs)
wined3d_cs_op_handlers[opcode](cs, cs->data);
}
@ -103,10 +103,10 @@ index 8ed049e..5931569 100644
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 60088b0..0b2f47b 100644
index 6d83082..edd68ae 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2403,6 +2403,16 @@ struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3
@@ -2439,6 +2439,16 @@ struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3
return device->state.sampler[WINED3D_SHADER_TYPE_VERTEX][idx];
}
@ -123,7 +123,7 @@ index 60088b0..0b2f47b 100644
HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
unsigned int start_idx, unsigned int count, const BOOL *constants)
{
@@ -2430,7 +2440,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
@@ -2466,7 +2476,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
}
else
{
@ -132,7 +132,7 @@ index 60088b0..0b2f47b 100644
}
return WINED3D_OK;
@@ -2479,7 +2489,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
@@ -2515,7 +2525,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
}
else
{
@ -141,7 +141,7 @@ index 60088b0..0b2f47b 100644
}
return WINED3D_OK;
@@ -2524,7 +2534,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
@@ -2560,7 +2570,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
memset(&device->recording->changed.vs_consts_f[start_idx], 1,
count * sizeof(*device->recording->changed.vs_consts_f));
else
@ -150,7 +150,7 @@ index 60088b0..0b2f47b 100644
return WINED3D_OK;
}
@@ -2663,7 +2673,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
@@ -2699,7 +2709,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
}
else
{
@ -159,7 +159,7 @@ index 60088b0..0b2f47b 100644
}
return WINED3D_OK;
@@ -2712,7 +2722,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
@@ -2748,7 +2758,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
}
else
{
@ -168,7 +168,7 @@ index 60088b0..0b2f47b 100644
}
return WINED3D_OK;
@@ -2758,7 +2768,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
@@ -2794,7 +2804,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
memset(&device->recording->changed.ps_consts_f[start_idx], 1,
count * sizeof(*device->recording->changed.ps_consts_f));
else
@ -178,7 +178,7 @@ index 60088b0..0b2f47b 100644
return WINED3D_OK;
}
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index c239a47..87b2602 100644
index 2a03b9f..d13f429 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -1601,6 +1601,11 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
@ -206,10 +206,10 @@ index c239a47..87b2602 100644
static unsigned int vec4_varyings(DWORD shader_major, const struct wined3d_gl_info *gl_info)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index d1b59e1..608627e 100644
index b1635de..6e86ef2 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2995,22 +2995,10 @@ void state_init(struct wined3d_state *state, struct wined3d_fb_state *fb,
@@ -3006,22 +3006,10 @@ void state_init(struct wined3d_state *state, struct wined3d_fb_state *fb,
DWORD flags) DECLSPEC_HIDDEN;
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -232,9 +232,9 @@ index d1b59e1..608627e 100644
};
struct wined3d_cs
@@ -3077,12 +3065,6 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
@@ -3092,12 +3080,6 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
-static inline void wined3d_cs_push_constants(struct wined3d_cs *cs, enum wined3d_push_constants p,
- unsigned int start_idx, unsigned int count, const void *constants)
@ -246,5 +246,5 @@ index d1b59e1..608627e 100644
* fixed function semantics as D3DCOLOR or FLOAT16 */
enum wined3d_buffer_conversion_type
--
2.8.0
2.9.0

View File

@ -1,29 +0,0 @@
From c96b9ddd5a522622943774e1df2d58084e483e7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 29 Oct 2015 17:33:23 +0100
Subject: wined3d: Start to move surface/volume_load_location into the texture.
FIXME 1: This can be split up into a case by case replace.
FIXME 2: This breaks some rtv->resource != buffer checks.
wined3d_surface_prepare will be moved into the texture a lot later, after
moving allocation of all locations (including sysmem) there.
---
dlls/wined3d/texture.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 873d72b..0acc74f 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1441,6 +1441,7 @@ void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int s
context, data, row_pitch, slice_pitch);
}
+/* Context activation is done by the caller. */
static void texture2d_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx,
const struct wined3d_context *context, const struct wined3d_const_bo_address *data,
unsigned int row_pitch, unsigned int slice_pitch)
--
2.9.0

View File

@ -1,4 +1,4 @@
From 6930278bb1ba99c7cfcbd1cfaef73c8034cc48a7 Mon Sep 17 00:00:00 2001
From 4775d9698edbbab7c039f42a82c3add9181133c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 17 Nov 2015 23:13:29 -0800
Subject: wined3d: Call texture_load_location instead of surface_load_location.
@ -6,11 +6,10 @@ Subject: wined3d: Call texture_load_location instead of surface_load_location.
---
dlls/wined3d/device.c | 9 ++++++---
dlls/wined3d/surface.c | 5 +++--
dlls/wined3d/texture.c | 2 +-
3 files changed, 10 insertions(+), 6 deletions(-)
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index e052557..604be94 100644
index edd68ae..5879f7e 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -203,12 +203,15 @@ void device_switch_onscreen_ds(struct wined3d_device *device,
@ -63,19 +62,6 @@ index 2796590..5dfdcfd 100644
}
if (texture->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 0acc74f..2d155cb 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -2883,7 +2883,7 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
if (device->d3d_initialized)
context = context_acquire(device, NULL);
- surface_load_location(surface, context, texture->resource.map_binding);
+ wined3d_texture_load_location(texture, sub_resource_idx, context, texture->resource.map_binding);
wined3d_texture_invalidate_location(texture, sub_resource_idx, ~texture->resource.map_binding);
if (!surface->dc)
--
2.9.0

View File

@ -1,16 +1,16 @@
From 1ae4626e129479f2b9d92e1a3fbf643b3173496b Mon Sep 17 00:00:00 2001
From 9ac471fe3bc3eb4156bbcfef799314dabed8eec7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 1 Oct 2013 14:31:56 +0200
Subject: wined3d: Hackily introduce a multithreaded command stream
---
dlls/wined3d/cs.c | 369 +++++++++++++++++++++++++++++++++++++----
dlls/wined3d/cs.c | 373 +++++++++++++++++++++++++++++++++++++----
dlls/wined3d/wined3d_main.c | 9 +
dlls/wined3d/wined3d_private.h | 18 ++
3 files changed, 366 insertions(+), 30 deletions(-)
3 files changed, 369 insertions(+), 31 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 0553d4a..5d97d9a 100644
index 825523e..bb090a3 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -24,8 +24,19 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
@ -33,10 +33,10 @@ index 0553d4a..5d97d9a 100644
WINED3D_CS_OP_PRESENT,
WINED3D_CS_OP_CLEAR,
WINED3D_CS_OP_DRAW,
@@ -55,6 +66,18 @@ enum wined3d_cs_op
WINED3D_CS_OP_RESET_STATE,
@@ -56,6 +67,18 @@ enum wined3d_cs_op
WINED3D_CS_OP_DESTROY_OBJECT,
WINED3D_CS_OP_QUERY_ISSUE,
WINED3D_CS_OP_UNLOAD_RESOURCE,
+ WINED3D_CS_OP_STOP,
+};
+
@ -52,8 +52,8 @@ index 0553d4a..5d97d9a 100644
};
struct wined3d_cs_present
@@ -275,7 +298,134 @@ struct wined3d_cs_query_issue
DWORD flags;
@@ -282,7 +305,134 @@ struct wined3d_cs_unload_resource
struct wined3d_resource *resource;
};
-static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
@ -188,7 +188,7 @@ index 0553d4a..5d97d9a 100644
{
const struct wined3d_cs_present *op = data;
struct wined3d_swapchain *swapchain;
@@ -291,6 +441,8 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
@@ -298,6 +448,8 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
{
wined3d_resource_release(&swapchain->back_buffers[i]->resource);
}
@ -197,7 +197,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
@@ -316,13 +468,14 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
@@ -323,13 +475,14 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
cs->ops->submit(cs);
}
@ -213,7 +213,7 @@ index 0553d4a..5d97d9a 100644
device = cs->device;
state = &device->state;
@@ -341,6 +494,8 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
@@ -348,6 +501,8 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
}
if (op->flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
wined3d_resource_release(state->fb.depth_stencil->resource);
@ -222,7 +222,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
@@ -373,7 +528,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
@@ -380,7 +535,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
cs->ops->submit(cs);
}
@ -231,7 +231,7 @@ index 0553d4a..5d97d9a 100644
{
struct wined3d_state *state = &cs->device->state;
struct wined3d_shader_sampler_map_entry *entry;
@@ -432,6 +587,8 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
@@ -439,6 +594,8 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
wined3d_resource_release(view->resource);
}
}
@ -240,7 +240,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned int start_idx,
@@ -497,12 +654,14 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
@@ -504,12 +661,14 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
cs->ops->submit(cs);
}
@ -256,7 +256,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query *predicate, BOOL value)
@@ -517,12 +676,14 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
@@ -524,12 +683,14 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
cs->ops->submit(cs);
}
@ -272,7 +272,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport)
@@ -536,12 +697,14 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
@@ -543,12 +704,14 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
cs->ops->submit(cs);
}
@ -288,7 +288,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
@@ -555,12 +718,14 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
@@ -562,12 +725,14 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
cs->ops->submit(cs);
}
@ -304,7 +304,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int view_idx,
@@ -576,7 +741,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
@@ -583,7 +748,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
cs->ops->submit(cs);
}
@ -313,7 +313,7 @@ index 0553d4a..5d97d9a 100644
{
const struct wined3d_cs_set_depth_stencil_view *op = data;
struct wined3d_device *device = cs->device;
@@ -615,6 +780,8 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
@@ -622,6 +787,8 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
}
device_invalidate_state(device, STATE_FRAMEBUFFER);
@ -322,7 +322,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view)
@@ -628,12 +795,14 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
@@ -635,12 +802,14 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
cs->ops->submit(cs);
}
@ -338,7 +338,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3d_vertex_declaration *declaration)
@@ -647,7 +816,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
@@ -654,7 +823,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
cs->ops->submit(cs);
}
@ -347,7 +347,7 @@ index 0553d4a..5d97d9a 100644
{
const struct wined3d_cs_set_stream_source *op = data;
struct wined3d_stream_state *stream;
@@ -665,6 +834,8 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
@@ -672,6 +841,8 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
InterlockedDecrement(&prev->resource.bind_count);
device_invalidate_state(cs->device, STATE_STREAMSRC);
@ -356,7 +356,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
@@ -682,7 +853,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
@@ -689,7 +860,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
cs->ops->submit(cs);
}
@ -365,7 +365,7 @@ index 0553d4a..5d97d9a 100644
{
const struct wined3d_cs_set_stream_source_freq *op = data;
struct wined3d_stream_state *stream;
@@ -692,6 +863,8 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
@@ -699,6 +870,8 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
stream->flags = op->flags;
device_invalidate_state(cs->device, STATE_STREAMSRC);
@ -374,7 +374,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_idx, UINT frequency, UINT flags)
@@ -707,7 +880,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
@@ -714,7 +887,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
cs->ops->submit(cs);
}
@ -383,7 +383,7 @@ index 0553d4a..5d97d9a 100644
{
const struct wined3d_cs_set_stream_output *op = data;
struct wined3d_stream_output *stream;
@@ -722,6 +895,8 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
@@ -729,6 +902,8 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
InterlockedIncrement(&op->buffer->resource.bind_count);
if (prev)
InterlockedDecrement(&prev->resource.bind_count);
@ -392,7 +392,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
@@ -738,7 +913,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
@@ -745,7 +920,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
cs->ops->submit(cs);
}
@ -401,7 +401,7 @@ index 0553d4a..5d97d9a 100644
{
const struct wined3d_cs_set_index_buffer *op = data;
struct wined3d_buffer *prev;
@@ -754,6 +929,8 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
@@ -761,6 +936,8 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
InterlockedDecrement(&prev->resource.bind_count);
device_invalidate_state(cs->device, STATE_INDEXBUFFER);
@ -410,7 +410,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
@@ -770,7 +947,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
@@ -777,7 +954,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
cs->ops->submit(cs);
}
@ -419,7 +419,7 @@ index 0553d4a..5d97d9a 100644
{
const struct wined3d_cs_set_constant_buffer *op = data;
struct wined3d_buffer *prev;
@@ -784,6 +961,7 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
@@ -791,6 +968,7 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
InterlockedDecrement(&prev->resource.bind_count);
device_invalidate_state(cs->device, STATE_CONSTANT_BUFFER(op->type));
@ -427,7 +427,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
@@ -800,7 +978,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
@@ -807,7 +985,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
cs->ops->submit(cs);
}
@ -436,7 +436,7 @@ index 0553d4a..5d97d9a 100644
{
const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info;
const struct wined3d_d3d_info *d3d_info = &cs->device->adapter->d3d_info;
@@ -877,6 +1055,8 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
@@ -884,6 +1062,8 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
if (new_use_color_key)
device_invalidate_state(cs->device, STATE_COLOR_KEY);
@ -445,7 +445,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture)
@@ -891,12 +1071,14 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
@@ -898,12 +1078,14 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
cs->ops->submit(cs);
}
@ -461,7 +461,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
@@ -913,12 +1095,14 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
@@ -920,12 +1102,14 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
cs->ops->submit(cs);
}
@ -477,7 +477,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
@@ -935,13 +1119,15 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -942,13 +1126,15 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
cs->ops->submit(cs);
}
@ -494,7 +494,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
@@ -956,12 +1142,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -963,12 +1149,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
cs->ops->submit(cs);
}
@ -510,7 +510,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
@@ -976,12 +1164,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
@@ -983,12 +1171,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
cs->ops->submit(cs);
}
@ -526,7 +526,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
@@ -996,12 +1186,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
@@ -1003,12 +1193,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
cs->ops->submit(cs);
}
@ -542,7 +542,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -1018,12 +1210,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -1025,12 +1217,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
cs->ops->submit(cs);
}
@ -558,7 +558,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -1040,13 +1234,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -1047,13 +1241,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
cs->ops->submit(cs);
}
@ -575,7 +575,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
@@ -1062,12 +1258,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
@@ -1069,12 +1265,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
cs->ops->submit(cs);
}
@ -591,7 +591,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane)
@@ -1082,7 +1280,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
@@ -1089,7 +1287,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
cs->ops->submit(cs);
}
@ -600,7 +600,7 @@ index 0553d4a..5d97d9a 100644
{
const struct wined3d_cs_set_color_key *op = data;
struct wined3d_texture *texture = op->texture;
@@ -1143,6 +1341,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
@@ -1150,6 +1348,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
break;
}
}
@ -609,7 +609,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
@@ -1165,12 +1365,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
@@ -1172,12 +1372,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
cs->ops->submit(cs);
}
@ -625,7 +625,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material)
@@ -1184,7 +1386,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
@@ -1191,7 +1393,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
cs->ops->submit(cs);
}
@ -634,7 +634,7 @@ index 0553d4a..5d97d9a 100644
{
struct wined3d_adapter *adapter = cs->device->adapter;
HRESULT hr;
@@ -1194,6 +1396,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
@@ -1201,6 +1403,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
if (FAILED(hr = state_init(&cs->state, &adapter->gl_info, &adapter->d3d_info,
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT)))
ERR("Failed to initialize CS state, hr %#x.\n", hr);
@ -643,7 +643,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1206,11 +1410,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1213,11 +1417,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
cs->ops->submit(cs);
}
@ -658,7 +658,7 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void *object), void *object)
@@ -1225,12 +1431,14 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
@@ -1232,12 +1438,14 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
cs->ops->submit(cs);
}
@ -674,7 +674,23 @@ index 0553d4a..5d97d9a 100644
}
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags)
@@ -1245,8 +1453,9 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
@@ -1252,12 +1460,14 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
cs->ops->submit(cs);
}
-static void wined3d_cs_exec_unload_resource(struct wined3d_cs *cs, const void *data)
+static UINT wined3d_cs_exec_unload_resource(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_unload_resource *op = data;
struct wined3d_resource *resource = op->resource;
resource->resource_ops->resource_unload(resource);
+
+ return sizeof(*op);
}
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
@@ -1271,8 +1481,9 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
cs->ops->submit(cs);
}
@ -685,7 +701,7 @@ index 0553d4a..5d97d9a 100644
/* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present,
/* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear,
/* WINED3D_CS_OP_DRAW */ wined3d_cs_exec_draw,
@@ -1308,6 +1517,58 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
@@ -1335,6 +1546,58 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
wined3d_cs_st_submit,
};
@ -744,7 +760,7 @@ index 0553d4a..5d97d9a 100644
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
@@ -1334,12 +1595,60 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -1361,12 +1624,60 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
return NULL;
}
@ -833,7 +849,7 @@ index 1dd6a8b..f573dcb 100644
if (appkey) RegCloseKey( appkey );
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index b8511dc..5320680 100644
index 54f3f93..be51bba 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -310,6 +310,7 @@ struct wined3d_settings
@ -844,7 +860,7 @@ index b8511dc..5320680 100644
};
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
@@ -3026,6 +3027,18 @@ HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl
@@ -3029,6 +3030,18 @@ HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl
const struct wined3d_d3d_info *d3d_info, DWORD flags) DECLSPEC_HIDDEN;
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -863,7 +879,7 @@ index b8511dc..5320680 100644
struct wined3d_cs_ops
{
void *(*require_space)(struct wined3d_cs *cs, size_t size);
@@ -3037,9 +3050,14 @@ struct wined3d_cs
@@ -3040,9 +3053,14 @@ struct wined3d_cs
const struct wined3d_cs_ops *ops;
struct wined3d_device *device;
struct wined3d_state state;

View File

@ -1,4 +1,4 @@
From ffb4510b1d1584bdd4571eff25b126ae86082628 Mon Sep 17 00:00:00 2001
From c035e4e85a946c3da7299aa483d5e219bdbbcb1f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 1 Oct 2013 15:30:26 +0200
Subject: wined3d: Give the cs its own state
@ -10,19 +10,19 @@ Subject: wined3d: Give the cs its own state
3 files changed, 81 insertions(+), 17 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 0fbdc2c..e693cde 100644
index 187cb96..43ec54d 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -66,6 +66,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_RESET_STATE,
@@ -67,6 +67,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_DESTROY_OBJECT,
WINED3D_CS_OP_QUERY_ISSUE,
WINED3D_CS_OP_UNLOAD_RESOURCE,
+ WINED3D_CS_OP_STATEBLOCK,
WINED3D_CS_OP_STOP,
};
@@ -298,6 +299,12 @@ struct wined3d_cs_query_issue
DWORD flags;
@@ -305,6 +306,12 @@ struct wined3d_cs_unload_resource
struct wined3d_resource *resource;
};
+struct wined3d_cs_stateblock
@ -34,7 +34,7 @@ index 0fbdc2c..e693cde 100644
/* FIXME: The list synchronization probably isn't particularly fast. */
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
{
@@ -478,7 +485,7 @@ static UINT wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
@@ -485,7 +492,7 @@ static UINT wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
size_t size = FIELD_OFFSET(struct wined3d_cs_clear, rects[op->rect_count]);
device = cs->device;
@ -43,7 +43,7 @@ index 0fbdc2c..e693cde 100644
wined3d_get_draw_rect(state, &draw_rect);
device_clear_render_targets(device, device->adapter->gl_info.limits.buffers,
&cs->state.fb, op->rect_count, op->rects, &draw_rect, op->flags,
@@ -530,7 +537,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
@@ -537,7 +544,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
{
@ -52,7 +52,7 @@ index 0fbdc2c..e693cde 100644
struct wined3d_shader_sampler_map_entry *entry;
struct wined3d_shader_resource_view *view;
const struct wined3d_cs_draw *op = data;
@@ -1067,6 +1074,55 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
@@ -1074,6 +1081,55 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
op->opcode = WINED3D_CS_OP_SET_TEXTURE;
op->stage = stage;
op->texture = texture;
@ -108,15 +108,15 @@ index 0fbdc2c..e693cde 100644
cs->ops->submit(cs);
}
@@ -1485,6 +1541,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state,
@@ -1514,6 +1570,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_DESTROY_OBJECT */ wined3d_cs_exec_destroy_object,
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
/* WINED3D_CS_OP_UNLOAD_RESOURCE */ wined3d_cs_exec_unload_resource,
+ /* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
};
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
@@ -1574,7 +1631,7 @@ done:
@@ -1603,7 +1660,7 @@ done:
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
@ -125,7 +125,7 @@ index 0fbdc2c..e693cde 100644
if (!(cs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cs))))
return NULL;
@@ -1582,8 +1639,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -1611,8 +1668,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
if (FAILED(state_init(&cs->state, gl_info, &device->adapter->d3d_info,
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT)))
{
@ -135,7 +135,7 @@ index 0fbdc2c..e693cde 100644
}
cs->ops = &wined3d_cs_st_ops;
@@ -1592,17 +1648,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -1621,17 +1677,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
cs->data_size = WINED3D_INITIAL_CS_SIZE;
if (!(cs->data = HeapAlloc(GetProcessHeap(), 0, cs->data_size)))
{
@ -155,7 +155,7 @@ index 0fbdc2c..e693cde 100644
}
if (wined3d_settings.cs_multithreaded)
@@ -1615,15 +1667,22 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -1644,15 +1696,22 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, NULL)))
{
ERR("Failed to create wined3d command stream thread.\n");
@ -184,10 +184,10 @@ index 0fbdc2c..e693cde 100644
void wined3d_cs_destroy(struct wined3d_cs *cs)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 48d4af4..07c086f 100644
index 27b32e1..8ae932f 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3545,6 +3545,7 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
@@ -3554,6 +3554,7 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
{
TRACE("device %p, start_vertex %u, vertex_count %u.\n", device, start_vertex, vertex_count);
@ -195,7 +195,7 @@ index 48d4af4..07c086f 100644
wined3d_cs_emit_draw(device->cs, 0, start_vertex, vertex_count, 0, 0, FALSE);
return WINED3D_OK;
@@ -3573,6 +3574,7 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
@@ -3582,6 +3583,7 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
return WINED3DERR_INVALIDCALL;
}
@ -203,7 +203,7 @@ index 48d4af4..07c086f 100644
wined3d_cs_emit_draw(device->cs, device->state.base_vertex_index, start_idx, index_count, 0, 0, TRUE);
return WINED3D_OK;
@@ -3584,6 +3586,7 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
@@ -3593,6 +3595,7 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
TRACE("device %p, start_idx %u, index_count %u, start_instance %u, instance_count %u.\n",
device, start_idx, index_count, start_instance, instance_count);
@ -212,10 +212,10 @@ index 48d4af4..07c086f 100644
start_idx, index_count, start_instance, instance_count, TRUE);
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index b5a8a30..c460520 100644
index 4d5fc99..9055230 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3036,7 +3036,7 @@ struct wined3d_cs_block
@@ -3039,7 +3039,7 @@ struct wined3d_cs_block
{
struct list entry;
UINT pos;
@ -224,7 +224,7 @@ index b5a8a30..c460520 100644
};
struct wined3d_cs_ops
@@ -3080,6 +3080,8 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
@@ -3083,6 +3083,8 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
WORD flags, const struct wined3d_color_key *color_key) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
UINT cb_idx, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;

View File

@ -1,4 +1,4 @@
From 0c8b5c8eb141991e967ff7fd7694be40704233d9 Mon Sep 17 00:00:00 2001
From f3fea3385811f1aa0ce48a65f0b33f9b5aebc695 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 20 Aug 2013 15:12:26 +0200
Subject: wined3d: Send float constant updates through the command stream
@ -10,19 +10,19 @@ Subject: wined3d: Send float constant updates through the command stream
3 files changed, 77 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index e693cde..ec1cc22 100644
index 43ec54d..92c251c 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -67,6 +67,8 @@ enum wined3d_cs_op
WINED3D_CS_OP_DESTROY_OBJECT,
@@ -68,6 +68,8 @@ enum wined3d_cs_op
WINED3D_CS_OP_QUERY_ISSUE,
WINED3D_CS_OP_UNLOAD_RESOURCE,
WINED3D_CS_OP_STATEBLOCK,
+ WINED3D_CS_OP_SET_VS_CONSTS_F,
+ WINED3D_CS_OP_SET_PS_CONSTS_F,
WINED3D_CS_OP_STOP,
};
@@ -305,6 +307,14 @@ struct wined3d_cs_stateblock
@@ -312,6 +314,14 @@ struct wined3d_cs_stateblock
struct wined3d_state state;
};
@ -37,7 +37,7 @@ index e693cde..ec1cc22 100644
/* FIXME: The list synchronization probably isn't particularly fast. */
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
{
@@ -1089,11 +1099,9 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
@@ -1096,11 +1106,9 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
memcpy(cs->state.vs_consts_b, op->state.vs_consts_b, sizeof(cs->state.vs_consts_b));
memcpy(cs->state.vs_consts_i, op->state.vs_consts_i, sizeof(cs->state.vs_consts_i));
@ -49,7 +49,7 @@ index e693cde..ec1cc22 100644
memcpy(cs->state.lights, op->state.lights, sizeof(cs->state.lights));
@@ -1114,11 +1122,9 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
@@ -1121,11 +1129,9 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
memcpy(op->state.vs_consts_b, state->vs_consts_b, sizeof(op->state.vs_consts_b));
memcpy(op->state.vs_consts_i, state->vs_consts_i, sizeof(op->state.vs_consts_i));
@ -61,7 +61,7 @@ index e693cde..ec1cc22 100644
/* FIXME: This is not ideal. CS is still running synchronously, so this is ok.
* It will go away soon anyway. */
@@ -1220,6 +1226,65 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
@@ -1227,6 +1233,65 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
cs->ops->submit(cs);
}
@ -127,9 +127,9 @@ index e693cde..ec1cc22 100644
static UINT wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_set_render_state *op = data;
@@ -1542,6 +1607,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_DESTROY_OBJECT */ wined3d_cs_exec_destroy_object,
@@ -1571,6 +1636,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
/* WINED3D_CS_OP_UNLOAD_RESOURCE */ wined3d_cs_exec_unload_resource,
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
+ /* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
+ /* WINED3D_CS_OP_SET_PS_CONSTS_F */ wined3d_cs_exec_set_ps_consts_f,
@ -137,10 +137,10 @@ index e693cde..ec1cc22 100644
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 07c086f..9e5dfd6 100644
index 8ae932f..7006c62 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2544,7 +2544,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
@@ -2553,7 +2553,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
memset(&device->recording->changed.vs_consts_f[start_idx], 1,
count * sizeof(*device->recording->changed.vs_consts_f));
else
@ -150,7 +150,7 @@ index 07c086f..9e5dfd6 100644
return WINED3D_OK;
}
@@ -2778,7 +2779,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
@@ -2787,7 +2788,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
memset(&device->recording->changed.ps_consts_f[start_idx], 1,
count * sizeof(*device->recording->changed.ps_consts_f));
else
@ -161,18 +161,18 @@ index 07c086f..9e5dfd6 100644
return WINED3D_OK;
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index c460520..567f84a 100644
index 9055230..ebdb49e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3118,6 +3118,8 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
@@ -3083,6 +3083,8 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
WORD flags, const struct wined3d_color_key *color_key) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
UINT cb_idx, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
+ unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs,
const struct wined3d_state *state) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs,
--
2.9.0

View File

@ -1,4 +1,4 @@
From 93cf61ce628c2b237675907ad81eb9292beaedf7 Mon Sep 17 00:00:00 2001
From f62a560d5351df46166c32859e13ab43f7a43453 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 4 Apr 2013 11:50:09 +0200
Subject: wined3d: Request a glFinish before modifying resources outside the cs
@ -6,17 +6,17 @@ Subject: wined3d: Request a glFinish before modifying resources outside the cs
---
dlls/wined3d/buffer.c | 17 +++++++++++++++++
dlls/wined3d/cs.c | 30 ++++++++++++++++++++++++++++++
dlls/wined3d/device.c | 35 +++++++++++++++++++++++++++++++++++
dlls/wined3d/device.c | 27 +++++++++++++++++++++++++++
dlls/wined3d/surface.c | 7 +++++++
dlls/wined3d/texture.c | 14 ++++++++++++++
dlls/wined3d/wined3d_private.h | 1 +
6 files changed, 104 insertions(+)
6 files changed, 96 insertions(+)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 6534b2d..486d770 100644
index fc7b04d..c16578d 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -935,6 +935,15 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte
@@ -931,6 +931,15 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte
void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
{
struct wined3d_context *context;
@ -32,7 +32,7 @@ index 6534b2d..486d770 100644
context = context_acquire(buffer->resource.device, NULL);
buffer_internal_preload(buffer, context, NULL);
context_release(context);
@@ -951,9 +960,17 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
@@ -947,9 +956,17 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
{
LONG count;
BYTE *base;
@ -51,10 +51,10 @@ index 6534b2d..486d770 100644
/* Filter redundant WINED3D_MAP_DISCARD maps. The 3DMark2001 multitexture
* fill rate test seems to depend on this. When we map a buffer with
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index dcbafa6..02489fd 100644
index 92c251c..c7ee4d2 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -67,6 +67,7 @@ enum wined3d_cs_op
@@ -70,6 +70,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_STATEBLOCK,
WINED3D_CS_OP_SET_VS_CONSTS_F,
WINED3D_CS_OP_SET_PS_CONSTS_F,
@ -62,7 +62,7 @@ index dcbafa6..02489fd 100644
WINED3D_CS_OP_STOP,
};
@@ -300,6 +301,11 @@ struct wined3d_cs_set_consts_f
@@ -322,6 +323,11 @@ struct wined3d_cs_set_consts_f
struct wined3d_vec4 constants[1];
};
@ -74,7 +74,7 @@ index dcbafa6..02489fd 100644
/* FIXME: The list synchronization probably isn't particularly fast. */
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
{
@@ -1515,6 +1521,29 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
@@ -1602,6 +1608,29 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
cs->ops->submit(cs);
}
@ -104,7 +104,7 @@ index dcbafa6..02489fd 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -1548,6 +1577,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1638,6 +1667,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
/* WINED3D_CS_OP_SET_PS_CONSTS_F */ wined3d_cs_exec_set_ps_consts_f,
@ -113,10 +113,10 @@ index dcbafa6..02489fd 100644
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 77ca973..60ee130 100644
index 7006c62..efd8093 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2914,6 +2914,13 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO
@@ -2949,6 +2949,13 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO
return hr;
}
@ -130,7 +130,7 @@ index 77ca973..60ee130 100644
wined3d_device_get_transform(device, WINED3D_TS_VIEW, &view_mat);
wined3d_device_get_transform(device, WINED3D_TS_PROJECTION, &proj_mat);
wined3d_device_get_transform(device, WINED3D_TS_WORLD_MATRIX(0), &world_mat);
@@ -3680,6 +3687,13 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
@@ -3715,6 +3722,13 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
++src_skip_levels;
}
@ -144,7 +144,7 @@ index 77ca973..60ee130 100644
/* Make sure that the destination texture is loaded. */
context = context_acquire(device, NULL);
wined3d_texture_load(dst_texture, context, FALSE);
@@ -4210,6 +4224,13 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
@@ -4245,6 +4259,13 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
return WINED3DERR_INVALIDCALL;
}
@ -158,27 +158,12 @@ index 77ca973..60ee130 100644
if (blit_op == WINED3D_BLIT_OP_COLOR_FILL)
return blitter->color_fill(device, view, rect, color);
else
@@ -4533,6 +4554,13 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
TRACE("device %p.\n", device);
+ if (wined3d_settings.cs_multithreaded)
+ {
+ FIXME("Waiting for cs.\n");
+ wined3d_cs_emit_glfinish(device->cs);
+ device->cs->ops->finish(device->cs);
+ }
+
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
{
TRACE("Checking resource %p for eviction.\n", resource);
@@ -4655,6 +4683,13 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4682,6 +4703,12 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
TRACE("device %p, swapchain_desc %p, mode %p, callback %p, reset_state %#x.\n",
device, swapchain_desc, mode, callback, reset_state);
+ if (wined3d_settings.cs_multithreaded)
+ {
+ FIXME("Waiting for cs.\n");
+ wined3d_cs_emit_glfinish(device->cs);
+ device->cs->ops->finish(device->cs);
+ }
@ -187,10 +172,10 @@ index 77ca973..60ee130 100644
{
ERR("Failed to get the first implicit swapchain.\n");
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 33fcf34..6944c72 100644
index c63578a..5601804 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4215,6 +4215,13 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4208,6 +4208,13 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
flags &= ~WINED3D_BLT_DO_NOT_WAIT;
}
@ -205,10 +190,10 @@ index 33fcf34..6944c72 100644
{
WARN("D3D not initialized, using fallback.\n");
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index f6beefc..b09a2de 100644
index 74e4450..1306be9 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1699,6 +1699,13 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -1800,6 +1800,13 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
return WINED3DERR_INVALIDCALL;
}
@ -222,7 +207,7 @@ index f6beefc..b09a2de 100644
flags = wined3d_resource_sanitize_map_flags(resource, flags);
if (device->d3d_initialized)
@@ -2645,6 +2652,13 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
@@ -2958,6 +2965,13 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
if (texture->resource.map_count && !(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT))
return WINED3DERR_INVALIDCALL;
@ -237,17 +222,17 @@ index f6beefc..b09a2de 100644
context = context_acquire(device, NULL);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 56de135..0f5b038 100644
index ebdb49e..58c817d 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3111,6 +3111,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
@@ -3073,6 +3073,7 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs,
void (*callback)(void *object), void *object) DECLSPEC_HIDDEN;
void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned int start_idx, unsigned int index_count,
unsigned int start_instance, unsigned int instance_count, BOOL indexed) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From 95d77becc5a2fb73947a9fbb45dbc928da09cf9a Mon Sep 17 00:00:00 2001
From 7ebe534411e0736bc269649ea40bf6db4d2c898f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 7 Apr 2013 17:33:20 +0200
Subject: wined3d: Send base vertex index updates through the cs
@ -10,10 +10,10 @@ Subject: wined3d: Send base vertex index updates through the cs
3 files changed, 50 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index a68e9e6..0a3780b 100644
index 1cec729..5424965 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -68,6 +68,7 @@ enum wined3d_cs_op
@@ -71,6 +71,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_SET_VS_CONSTS_F,
WINED3D_CS_OP_SET_PS_CONSTS_F,
WINED3D_CS_OP_GLFINISH,
@ -21,7 +21,7 @@ index a68e9e6..0a3780b 100644
WINED3D_CS_OP_STOP,
};
@@ -306,6 +307,12 @@ struct wined3d_cs_finish
@@ -328,6 +329,12 @@ struct wined3d_cs_finish
enum wined3d_cs_op opcode;
};
@ -34,7 +34,7 @@ index a68e9e6..0a3780b 100644
/* FIXME: The list synchronization probably isn't particularly fast. */
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
{
@@ -543,9 +550,24 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
@@ -565,9 +572,24 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
struct wined3d_shader_sampler_map_entry *entry;
struct wined3d_shader_resource_view *view;
const struct wined3d_cs_draw *op = data;
@ -59,7 +59,7 @@ index a68e9e6..0a3780b 100644
if (!cs->device->adapter->gl_info.supported[ARB_DRAW_ELEMENTS_BASE_VERTEX]
&& state->load_base_vertex_index != op->base_vertex_idx)
{
@@ -1086,7 +1108,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
@@ -1108,7 +1130,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
* ops for setting states */
@ -67,7 +67,7 @@ index a68e9e6..0a3780b 100644
cs->state.gl_primitive_type = op->state.gl_primitive_type;
memcpy(cs->state.vs_consts_b, op->state.vs_consts_b, sizeof(cs->state.vs_consts_b));
@@ -1109,7 +1130,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
@@ -1131,7 +1152,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
* ops for setting states */
@ -75,7 +75,7 @@ index a68e9e6..0a3780b 100644
op->state.gl_primitive_type = state->gl_primitive_type;
memcpy(op->state.vs_consts_b, state->vs_consts_b, sizeof(op->state.vs_consts_b));
@@ -1545,6 +1565,28 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
@@ -1632,6 +1652,28 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
cs->ops->submit(cs);
}
@ -104,7 +104,7 @@ index a68e9e6..0a3780b 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -1579,6 +1621,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1669,6 +1711,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
/* WINED3D_CS_OP_SET_PS_CONSTS_F */ wined3d_cs_exec_set_ps_consts_f,
/* WINED3D_CS_OP_GLFINISH */ wined3d_cs_exec_glfinish,
@ -113,10 +113,10 @@ index a68e9e6..0a3780b 100644
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 7a43657..fcb8d7e 100644
index a516505..72266fb 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1987,6 +1987,9 @@ void CDECL wined3d_device_set_base_vertex_index(struct wined3d_device *device, I
@@ -1996,6 +1996,9 @@ void CDECL wined3d_device_set_base_vertex_index(struct wined3d_device *device, I
TRACE("device %p, base_index %d.\n", device, base_index);
device->update_state->base_vertex_index = base_index;
@ -127,18 +127,18 @@ index 7a43657..fcb8d7e 100644
INT CDECL wined3d_device_get_base_vertex_index(const struct wined3d_device *device)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index efa41ae..6096c23 100644
index c2fc67c..0abec70 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3110,6 +3110,8 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
@@ -3076,6 +3076,8 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
+ UINT base_vertex_index) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx,
const struct wined3d_vec4 *plane) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From b0f1bcf4dbb0c48a34335bbe243581e4270e93bd Mon Sep 17 00:00:00 2001
From e5be3dd2d9e963f7f447fb379a2739a2f5428ccb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 7 Apr 2013 17:53:43 +0200
Subject: wined3d: Send primitive type updates through the command stream
@ -11,10 +11,10 @@ Subject: wined3d: Send primitive type updates through the command stream
4 files changed, 40 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 0a3780b..aef2374 100644
index 5424965..d467911 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -69,6 +69,7 @@ enum wined3d_cs_op
@@ -72,6 +72,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_SET_PS_CONSTS_F,
WINED3D_CS_OP_GLFINISH,
WINED3D_CS_OP_SET_BASE_VERTEX_INDEX,
@ -22,7 +22,7 @@ index 0a3780b..aef2374 100644
WINED3D_CS_OP_STOP,
};
@@ -313,6 +314,12 @@ struct wined3d_cs_set_base_vertex_index
@@ -335,6 +336,12 @@ struct wined3d_cs_set_base_vertex_index
UINT base_vertex_index;
};
@ -35,7 +35,7 @@ index 0a3780b..aef2374 100644
/* FIXME: The list synchronization probably isn't particularly fast. */
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
{
@@ -1107,9 +1114,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
@@ -1129,9 +1136,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
* ops for setting states */
@ -45,7 +45,7 @@ index 0a3780b..aef2374 100644
memcpy(cs->state.vs_consts_b, op->state.vs_consts_b, sizeof(cs->state.vs_consts_b));
memcpy(cs->state.vs_consts_i, op->state.vs_consts_i, sizeof(cs->state.vs_consts_i));
@@ -1130,8 +1134,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
@@ -1152,8 +1156,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
* ops for setting states */
@ -54,7 +54,7 @@ index 0a3780b..aef2374 100644
memcpy(op->state.vs_consts_b, state->vs_consts_b, sizeof(op->state.vs_consts_b));
memcpy(op->state.vs_consts_i, state->vs_consts_i, sizeof(op->state.vs_consts_i));
@@ -1587,6 +1589,32 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
@@ -1674,6 +1676,32 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
cs->ops->submit(cs);
}
@ -87,7 +87,7 @@ index 0a3780b..aef2374 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -1622,6 +1650,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1712,6 +1740,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_PS_CONSTS_F */ wined3d_cs_exec_set_ps_consts_f,
/* WINED3D_CS_OP_GLFINISH */ wined3d_cs_exec_glfinish,
/* WINED3D_CS_OP_SET_BASE_VERTEX_INDEX */ wined3d_cs_exec_set_base_vertex_index,
@ -96,10 +96,10 @@ index 0a3780b..aef2374 100644
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index fcb8d7e..36405a1 100644
index 72266fb..7bd3994 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3485,7 +3485,6 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
@@ -3520,7 +3520,6 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
enum wined3d_primitive_type primitive_type)
{
GLenum gl_primitive_type, prev;
@ -107,7 +107,7 @@ index fcb8d7e..36405a1 100644
TRACE("device %p, primitive_type %s\n", device, debug_d3dprimitivetype(primitive_type));
gl_primitive_type = gl_primitive_type_from_d3d(primitive_type);
@@ -3493,8 +3492,8 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
@@ -3528,8 +3527,8 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
device->update_state->gl_primitive_type = gl_primitive_type;
if (device->recording)
device->recording->changed.primitive_type = TRUE;
@ -119,7 +119,7 @@ index fcb8d7e..36405a1 100644
void CDECL wined3d_device_get_primitive_type(const struct wined3d_device *device,
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 08f5ed5..a9f313c 100644
index bb3c0cc..732a45b 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -1009,8 +1009,8 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock)
@ -134,18 +134,18 @@ index 08f5ed5..a9f313c 100644
if (stateblock->changed.indices)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 6096c23..ee8c1cb 100644
index 0abec70..5648bda 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3112,6 +3112,8 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
UINT base_vertex_index) DECLSPEC_HIDDEN;
@@ -3093,6 +3093,8 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_predication(struct wined3d_cs *cs,
struct wined3d_query *predicate, BOOL value) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
+ GLenum primitive_type) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
struct wined3d_rasterizer_state *rasterizer_state) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs,
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From 10d1d1d3b94c9ae89534864389235c2f982cb999 Mon Sep 17 00:00:00 2001
From 5e8ed679aaf41f24f450b08750deb54f4abc24ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 9 Apr 2013 21:50:30 +0200
Subject: wined3d: Send bool constant updates through the command stream
@ -10,11 +10,11 @@ Subject: wined3d: Send bool constant updates through the command stream
3 files changed, 77 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 71603a1..db7699c 100644
index d467911..afec5de 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -68,7 +68,9 @@ enum wined3d_cs_op
WINED3D_CS_OP_QUERY_ISSUE,
@@ -69,7 +69,9 @@ enum wined3d_cs_op
WINED3D_CS_OP_UNLOAD_RESOURCE,
WINED3D_CS_OP_STATEBLOCK,
WINED3D_CS_OP_SET_VS_CONSTS_F,
+ WINED3D_CS_OP_SET_VS_CONSTS_B,
@ -23,7 +23,7 @@ index 71603a1..db7699c 100644
WINED3D_CS_OP_GLFINISH,
WINED3D_CS_OP_SET_BASE_VERTEX_INDEX,
WINED3D_CS_OP_SET_PRIMITIVE_TYPE,
@@ -318,6 +320,14 @@ struct wined3d_cs_set_consts_f
@@ -325,6 +327,14 @@ struct wined3d_cs_set_consts_f
struct wined3d_vec4 constants[1];
};
@ -38,7 +38,7 @@ index 71603a1..db7699c 100644
struct wined3d_cs_finish
{
enum wined3d_cs_op opcode;
@@ -1129,10 +1139,8 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
@@ -1136,10 +1146,8 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
* ops for setting states */
@ -49,7 +49,7 @@ index 71603a1..db7699c 100644
memcpy(cs->state.ps_consts_i, op->state.ps_consts_i, sizeof(cs->state.ps_consts_i));
memcpy(cs->state.lights, op->state.lights, sizeof(cs->state.lights));
@@ -1149,10 +1157,8 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
@@ -1156,10 +1164,8 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
* ops for setting states */
@ -60,7 +60,7 @@ index 71603a1..db7699c 100644
memcpy(op->state.ps_consts_i, state->ps_consts_i, sizeof(op->state.ps_consts_i));
/* FIXME: This is not ideal. CS is still running synchronously, so this is ok.
@@ -1334,6 +1340,63 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
@@ -1341,6 +1347,63 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
op->value = value;
cs->ops->submit(cs);
@ -124,8 +124,8 @@ index 71603a1..db7699c 100644
}
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
@@ -1708,7 +1771,9 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
@@ -1737,7 +1800,9 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_UNLOAD_RESOURCE */ wined3d_cs_exec_unload_resource,
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
+ /* WINED3D_CS_OP_SET_VS_CONSTS_B */ wined3d_cs_exec_set_vs_consts_b,
@ -135,10 +135,10 @@ index 71603a1..db7699c 100644
/* WINED3D_CS_OP_SET_BASE_VERTEX_INDEX */ wined3d_cs_exec_set_base_vertex_index,
/* WINED3D_CS_OP_SET_PRIMITIVE_TYPE */ wined3d_cs_exec_set_primitive_type,
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 9230bd3..55ae32e 100644
index 50535a0..ab4fb98 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2396,7 +2396,7 @@ struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3
@@ -2405,7 +2405,7 @@ struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3
return device->state.sampler[WINED3D_SHADER_TYPE_VERTEX][idx];
}
@ -147,7 +147,7 @@ index 9230bd3..55ae32e 100644
{
UINT i;
@@ -2433,7 +2433,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
@@ -2442,7 +2442,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
}
else
{
@ -157,7 +157,7 @@ index 9230bd3..55ae32e 100644
}
return WINED3D_OK;
@@ -2667,7 +2668,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
@@ -2676,7 +2677,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
}
else
{
@ -168,10 +168,10 @@ index 9230bd3..55ae32e 100644
return WINED3D_OK;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 6741bb5..28a536e 100644
index 2797ac1..db5cc52 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2528,6 +2528,7 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
@@ -2531,6 +2531,7 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
@ -179,15 +179,15 @@ index 6741bb5..28a536e 100644
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -3118,6 +3119,8 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
@@ -3084,6 +3085,8 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
WORD flags, const struct wined3d_color_key *color_key) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
UINT cb_idx, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
+ unsigned int count, const BOOL *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
UINT base_vertex_index) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs,
--
2.9.0

View File

@ -1,4 +1,4 @@
From 53a64b6c48b846b82a5ca1c48465572bcc059c4a Mon Sep 17 00:00:00 2001
From 879bfd8464ee9d78b3bc03b2171fdf20e8253713 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 10 Apr 2013 14:20:47 +0200
Subject: wined3d: Send int constant updates through the command stream
@ -10,10 +10,10 @@ Subject: wined3d: Send int constant updates through the command stream
3 files changed, 75 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index ffec875..de5767e 100644
index afec5de..2f422ba 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -67,8 +67,10 @@ enum wined3d_cs_op
@@ -70,8 +70,10 @@ enum wined3d_cs_op
WINED3D_CS_OP_STATEBLOCK,
WINED3D_CS_OP_SET_VS_CONSTS_F,
WINED3D_CS_OP_SET_VS_CONSTS_B,
@ -24,7 +24,7 @@ index ffec875..de5767e 100644
WINED3D_CS_OP_GLFINISH,
WINED3D_CS_OP_SET_BASE_VERTEX_INDEX,
WINED3D_CS_OP_SET_PRIMITIVE_TYPE,
@@ -313,6 +315,14 @@ struct wined3d_cs_set_consts_b
@@ -335,6 +337,14 @@ struct wined3d_cs_set_consts_b
BOOL constants[1];
};
@ -39,7 +39,7 @@ index ffec875..de5767e 100644
struct wined3d_cs_finish
{
enum wined3d_cs_op opcode;
@@ -992,9 +1002,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
@@ -1146,9 +1156,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
* ops for setting states */
@ -49,7 +49,7 @@ index ffec875..de5767e 100644
memcpy(cs->state.lights, op->state.lights, sizeof(cs->state.lights));
@@ -1010,9 +1017,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
@@ -1164,9 +1171,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
* ops for setting states */
@ -59,7 +59,7 @@ index ffec875..de5767e 100644
/* FIXME: This is not ideal. CS is still running synchronously, so this is ok.
* It will go away soon anyway. */
@@ -1230,6 +1234,63 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
@@ -1406,6 +1410,63 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
cs->ops->submit(cs);
}
@ -123,7 +123,7 @@ index ffec875..de5767e 100644
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_set_texture_state *op = data;
@@ -1579,8 +1640,10 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1801,8 +1862,10 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
/* WINED3D_CS_OP_SET_VS_CONSTS_B */ wined3d_cs_exec_set_vs_consts_b,
@ -135,10 +135,10 @@ index ffec875..de5767e 100644
/* WINED3D_CS_OP_SET_BASE_VERTEX_INDEX */ wined3d_cs_exec_set_base_vertex_index,
/* WINED3D_CS_OP_SET_PRIMITIVE_TYPE */ wined3d_cs_exec_set_primitive_type,
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 1b2e7e3..766e393 100644
index ab4fb98..c0f8dc8 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2457,7 +2457,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
@@ -2492,7 +2492,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
}
else
{
@ -148,7 +148,7 @@ index 1b2e7e3..766e393 100644
}
return WINED3D_OK;
@@ -2692,7 +2693,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
@@ -2727,7 +2728,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
}
else
{
@ -159,18 +159,18 @@ index 1b2e7e3..766e393 100644
return WINED3D_OK;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 3e09851..b783c7e 100644
index db5cc52..ae13efb 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3013,6 +3013,8 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
@@ -3089,6 +3089,8 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
unsigned int count, const BOOL *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
+ unsigned int count, const struct wined3d_ivec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
UINT base_vertex_index) DECLSPEC_HIDDEN;
void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs,
const struct wined3d_state *state) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs,
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From dec9faf13d51f50f6e7393490a2634f4482e6ea0 Mon Sep 17 00:00:00 2001
From d72ba7f4c8842b750e822fe95d91274f0c5e6d51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 10 Apr 2013 17:16:02 +0200
Subject: wined3d: Send light updates through the command stream
@ -10,18 +10,18 @@ Subject: wined3d: Send light updates through the command stream
3 files changed, 174 insertions(+), 64 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 0ca8f23..da077f7 100644
index 2f422ba..d03dd1c 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -66,7 +66,6 @@ enum wined3d_cs_op
WINED3D_CS_OP_RESET_STATE,
@@ -67,7 +67,6 @@ enum wined3d_cs_op
WINED3D_CS_OP_DESTROY_OBJECT,
WINED3D_CS_OP_QUERY_ISSUE,
WINED3D_CS_OP_UNLOAD_RESOURCE,
- WINED3D_CS_OP_STATEBLOCK,
WINED3D_CS_OP_SET_VS_CONSTS_F,
WINED3D_CS_OP_SET_VS_CONSTS_B,
WINED3D_CS_OP_SET_VS_CONSTS_I,
@@ -76,6 +75,8 @@ enum wined3d_cs_op
@@ -77,6 +76,8 @@ enum wined3d_cs_op
WINED3D_CS_OP_GLFINISH,
WINED3D_CS_OP_SET_BASE_VERTEX_INDEX,
WINED3D_CS_OP_SET_PRIMITIVE_TYPE,
@ -30,8 +30,8 @@ index 0ca8f23..da077f7 100644
WINED3D_CS_OP_STOP,
};
@@ -308,12 +309,6 @@ struct wined3d_cs_query_issue
DWORD flags;
@@ -315,12 +316,6 @@ struct wined3d_cs_unload_resource
struct wined3d_resource *resource;
};
-struct wined3d_cs_stateblock
@ -43,7 +43,7 @@ index 0ca8f23..da077f7 100644
struct wined3d_cs_set_consts_f
{
enum wined3d_cs_op opcode;
@@ -355,6 +350,19 @@ struct wined3d_cs_set_primitive_type
@@ -362,6 +357,19 @@ struct wined3d_cs_set_primitive_type
GLenum gl_primitive_type;
};
@ -63,7 +63,7 @@ index 0ca8f23..da077f7 100644
/* FIXME: The list synchronization probably isn't particularly fast. */
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
{
@@ -1143,35 +1151,6 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
@@ -1150,35 +1158,6 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
cs->ops->submit(cs);
}
@ -99,7 +99,7 @@ index 0ca8f23..da077f7 100644
static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_set_shader_resource_view *op = data;
@@ -1798,6 +1777,152 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
@@ -1826,6 +1805,152 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
cs->ops->submit(cs);
}
@ -252,15 +252,15 @@ index 0ca8f23..da077f7 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -1830,7 +1955,6 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state,
@@ -1859,7 +1984,6 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_DESTROY_OBJECT */ wined3d_cs_exec_destroy_object,
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
/* WINED3D_CS_OP_UNLOAD_RESOURCE */ wined3d_cs_exec_unload_resource,
- /* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
/* WINED3D_CS_OP_SET_VS_CONSTS_B */ wined3d_cs_exec_set_vs_consts_b,
/* WINED3D_CS_OP_SET_VS_CONSTS_I */ wined3d_cs_exec_set_vs_consts_i,
@@ -1840,6 +1964,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1869,6 +1993,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_GLFINISH */ wined3d_cs_exec_glfinish,
/* WINED3D_CS_OP_SET_BASE_VERTEX_INDEX */ wined3d_cs_exec_set_base_vertex_index,
/* WINED3D_CS_OP_SET_PRIMITIVE_TYPE */ wined3d_cs_exec_set_primitive_type,
@ -270,10 +270,10 @@ index 0ca8f23..da077f7 100644
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 91ab533..caec3e88 100644
index c0f8dc8..ee197af 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1601,14 +1601,6 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
@@ -1610,14 +1610,6 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
light->direction.x, light->direction.y, light->direction.z,
light->range, light->falloff, light->theta, light->phi);
@ -288,7 +288,7 @@ index 91ab533..caec3e88 100644
/* Save away the information. */
object->OriginalParms = *light;
@@ -1688,6 +1680,9 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
@@ -1697,6 +1689,9 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
FIXME("Unrecognized light type %#x.\n", light->type);
}
@ -298,7 +298,7 @@ index 91ab533..caec3e88 100644
return WINED3D_OK;
}
@@ -1760,12 +1755,6 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN
@@ -1769,12 +1764,6 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN
{
if (light_info->glIndex != -1)
{
@ -311,7 +311,7 @@ index 91ab533..caec3e88 100644
device->update_state->lights[light_info->glIndex] = NULL;
light_info->glIndex = -1;
}
@@ -1807,16 +1796,12 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN
@@ -1816,16 +1805,12 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN
WARN("Too many concurrently active lights\n");
return WINED3D_OK;
}
@ -331,7 +331,7 @@ index 91ab533..caec3e88 100644
return WINED3D_OK;
}
@@ -3540,7 +3525,6 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
@@ -3549,7 +3534,6 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT
{
TRACE("device %p, start_vertex %u, vertex_count %u.\n", device, start_vertex, vertex_count);
@ -339,7 +339,7 @@ index 91ab533..caec3e88 100644
wined3d_cs_emit_draw(device->cs, 0, start_vertex, vertex_count, 0, 0, FALSE);
return WINED3D_OK;
@@ -3569,7 +3553,6 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
@@ -3578,7 +3562,6 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic
return WINED3DERR_INVALIDCALL;
}
@ -347,7 +347,7 @@ index 91ab533..caec3e88 100644
wined3d_cs_emit_draw(device->cs, device->state.base_vertex_index, start_idx, index_count, 0, 0, TRUE);
return WINED3D_OK;
@@ -3581,7 +3564,6 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
@@ -3590,7 +3573,6 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
TRACE("device %p, start_idx %u, index_count %u, start_instance %u, instance_count %u.\n",
device, start_idx, index_count, start_instance, instance_count);
@ -356,10 +356,10 @@ index 91ab533..caec3e88 100644
start_idx, index_count, start_instance, instance_count, TRUE);
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 18f7d78..3069877 100644
index ae13efb..4c57f7b 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3032,7 +3032,9 @@ struct wined3d_cs_block
@@ -3035,7 +3035,9 @@ struct wined3d_cs_block
{
struct list entry;
UINT pos;
@ -370,24 +370,21 @@ index 18f7d78..3069877 100644
};
struct wined3d_cs_ops
@@ -3079,8 +3081,6 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
WORD flags, const struct wined3d_color_key *color_key) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
UINT cb_idx, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
@@ -3091,12 +3093,12 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
unsigned int count, const struct wined3d_ivec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
-void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs,
- const struct wined3d_state *state) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs,
struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
@@ -3128,6 +3128,8 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
UINT base_vertex_index) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
GLenum primitive_type) DECLSPEC_HIDDEN;
enum wined3d_format_id format_id, unsigned int offset) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light_info *light) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enable) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_predication(struct wined3d_cs *cs,
struct wined3d_query *predicate, BOOL value) DECLSPEC_HIDDEN;
--
2.9.0

View File

@ -1,18 +1,18 @@
From 902b45818f4c0d733065be2e253d8a39f41b1cfe Mon Sep 17 00:00:00 2001
From db37e592d76e30834d83029cdfdec6f42a322086 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 10 Apr 2013 19:10:41 +0200
Subject: wined3d: Prevent the command stream from running ahead too far
---
dlls/wined3d/cs.c | 8 ++++++++
dlls/wined3d/wined3d_private.h | 2 ++
2 files changed, 10 insertions(+)
dlls/wined3d/cs.c | 16 ++++++++++++++++
dlls/wined3d/wined3d_private.h | 2 ++
2 files changed, 18 insertions(+)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 00c26b4..509ed82 100644
index d03dd1c..7311ac5 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -487,6 +487,8 @@ static UINT wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
@@ -509,6 +509,8 @@ static UINT wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
swapchain->swapchain_ops->swapchain_present(swapchain, &op->src_rect, &op->dst_rect, op->flags,
cs->state.fb.depth_stencil);
@ -21,7 +21,7 @@ index 00c26b4..509ed82 100644
wined3d_resource_release(&swapchain->front_buffer->resource);
for (i = 0; i < swapchain->desc.backbuffer_count; ++i)
{
@@ -501,6 +503,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
@@ -523,6 +525,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
{
struct wined3d_cs_present *op;
unsigned int i;
@ -29,7 +29,7 @@ index 00c26b4..509ed82 100644
op = cs->ops->require_space(cs, sizeof(*op));
op->opcode = WINED3D_CS_OP_PRESENT;
@@ -516,7 +519,12 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
@@ -538,7 +541,20 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
wined3d_resource_acquire(&swapchain->back_buffers[i]->resource);
}
@ -37,16 +37,24 @@ index 00c26b4..509ed82 100644
+
cs->ops->submit(cs);
+
+ /* D3D10 documentation suggests that Windows allows the game to run
+ * 3 frames ahead of the GPU. Increasing this above 1 causes uneven
+ * animation in some games, most notably StarCraft II. The framerates
+ * don't show this problem. The issue is more noticable with vsync
+ * on, but also happens with vsync off.
+ *
+ * In Counter-Strike: Source a frame difference of 3 causes noticable
+ * input delay that makes the game unplayable. */
+ while (pending > 1)
+ pending = InterlockedCompareExchange(&cs->pending_presents, 0, 0);
}
static UINT wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 76c7fbf..b49ceaf 100644
index 4c57f7b..1d84bf9 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3012,6 +3012,8 @@ struct wined3d_cs
@@ -3061,6 +3061,8 @@ struct wined3d_cs
struct wined3d_cs_list free_list;
struct wined3d_cs_list exec_list;
@ -56,5 +64,5 @@ index 76c7fbf..b49ceaf 100644
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From 524919d5d089cbcb8759cdad91c55b767ae735c6 Mon Sep 17 00:00:00 2001
From 9674800f8e960faf599b27ac2c72bed131fb02e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Mon, 29 Apr 2013 18:49:53 +0200
Subject: wined3d: Send blits through the command stream.
@ -6,30 +6,16 @@ Subject: wined3d: Send blits through the command stream.
This needs more work. This patch breaks error handling, and the split
between surface_blt and surface_blt_ugly isn't particularly nice.
---
dlls/d3d9/tests/visual.c | 2 +-
dlls/wined3d/cs.c | 50 ++++++++
dlls/wined3d/surface.c | 253 ++++++++++++++++++++++++-----------------
dlls/wined3d/wined3d_private.h | 8 ++
4 files changed, 208 insertions(+), 105 deletions(-)
3 files changed, 207 insertions(+), 104 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index a2adc54..ccff548 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -1336,7 +1336,7 @@ static void color_fill_test(void)
* result on Wine.
* {D3DFMT_YUY2, "D3DFMT_YUY2", BLOCKS, 0},
* {D3DFMT_UYVY, "D3DFMT_UYVY", BLOCKS, 0}, */
- {D3DFMT_DXT1, "D3DFMT_DXT1", BLOCKS | TODO_FILL_RETURN, 0},
+ {D3DFMT_DXT1, "D3DFMT_DXT1", BLOCKS, 0},
/* Vendor-specific formats like ATI2N are a non-issue here since they're not
* supported as offscreen plain surfaces and do not support D3DUSAGE_RENDERTARGET
* when created as texture. */
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index f6c2b68..25f7b3e 100644
index 62e250c..3465f40 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -75,6 +75,7 @@ enum wined3d_cs_op
@@ -78,6 +78,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_SET_PRIMITIVE_TYPE,
WINED3D_CS_OP_SET_LIGHT,
WINED3D_CS_OP_SET_LIGHT_ENABLE,
@ -37,7 +23,7 @@ index f6c2b68..25f7b3e 100644
WINED3D_CS_OP_STOP,
};
@@ -348,6 +349,18 @@ struct wined3d_cs_set_light_enable
@@ -370,6 +371,18 @@ struct wined3d_cs_set_light_enable
BOOL enable;
};
@ -56,7 +42,7 @@ index f6c2b68..25f7b3e 100644
/* FIXME: The list synchronization probably isn't particularly fast. */
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
{
@@ -1661,6 +1674,9 @@ static UINT wined3d_cs_exec_glfinish(struct wined3d_cs *cs, const void *data)
@@ -1756,6 +1769,9 @@ static UINT wined3d_cs_exec_glfinish(struct wined3d_cs *cs, const void *data)
struct wined3d_device *device = cs->device;
struct wined3d_context *context;
@ -66,7 +52,7 @@ index f6c2b68..25f7b3e 100644
context = context_acquire(device, NULL);
context->gl_info->gl_ops.gl.p_glFinish();
context_release(context);
@@ -1872,6 +1888,38 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
@@ -1967,6 +1983,38 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
cs->ops->submit(cs);
}
@ -105,7 +91,7 @@ index f6c2b68..25f7b3e 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -1913,6 +1961,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2011,6 +2059,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_PRIMITIVE_TYPE */ wined3d_cs_exec_set_primitive_type,
/* WINED3D_CS_OP_SET_LIGHT */ wined3d_cs_exec_set_light,
/* WINED3D_CS_OP_SET_LIGHT_ENABLE */ wined3d_cs_exec_set_light_enable,
@ -113,7 +99,7 @@ index f6c2b68..25f7b3e 100644
};
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
@@ -1991,6 +2040,7 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
@@ -2089,6 +2138,7 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
TRACE("Started.\n");
@ -122,10 +108,10 @@ index f6c2b68..25f7b3e 100644
{
struct wined3d_cs_block *block;
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 6944c72..d1cc5f6 100644
index 5601804..ac6eddb 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4110,7 +4110,7 @@ const struct blit_shader cpu_blit = {
@@ -4103,7 +4103,7 @@ const struct blit_shader cpu_blit = {
cpu_blit_blit_surface,
};
@ -134,7 +120,7 @@ index 6944c72..d1cc5f6 100644
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
{
@@ -4120,9 +4120,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4113,9 +4113,8 @@ 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;
@ -146,7 +132,7 @@ index 6944c72..d1cc5f6 100644
DWORD src_ds_flags, dst_ds_flags;
BOOL scale, convert;
@@ -4135,91 +4134,17 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4128,91 +4127,17 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
| WINED3D_BLT_DO_NOT_WAIT
| WINED3D_BLT_ALPHA_TEST;
@ -243,7 +229,7 @@ index 6944c72..d1cc5f6 100644
}
if (!device->d3d_initialized)
@@ -4244,11 +4169,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4237,11 +4162,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
goto fallback;
}
@ -255,7 +241,7 @@ index 6944c72..d1cc5f6 100644
dst_swapchain = dst_texture->swapchain;
/* This isn't strictly needed. FBO blits for example could deal with
@@ -4284,22 +4204,16 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4277,22 +4197,16 @@ 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))
@ -281,7 +267,7 @@ index 6944c72..d1cc5f6 100644
}
}
else
@@ -4335,7 +4249,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4328,7 +4242,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
goto fallback;
if (SUCCEEDED(surface_color_fill(dst_surface, dst_rect, &color)))
@ -290,7 +276,7 @@ index 6944c72..d1cc5f6 100644
}
else
{
@@ -4378,7 +4292,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4371,7 +4285,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
context, dst_texture->resource.draw_binding);
context_release(context);
}
@ -299,7 +285,7 @@ index 6944c72..d1cc5f6 100644
}
}
}
@@ -4402,7 +4316,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4395,7 +4309,7 @@ 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;
@ -308,7 +294,7 @@ index 6944c72..d1cc5f6 100644
}
if (fbo_blit_supported(&device->adapter->gl_info, blit_op,
@@ -4423,7 +4337,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4416,7 +4330,7 @@ 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);
@ -317,7 +303,7 @@ index 6944c72..d1cc5f6 100644
}
blitter = wined3d_select_blitter(&device->adapter->gl_info, &device->adapter->d3d_info, blit_op,
@@ -4433,7 +4347,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4426,7 +4340,7 @@ 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);
@ -326,7 +312,7 @@ index 6944c72..d1cc5f6 100644
}
}
}
@@ -4441,9 +4355,140 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4434,9 +4348,140 @@ 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)))
@ -470,10 +456,10 @@ index 6944c72..d1cc5f6 100644
+ return WINED3D_OK;
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 8e09b0f..d9d610d 100644
index 1d84bf9..d632cfd 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2904,6 +2904,9 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -2913,6 +2913,9 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point,
BOOL srgb, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
@ -483,7 +469,7 @@ index 8e09b0f..d9d610d 100644
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
@@ -3044,6 +3047,7 @@ struct wined3d_cs
@@ -3053,6 +3056,7 @@ struct wined3d_cs
struct wined3d_device *device;
struct wined3d_state state;
HANDLE thread;
@ -491,17 +477,17 @@ index 8e09b0f..d9d610d 100644
DWORD tls_idx;
struct wined3d_surface *onscreen_depth_stencil;
@@ -3123,6 +3127,10 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
GLenum primitive_type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light_info *light) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enable) DECLSPEC_HIDDEN;
@@ -3070,6 +3074,10 @@ void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs, struct wined3d_context *context,
struct wined3d_surface *depth_stencil) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surface,
+ const RECT *dst_rect, struct wined3d_surface *src_surface,
+ const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx,
+ enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs,
--
2.8.0
2.9.0

View File

@ -1,31 +1,17 @@
From f8e2c7f9ecd141f831b29d41beaa1e3b473fc1e9 Mon Sep 17 00:00:00 2001
From 62fb174940b36a427ae7c6b2ffd07f431da54dc6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Fri, 28 Aug 2015 00:01:39 +0200
Subject: wined3d: Hack to reject unsupported color fills.
---
dlls/d3d9/tests/visual.c | 2 +-
dlls/wined3d/surface.c | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
dlls/wined3d/surface.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 0c64b31..a308311 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -1339,7 +1339,7 @@ static void color_fill_test(void)
* result on Wine.
* {D3DFMT_YUY2, "D3DFMT_YUY2", BLOCKS, 0},
* {D3DFMT_UYVY, "D3DFMT_UYVY", BLOCKS, 0}, */
- {D3DFMT_DXT1, "D3DFMT_DXT1", BLOCKS, 0},
+ {D3DFMT_DXT1, "D3DFMT_DXT1", BLOCKS | TODO_FILL_RETURN, 0},
/* Vendor-specific formats like ATI2N are a non-issue here since they're not
* supported as offscreen plain surfaces and do not support D3DUSAGE_RENDERTARGET
* when created as texture. */
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 3423e83..978c826 100644
index ac6eddb..ea9c210 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4313,6 +4313,14 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4454,6 +4454,14 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
}
}
@ -41,5 +27,5 @@ index 3423e83..978c826 100644
flags &= ~WINED3D_BLT_FX;
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From 59429a42d6de889fdbda3bd1f05e2d6cef45712a Mon Sep 17 00:00:00 2001
From 9e967922aa91e11c19bb935bdcf4dddc739d547e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 4 Jul 2013 21:10:16 +0200
Subject: wined3d: Send render target view clears through the command stream
@ -10,10 +10,10 @@ Subject: wined3d: Send render target view clears through the command stream
3 files changed, 53 insertions(+), 12 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 25f7b3e..8496d42 100644
index 201d596..356461c 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -76,6 +76,7 @@ enum wined3d_cs_op
@@ -79,6 +79,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_SET_LIGHT,
WINED3D_CS_OP_SET_LIGHT_ENABLE,
WINED3D_CS_OP_BLT,
@ -21,7 +21,7 @@ index 25f7b3e..8496d42 100644
WINED3D_CS_OP_STOP,
};
@@ -361,6 +362,18 @@ struct wined3d_cs_blt
@@ -383,6 +384,18 @@ struct wined3d_cs_blt
enum wined3d_texture_filter_type filter;
};
@ -40,7 +40,7 @@ index 25f7b3e..8496d42 100644
/* FIXME: The list synchronization probably isn't particularly fast. */
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
{
@@ -1920,6 +1933,39 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
@@ -2007,6 +2020,39 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
cs->ops->submit(cs);
}
@ -80,7 +80,7 @@ index 25f7b3e..8496d42 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -1962,6 +2008,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2052,6 +2098,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_LIGHT */ wined3d_cs_exec_set_light,
/* WINED3D_CS_OP_SET_LIGHT_ENABLE */ wined3d_cs_exec_set_light_enable,
/* WINED3D_CS_OP_BLT */ wined3d_cs_exec_blt,
@ -89,10 +89,10 @@ index 25f7b3e..8496d42 100644
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 7946e7d..5a1580c 100644
index 6286b49..d15ff97 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4181,8 +4181,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
@@ -4216,8 +4216,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
{
const struct blit_shader *blitter;
struct wined3d_resource *resource;
@ -102,7 +102,7 @@ index 7946e7d..5a1580c 100644
TRACE("device %p, view %p, rect %s, flags %#x, color %s, depth %.8e, stencil %u.\n",
device, view, wine_dbgstr_rect(rect), flags, debug_color(color), depth, stencil);
@@ -4221,17 +4221,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
@@ -4256,17 +4256,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
return WINED3DERR_INVALIDCALL;
}
@ -123,19 +123,19 @@ index 7946e7d..5a1580c 100644
struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device,
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index d9d610d..426c10d 100644
index f41915b..ec650d5 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3131,6 +3131,9 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
const RECT *dst_rect, struct wined3d_surface *src_surface,
const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx,
@@ -3080,6 +3080,9 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
+ const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil,
+ const struct blit_shader *blitter) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs,
void (*callback)(void *object), void *object) DECLSPEC_HIDDEN;
void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned int start_idx, unsigned int index_count,
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From 39ded1220f3314f3ffe059fa6791444ea7e8b5c1 Mon Sep 17 00:00:00 2001
From 9ddf0916b91ba7b9cc77b79ac3b4030d5b6c9dee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
Date: Sun, 3 Apr 2016 19:34:19 +0100
Subject: wined3d: send texture maps through the command stream
@ -11,10 +11,10 @@ Slow version only. Good enough to dodge some Nvidia bugs in the ddraw tests.
3 files changed, 168 insertions(+), 85 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 737c39a..0fc98be 100644
index f6b6b49..6dd95af 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -79,6 +79,8 @@ enum wined3d_cs_op
@@ -80,6 +80,8 @@ enum wined3d_cs_op
WINED3D_CS_OP_SET_LIGHT_ENABLE,
WINED3D_CS_OP_BLT,
WINED3D_CS_OP_CLEAR_RTV,
@ -23,7 +23,7 @@ index 737c39a..0fc98be 100644
WINED3D_CS_OP_STOP,
};
@@ -389,6 +391,22 @@ struct wined3d_cs_clear_rtv
@@ -396,6 +398,22 @@ struct wined3d_cs_clear_rtv
const struct blit_shader *blitter;
};
@ -46,7 +46,7 @@ index 737c39a..0fc98be 100644
/* FIXME: The list synchronization probably isn't particularly fast. */
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
{
@@ -2025,6 +2043,59 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
@@ -2061,6 +2079,59 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
cs->ops->submit(cs);
}
@ -106,7 +106,7 @@ index 737c39a..0fc98be 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -2070,6 +2141,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2107,6 +2178,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_LIGHT_ENABLE */ wined3d_cs_exec_set_light_enable,
/* WINED3D_CS_OP_BLT */ wined3d_cs_exec_blt,
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
@ -116,10 +116,10 @@ index 737c39a..0fc98be 100644
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 2437b5a..cf93667 100644
index b1ac7bf..1acf5d5 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1750,6 +1750,63 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
@@ -1749,6 +1749,63 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
wined3d_texture_unload_gl_texture(texture);
}
@ -183,7 +183,7 @@ index 2437b5a..cf93667 100644
static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
{
@@ -1757,13 +1814,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -1756,13 +1813,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
struct wined3d_texture_sub_resource *sub_resource;
struct wined3d_device *device = resource->device;
unsigned int fmt_flags = resource->format_flags;
@ -197,7 +197,7 @@ index 2437b5a..cf93667 100644
TRACE("resource %p, sub_resource_idx %u, map_desc %p, box %s, flags %#x.\n",
resource, sub_resource_idx, map_desc, debug_box(box), flags);
@@ -1808,53 +1861,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -1807,53 +1860,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
return WINED3DERR_INVALIDCALL;
}
@ -252,7 +252,7 @@ index 2437b5a..cf93667 100644
if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
{
@@ -1890,17 +1899,6 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -1889,17 +1898,6 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
}
}
@ -270,7 +270,7 @@ index 2437b5a..cf93667 100644
++resource->map_count;
++sub_resource->map_count;
@@ -1910,14 +1908,38 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -1909,14 +1907,38 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
return WINED3D_OK;
}
@ -313,7 +313,7 @@ index 2437b5a..cf93667 100644
TRACE("resource %p, sub_resource_idx %u.\n", resource, sub_resource_idx);
@@ -1933,27 +1955,7 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
@@ -1932,27 +1954,7 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
return WINEDDERR_NOTLOCKED;
}
@ -343,7 +343,7 @@ index 2437b5a..cf93667 100644
--sub_resource->map_count;
if (!--resource->map_count && texture->update_map_binding)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index c7b2e81..bc7ba09 100644
index 4862f79..d9c33c6 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2787,6 +2787,8 @@ void *wined3d_texture_map_bo_address(const struct wined3d_bo_address *data, size
@ -364,17 +364,17 @@ index c7b2e81..bc7ba09 100644
void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx,
const struct wined3d_context *context, const struct wined3d_const_bo_address *data,
unsigned int row_pitch, unsigned int slice_pitch) DECLSPEC_HIDDEN;
@@ -3146,6 +3150,10 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil,
const struct blit_shader *blitter) DECLSPEC_HIDDEN;
@@ -3146,6 +3150,10 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
+void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture *texture,
+ unsigned int sub_resource_idx, DWORD flags) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture *texture,
+ unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.9.0

View File

@ -1,15 +1,15 @@
From baa655f9be4d40201483994dfd81fd166ca4484e Mon Sep 17 00:00:00 2001
From e7e3a3a2157e282988cb3350745373259a5d040f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 4 Jul 2013 23:33:14 +0200
Subject: wined3d: Replace the linked lists with a ringbuffer
---
dlls/wined3d/cs.c | 369 ++++++++++++++++++-----------------------
dlls/wined3d/cs.c | 371 ++++++++++++++++++-----------------------
dlls/wined3d/wined3d_private.h | 20 +--
2 files changed, 164 insertions(+), 225 deletions(-)
2 files changed, 165 insertions(+), 226 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 0fc98be..10df183 100644
index 6dd95af..f66056b 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -22,20 +22,10 @@
@ -35,7 +35,7 @@ index 0fc98be..10df183 100644
WINED3D_CS_OP_FENCE,
WINED3D_CS_OP_PRESENT,
WINED3D_CS_OP_CLEAR,
@@ -407,99 +397,30 @@ struct wined3d_cs_texture_unmap
@@ -414,99 +404,30 @@ struct wined3d_cs_texture_unmap
unsigned int sub_resource_idx;
};
@ -149,7 +149,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_fence(struct wined3d_cs *cs, const void *data)
@@ -520,14 +441,14 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
@@ -527,14 +448,14 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
op = cs->ops->require_space(cs, sizeof(*op));
op->opcode = WINED3D_CS_OP_FENCE;
op->signalled = signalled;
@ -166,16 +166,16 @@ index 0fc98be..10df183 100644
/* A busy wait should be fine, we're not supposed to have to wait very
* long. */
@@ -580,7 +501,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
@@ -587,7 +508,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
pending = InterlockedIncrement(&cs->pending_presents);
- cs->ops->submit(cs);
+ cs->ops->submit(cs, sizeof(*op));
while (pending > 1)
pending = InterlockedCompareExchange(&cs->pending_presents, 0, 0);
@@ -622,8 +543,8 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
/* D3D10 documentation suggests that Windows allows the game to run
* 3 frames ahead of the GPU. Increasing this above 1 causes uneven
@@ -637,8 +558,8 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
const struct wined3d_state *state = &cs->device->state;
struct wined3d_cs_clear *op;
unsigned int i;
@ -186,7 +186,7 @@ index 0fc98be..10df183 100644
op->opcode = WINED3D_CS_OP_CLEAR;
op->flags = flags;
op->color = *color;
@@ -643,7 +564,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
@@ -658,7 +579,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
wined3d_resource_acquire(state->fb.depth_stencil->resource);
@ -195,7 +195,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
@@ -784,7 +705,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
@@ -799,7 +720,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
}
}
@ -204,7 +204,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_predication(struct wined3d_cs *cs, const void *data)
@@ -806,7 +727,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
@@ -821,7 +742,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
op->predicate = predicate;
op->value = value;
@ -213,7 +213,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_viewport(struct wined3d_cs *cs, const void *data)
@@ -827,7 +748,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
@@ -842,7 +763,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
op->opcode = WINED3D_CS_OP_SET_VIEWPORT;
op->viewport = *viewport;
@ -222,7 +222,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_scissor_rect(struct wined3d_cs *cs, const void *data)
@@ -848,7 +769,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
@@ -863,7 +784,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECT;
op->rect = *rect;
@ -231,7 +231,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const void *data)
@@ -871,7 +792,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
@@ -886,7 +807,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
op->view_idx = view_idx;
op->view = view;
@ -240,7 +240,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const void *data)
@@ -925,7 +846,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
@@ -940,7 +861,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW;
op->view = view;
@ -249,7 +249,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_vertex_declaration(struct wined3d_cs *cs, const void *data)
@@ -946,7 +867,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
@@ -961,7 +882,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
op->declaration = declaration;
@ -258,7 +258,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void *data)
@@ -983,7 +904,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
@@ -998,7 +919,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
op->offset = offset;
op->stride = stride;
@ -267,7 +267,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const void *data)
@@ -1010,7 +931,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
@@ -1025,7 +946,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
op->frequency = frequency;
op->flags = flags;
@ -276,7 +276,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void *data)
@@ -1043,7 +964,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
@@ -1058,7 +979,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
op->buffer = buffer;
op->offset = offset;
@ -285,7 +285,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *data)
@@ -1077,7 +998,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
@@ -1092,7 +1013,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
op->format_id = format_id;
op->offset = offset;
@ -294,7 +294,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const void *data)
@@ -1108,7 +1029,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
@@ -1123,7 +1044,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
op->cb_idx = cb_idx;
op->buffer = buffer;
@ -303,7 +303,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
@@ -1200,7 +1121,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
@@ -1215,7 +1136,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
op->opcode = WINED3D_CS_OP_SET_TEXTURE;
op->stage = stage;
op->texture = texture;
@ -312,7 +312,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, const void *data)
@@ -1224,7 +1145,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
@@ -1239,7 +1160,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
op->view_idx = view_idx;
op->view = view;
@ -321,7 +321,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
@@ -1248,7 +1169,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1263,7 +1184,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
op->sampler_idx = sampler_idx;
op->sampler = sampler;
@ -330,7 +330,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
@@ -1271,7 +1192,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1286,7 +1207,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
op->type = type;
op->shader = shader;
@ -339,7 +339,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_rasterizer_state(struct wined3d_cs *cs, const void *data)
@@ -1293,7 +1214,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
@@ -1308,7 +1229,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
op->opcode = WINED3D_CS_OP_SET_RASTERIZER_STATE;
op->state = rasterizer_state;
@ -348,7 +348,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_vs_consts_f(struct wined3d_cs *cs, const void *data)
@@ -1326,8 +1247,9 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
@@ -1341,8 +1262,9 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
const struct wined3d_vec4 *constants, enum wined3d_shader_type type)
{
struct wined3d_cs_set_consts_f *op;
@ -359,7 +359,7 @@ index 0fc98be..10df183 100644
switch (type)
{
case WINED3D_SHADER_TYPE_PIXEL:
@@ -1352,7 +1274,7 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
@@ -1367,7 +1289,7 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
op->count = count;
memcpy(op->constants, constants, sizeof(op->constants[0]) * count);
@ -368,7 +368,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *data)
@@ -1374,8 +1296,8 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
@@ -1389,8 +1311,8 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
op->state = state;
op->value = value;
@ -379,7 +379,7 @@ index 0fc98be..10df183 100644
static UINT wined3d_cs_exec_set_vs_consts_b(struct wined3d_cs *cs, const void *data)
{
@@ -1405,8 +1327,9 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
@@ -1420,8 +1342,9 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
unsigned int count, const BOOL *constants, enum wined3d_shader_type type)
{
struct wined3d_cs_set_consts_b *op;
@ -390,7 +390,7 @@ index 0fc98be..10df183 100644
switch (type)
{
case WINED3D_SHADER_TYPE_PIXEL:
@@ -1431,7 +1354,7 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
@@ -1446,7 +1369,7 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
op->count = count;
memcpy(op->constants, constants, sizeof(op->constants[0]) * count);
@ -399,7 +399,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_vs_consts_i(struct wined3d_cs *cs, const void *data)
@@ -1462,8 +1385,9 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
@@ -1477,8 +1400,9 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
const struct wined3d_ivec4 *constants, enum wined3d_shader_type type)
{
struct wined3d_cs_set_consts_i *op;
@ -410,7 +410,7 @@ index 0fc98be..10df183 100644
switch (type)
{
case WINED3D_SHADER_TYPE_PIXEL:
@@ -1488,7 +1412,7 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
@@ -1503,7 +1427,7 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
op->count = count;
memcpy(op->constants, constants, sizeof(op->constants[0]) * count);
@ -419,7 +419,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
@@ -1512,7 +1436,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -1527,7 +1451,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
op->state = state;
op->value = value;
@ -428,7 +428,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_sampler_state(struct wined3d_cs *cs, const void *data)
@@ -1536,7 +1460,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -1551,7 +1475,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
op->state = state;
op->value = value;
@ -437,7 +437,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *data)
@@ -1560,7 +1484,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
@@ -1575,7 +1499,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
op->state = state;
op->matrix = *matrix;
@ -446,7 +446,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_clip_plane(struct wined3d_cs *cs, const void *data)
@@ -1582,7 +1506,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
@@ -1597,7 +1521,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
op->plane_idx = plane_idx;
op->plane = *plane;
@ -455,7 +455,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *data)
@@ -1667,7 +1591,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
@@ -1682,7 +1606,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
else
op->set = 0;
@ -464,7 +464,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_material(struct wined3d_cs *cs, const void *data)
@@ -1688,7 +1612,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
@@ -1703,7 +1627,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
op->material = *material;
@ -473,7 +473,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
@@ -1712,7 +1636,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1727,7 +1651,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
op = cs->ops->require_space(cs, sizeof(*op));
op->opcode = WINED3D_CS_OP_RESET_STATE;
@ -482,7 +482,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_destroy_object(struct wined3d_cs *cs, const void *data)
@@ -1733,7 +1657,7 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
@@ -1748,7 +1672,7 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
op->callback = callback;
op->object = object;
@ -491,16 +491,25 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
@@ -1755,7 +1679,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
@@ -1770,7 +1694,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
op->query = query;
op->flags = flags;
- cs->ops->submit(cs);
+ cs->ops->submit(cs, sizeof(*op));
}
static UINT wined3d_cs_exec_unload_resource(struct wined3d_cs *cs, const void *data)
@@ -1791,7 +1715,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
op->opcode = WINED3D_CS_OP_UNLOAD_RESOURCE;
op->resource = resource;
- cs->ops->submit(cs);
+ cs->ops->submit(cs, sizeof(*op));
}
static UINT wined3d_cs_exec_glfinish(struct wined3d_cs *cs, const void *data)
@@ -1781,7 +1705,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
@@ -1817,7 +1741,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
op = cs->ops->require_space(cs, sizeof(*op));
op->opcode = WINED3D_CS_OP_GLFINISH;
@ -509,7 +518,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_base_vertex_index(struct wined3d_cs *cs, const void *data)
@@ -1803,7 +1727,7 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
@@ -1839,7 +1763,7 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
op->opcode = WINED3D_CS_OP_SET_BASE_VERTEX_INDEX;
op->base_vertex_index = base_vertex_index;
@ -518,7 +527,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_primitive_type(struct wined3d_cs *cs, const void *data)
@@ -1829,7 +1753,7 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
@@ -1865,7 +1789,7 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
op->opcode = WINED3D_CS_OP_SET_PRIMITIVE_TYPE;
op->gl_primitive_type = primitive_type;
@ -527,7 +536,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
@@ -1886,7 +1810,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
@@ -1922,7 +1846,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
op->opcode = WINED3D_CS_OP_SET_LIGHT;
op->light = *light;
@ -536,7 +545,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *data)
@@ -1975,7 +1899,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
@@ -2011,7 +1935,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
op->idx = idx;
op->enable = enable;
@ -545,7 +554,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_blt(struct wined3d_cs *cs, const void *data)
@@ -2007,7 +1931,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
@@ -2043,7 +1967,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
if (fx)
op->fx = *fx;
@ -554,7 +563,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
@@ -2040,7 +1964,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
@@ -2076,7 +2000,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
op->stencil = stencil;
op->blitter = blitter;
@ -563,7 +572,7 @@ index 0fc98be..10df183 100644
}
static UINT wined3d_cs_exec_texture_map(struct wined3d_cs *cs, const void *data)
@@ -2065,12 +1989,14 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
@@ -2101,12 +2025,14 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
op->flags = flags;
op->mem = &ret;
@ -579,7 +588,7 @@ index 0fc98be..10df183 100644
return ret;
}
@@ -2093,11 +2019,13 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
@@ -2129,11 +2055,13 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
op->texture = texture;
op->sub_resource_idx = sub_resource_idx;
@ -594,7 +603,7 @@ index 0fc98be..10df183 100644
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
/* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present,
/* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear,
@@ -2145,42 +2073,59 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2182,42 +2110,59 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
};
@ -677,7 +686,7 @@ index 0fc98be..10df183 100644
};
/* FIXME: wined3d_device_uninit_3d() should either flush and wait, or be an
@@ -2192,9 +2137,38 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
@@ -2229,9 +2174,38 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
op = wined3d_cs_mt_require_space(cs, sizeof(*op));
op->opcode = WINED3D_CS_OP_STOP;
@ -717,7 +726,7 @@ index 0fc98be..10df183 100644
void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
struct wined3d_context *context, struct wined3d_surface *depth_stencil)
{
@@ -2218,31 +2192,32 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
@@ -2255,31 +2229,32 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
static DWORD WINAPI wined3d_cs_run(void *thread_param)
{
struct wined3d_cs *cs = thread_param;
@ -764,7 +773,7 @@ index 0fc98be..10df183 100644
}
done:
@@ -2267,25 +2242,10 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -2304,25 +2279,10 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
cs->ops = &wined3d_cs_st_ops;
cs->device = device;
@ -790,7 +799,7 @@ index 0fc98be..10df183 100644
if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, NULL)))
{
ERR("Failed to create wined3d command stream thread.\n");
@@ -2297,12 +2257,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -2334,12 +2294,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
err:
if (cs)
@ -803,7 +812,7 @@ index 0fc98be..10df183 100644
HeapFree(GetProcessHeap(), 0, cs);
return NULL;
}
@@ -2321,17 +2276,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
@@ -2358,17 +2313,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
CloseHandle(cs->thread);
if (ret != WAIT_OBJECT_0)
ERR("Wait failed (%#x).\n", ret);
@ -822,7 +831,7 @@ index 0fc98be..10df183 100644
HeapFree(GetProcessHeap(), 0, cs);
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 135caad..34a00b1 100644
index d9c33c6..c1150a6 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -31,6 +31,7 @@
@ -833,7 +842,7 @@ index 135caad..34a00b1 100644
#include <stdarg.h>
#include <math.h>
#include <limits.h>
@@ -3035,19 +3036,17 @@ struct wined3d_cs_list
@@ -3038,19 +3039,17 @@ struct wined3d_cs_list
struct list blocks;
};
@ -858,7 +867,7 @@ index 135caad..34a00b1 100644
void (*finish)(struct wined3d_cs *cs);
};
@@ -3058,14 +3057,9 @@ struct wined3d_cs
@@ -3061,14 +3060,9 @@ struct wined3d_cs
struct wined3d_state state;
HANDLE thread;
DWORD thread_id;

View File

@ -1,4 +1,4 @@
From a3f8b91880e4b0ea4a8a8a9dcb6cba9f05bc795b Mon Sep 17 00:00:00 2001
From 2fb1651ce03c957a505acbbf282c04c59e47265b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sat, 6 Jul 2013 18:26:11 +0200
Subject: wined3d: Add query support to the command stream
@ -10,10 +10,10 @@ Subject: wined3d: Add query support to the command stream
3 files changed, 49 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 10df183..1c79290 100644
index c04f293..20be430 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -71,6 +71,7 @@ enum wined3d_cs_op
@@ -72,6 +72,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_CLEAR_RTV,
WINED3D_CS_OP_TEXTURE_MAP,
WINED3D_CS_OP_TEXTURE_UNMAP,
@ -21,7 +21,7 @@ index 10df183..1c79290 100644
WINED3D_CS_OP_STOP,
};
@@ -403,6 +404,13 @@ struct wined3d_cs_skip
@@ -410,6 +411,13 @@ struct wined3d_cs_skip
DWORD size;
};
@ -35,7 +35,7 @@ index 10df183..1c79290 100644
static void wined3d_cs_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2022,6 +2030,33 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
@@ -2050,6 +2058,33 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
cs->ops->submit(cs, sizeof(*op));
}
@ -69,7 +69,7 @@ index 10df183..1c79290 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2071,6 +2106,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2100,6 +2135,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
@ -131,7 +131,7 @@ index 8b15765..c64e5fb 100644
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 34a00b1..c0c5b38 100644
index d894b3b..8b0f2a6 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1437,6 +1437,7 @@ struct wined3d_occlusion_query
@ -142,14 +142,14 @@ index 34a00b1..c0c5b38 100644
};
struct wined3d_timestamp_query
@@ -3145,6 +3146,7 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
unsigned int sub_resource_idx, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
@@ -3089,6 +3090,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, BOOL *ret) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
UINT base_vertex_index) DECLSPEC_HIDDEN;
--
2.9.0

View File

@ -1,4 +1,4 @@
From d1901e9158ced30ba849f799ba1b612d8e74752d Mon Sep 17 00:00:00 2001
From 30ac0963aabd73ccd9a2035f828cc10ad8e9dc76 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sat, 6 Jul 2013 19:18:48 +0200
Subject: wined3d: Poll queries automatically in the CS
@ -10,10 +10,10 @@ Subject: wined3d: Poll queries automatically in the CS
3 files changed, 46 insertions(+), 50 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 2952104..f7ffc1c 100644
index 9054fc3..920f93d 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -71,7 +71,6 @@ enum wined3d_cs_op
@@ -72,7 +72,6 @@ enum wined3d_cs_op
WINED3D_CS_OP_CLEAR_RTV,
WINED3D_CS_OP_TEXTURE_MAP,
WINED3D_CS_OP_TEXTURE_UNMAP,
@ -21,7 +21,7 @@ index 2952104..f7ffc1c 100644
WINED3D_CS_OP_STOP,
};
@@ -404,13 +403,6 @@ struct wined3d_cs_skip
@@ -411,13 +410,6 @@ struct wined3d_cs_skip
DWORD size;
};
@ -35,7 +35,7 @@ index 2952104..f7ffc1c 100644
static void wined3d_cs_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -1675,8 +1667,9 @@ static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
@@ -1682,8 +1674,9 @@ static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
query->query_ops->query_issue(query, op->flags);
@ -47,7 +47,7 @@ index 2952104..f7ffc1c 100644
return sizeof(*op);
}
@@ -2033,33 +2026,6 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
@@ -2061,33 +2054,6 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
cs->ops->submit(cs, sizeof(*op));
}
@ -81,7 +81,7 @@ index 2952104..f7ffc1c 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2109,7 +2075,6 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2138,7 +2104,6 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
@ -89,7 +89,7 @@ index 2952104..f7ffc1c 100644
};
static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
@@ -2228,17 +2193,45 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
@@ -2257,17 +2222,45 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
wined3d_texture_incref(cs->onscreen_depth_stencil->container);
}
@ -194,7 +194,7 @@ index 99a1411..b5e1fde 100644
if (data)
memcpy(data, query->data, min(data_size, query->data_size));
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a10b30f..e6d2602 100644
index d6518c7..83d270e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1396,7 +1396,8 @@ struct wined3d_query
@ -207,7 +207,7 @@ index a10b30f..e6d2602 100644
};
union wined3d_gl_query_object
@@ -3064,6 +3065,7 @@ struct wined3d_cs
@@ -3067,6 +3068,7 @@ struct wined3d_cs
struct wined3d_cs_queue queue;
LONG pending_presents;
@ -215,14 +215,14 @@ index a10b30f..e6d2602 100644
};
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
@@ -3147,7 +3149,6 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
unsigned int sub_resource_idx, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
@@ -3091,7 +3093,6 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
-void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, BOOL *ret) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
UINT base_vertex_index) DECLSPEC_HIDDEN;
--
2.9.0

View File

@ -1,4 +1,4 @@
From ef8e9d367e421a6bdfe14754bcdd7c443c451f36 Mon Sep 17 00:00:00 2001
From 37b8a4fd33c54e561d3da0e57319b333df55bdbd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 1 Aug 2013 00:10:40 +0200
Subject: wined3d: Send texture preloads through the CS
@ -10,10 +10,10 @@ Subject: wined3d: Send texture preloads through the CS
3 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index a08fe6f..67e2c13 100644
index 550dbcd..6f78651 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -71,6 +71,7 @@ enum wined3d_cs_op
@@ -72,6 +72,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_CLEAR_RTV,
WINED3D_CS_OP_TEXTURE_MAP,
WINED3D_CS_OP_TEXTURE_UNMAP,
@ -21,7 +21,7 @@ index a08fe6f..67e2c13 100644
WINED3D_CS_OP_STOP,
};
@@ -403,6 +404,12 @@ struct wined3d_cs_skip
@@ -410,6 +411,12 @@ struct wined3d_cs_skip
DWORD size;
};
@ -34,7 +34,7 @@ index a08fe6f..67e2c13 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2059,6 +2066,30 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
@@ -2095,6 +2102,30 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
cs->ops->submit(cs, sizeof(*op));
}
@ -65,7 +65,7 @@ index a08fe6f..67e2c13 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2108,6 +2139,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2145,6 +2176,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
@ -74,10 +74,10 @@ index a08fe6f..67e2c13 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 2b51935..a472b3e 100644
index 1acf5d5..19105a5 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -920,10 +920,8 @@ void wined3d_texture_load(struct wined3d_texture *texture,
@@ -1051,10 +1051,8 @@ void wined3d_texture_load(struct wined3d_texture *texture,
void CDECL wined3d_texture_preload(struct wined3d_texture *texture)
{
@ -91,17 +91,17 @@ index 2b51935..a472b3e 100644
void * CDECL wined3d_texture_get_parent(const struct wined3d_texture *texture)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 021069c..f57dc37 100644
index 949fb07..5f918f7 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3152,6 +3152,7 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
@@ -3153,6 +3153,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx, DWORD flags) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
--
2.9.0

View File

@ -1,4 +1,4 @@
From 614b05bd7947d8178fbdf3193641c3675608dbc8 Mon Sep 17 00:00:00 2001
From ac1a9cc75bab361113fd4cb1b3bcda0a9aadeb71 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 1 Aug 2013 00:33:48 +0200
Subject: wined3d: Send update_texture calls through the CS
@ -11,10 +11,10 @@ FIXME: This logic duplication is ugly.
3 files changed, 137 insertions(+), 82 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index b056e22..4611f41 100644
index 908f416..84adcb4 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -72,6 +72,7 @@ enum wined3d_cs_op
@@ -73,6 +73,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_TEXTURE_MAP,
WINED3D_CS_OP_TEXTURE_UNMAP,
WINED3D_CS_OP_TEXTURE_PRELOAD,
@ -22,7 +22,7 @@ index b056e22..4611f41 100644
WINED3D_CS_OP_STOP,
};
@@ -410,6 +411,12 @@ struct wined3d_cs_texture_preload
@@ -417,6 +418,12 @@ struct wined3d_cs_texture_preload
struct wined3d_texture *texture;
};
@ -35,7 +35,7 @@ index b056e22..4611f41 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2090,6 +2097,31 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu
@@ -2118,6 +2125,31 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu
cs->ops->submit(cs, sizeof(*op));
}
@ -67,7 +67,7 @@ index b056e22..4611f41 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2140,6 +2172,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2169,6 +2201,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
@ -76,10 +76,10 @@ index b056e22..4611f41 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 1735f85..de927cc 100644
index 58f1669..7255804 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3558,34 +3558,17 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
@@ -3567,34 +3567,17 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
start_idx, index_count, start_instance, instance_count, TRUE);
}
@ -118,7 +118,7 @@ index 1735f85..de927cc 100644
/* Only a prepare, since we're uploading entire volumes. */
wined3d_texture_prepare_texture(dst_texture, context, FALSE);
@@ -3593,32 +3576,89 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
@@ -3602,32 +3585,89 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
for (i = 0; i < level_count; ++i)
{
@ -218,7 +218,7 @@ index 1735f85..de927cc 100644
TRACE("device %p, src_texture %p, dst_texture %p.\n", device, src_texture, dst_texture);
@@ -3655,70 +3695,48 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
@@ -3664,70 +3704,48 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
return WINED3DERR_INVALIDCALL;
}
@ -319,10 +319,10 @@ index 1735f85..de927cc 100644
HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 06fe9cb..e468abb 100644
index b904a7d..156cb71 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2533,6 +2533,8 @@ void device_resource_add(struct wined3d_device *device, struct wined3d_resource
@@ -2536,6 +2536,8 @@ void device_resource_add(struct wined3d_device *device, struct wined3d_resource
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
void device_invalidate_shader_constants(const struct wined3d_device *device, DWORD mask) DECLSPEC_HIDDEN;
@ -331,10 +331,10 @@ index 06fe9cb..e468abb 100644
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -3156,6 +3158,8 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
@@ -3157,6 +3159,8 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu
void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
+ struct wined3d_texture *dst) DECLSPEC_HIDDEN;

View File

@ -1,129 +0,0 @@
From 90c36c36a147bdf75db57285ba85c1f504ea13ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 6 Aug 2013 13:50:31 +0200
Subject: wined3d: Handle evit_managed_resources through the CS
---
dlls/wined3d/cs.c | 37 +++++++++++++++++++++++++++++++++++++
dlls/wined3d/device.c | 14 +++-----------
dlls/wined3d/wined3d_private.h | 1 +
3 files changed, 41 insertions(+), 11 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 4611f41..d1c9ae6 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -73,6 +73,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_TEXTURE_UNMAP,
WINED3D_CS_OP_TEXTURE_PRELOAD,
WINED3D_CS_OP_UPDATE_TEXTURE,
+ WINED3D_CS_OP_EVICT_RESOURCE,
WINED3D_CS_OP_STOP,
};
@@ -417,6 +418,12 @@ struct wined3d_cs_update_texture
struct wined3d_texture *src, *dst;
};
+struct wined3d_cs_evict_resource
+{
+ enum wined3d_cs_op opcode;
+ struct wined3d_resource *resource;
+};
+
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2122,6 +2129,35 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
cs->ops->submit(cs, sizeof(*op));
}
+static UINT wined3d_cs_exec_evict_resource(struct wined3d_cs *cs, const void *data)
+{
+ const struct wined3d_cs_evict_resource *op = data;
+ struct wined3d_resource *resource = op->resource;
+
+ resource->resource_ops->resource_unload(resource);
+
+ /* FIXME: Is this necessary? Bound buffers are preloaded anyway, and in theory
+ * PreLoad should take care of invalidating the state if the VBO changes */
+ if (resource->bind_count && resource->type == WINED3D_RTYPE_BUFFER)
+ {
+ device_invalidate_state(cs->device, STATE_STREAMSRC);
+ device_invalidate_state(cs->device, STATE_INDEXBUFFER);
+ }
+
+ return sizeof(*op);
+}
+
+void wined3d_cs_emit_evict_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
+{
+ struct wined3d_cs_evict_resource *op;
+
+ op = cs->ops->require_space(cs, sizeof(*op));
+ op->opcode = WINED3D_CS_OP_EVICT_RESOURCE;
+ op->resource = resource;
+
+ cs->ops->submit(cs, sizeof(*op));
+}
+
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2173,6 +2209,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
+ /* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
};
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 84071e4..612f1dd 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4566,13 +4566,8 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
TRACE("device %p.\n", device);
- if (wined3d_settings.cs_multithreaded)
- {
- FIXME("Waiting for cs.\n");
- wined3d_cs_emit_glfinish(device->cs);
- device->cs->ops->finish(device->cs);
- }
-
+ /* The resource list is manged by the main thread, iterate here and emit commands for
+ * each resource */
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
{
TRACE("Checking resource %p for eviction.\n", resource);
@@ -4580,12 +4575,9 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
if (resource->pool == WINED3D_POOL_MANAGED && !resource->map_count)
{
TRACE("Evicting %p.\n", resource);
- resource->resource_ops->resource_unload(resource);
+ wined3d_cs_emit_evict_resource(device->cs, resource);
}
}
-
- /* Invalidate stream sources, the buffer(s) may have been evicted. */
- device_invalidate_state(device, STATE_STREAMSRC);
}
static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 3caec37..1ea6b94 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3158,6 +3158,7 @@ void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
struct wined3d_texture *dst) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_evict_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.9.0

View File

@ -1,26 +0,0 @@
From a18ad4091844866d62dedaa3ac4f333ef29ac710 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
Date: Sun, 24 Apr 2016 14:27:47 +0100
Subject: d3d9/tests: Remove a TODO that has been hacked away.
I thought I had this somewhere already...
---
dlls/d3d9/tests/visual.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index a308311..0c64b31 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -1339,7 +1339,7 @@ static void color_fill_test(void)
* result on Wine.
* {D3DFMT_YUY2, "D3DFMT_YUY2", BLOCKS, 0},
* {D3DFMT_UYVY, "D3DFMT_UYVY", BLOCKS, 0}, */
- {D3DFMT_DXT1, "D3DFMT_DXT1", BLOCKS | TODO_FILL_RETURN, 0},
+ {D3DFMT_DXT1, "D3DFMT_DXT1", BLOCKS, 0},
/* Vendor-specific formats like ATI2N are a non-issue here since they're not
* supported as offscreen plain surfaces and do not support D3DUSAGE_RENDERTARGET
* when created as texture. */
--
2.8.0

View File

@ -1,4 +1,4 @@
From 9d6b9f329a6674d90617333f95b452fda08c08ed Mon Sep 17 00:00:00 2001
From a2672003445240c74f636792ceffd135bf2a06f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Fri, 4 Sep 2015 15:22:49 +0200
Subject: wined3d: Send update_sub_resource calls through the command stream.
@ -10,19 +10,19 @@ Subject: wined3d: Send update_sub_resource calls through the command stream.
3 files changed, 105 insertions(+), 46 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 3ffefd4..e4f1a87 100644
index fcb4081..befc742 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -73,6 +73,7 @@ enum wined3d_cs_op
@@ -74,6 +74,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_TEXTURE_UNMAP,
WINED3D_CS_OP_TEXTURE_PRELOAD,
WINED3D_CS_OP_UPDATE_TEXTURE,
WINED3D_CS_OP_EVICT_RESOURCE,
+ WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
WINED3D_CS_OP_STOP,
};
@@ -417,6 +418,15 @@ struct wined3d_cs_evict_resource
struct wined3d_resource *resource;
@@ -424,6 +425,15 @@ struct wined3d_cs_update_texture
struct wined3d_texture *src, *dst;
};
+struct wined3d_cs_update_sub_resource
@ -37,7 +37,7 @@ index 3ffefd4..e4f1a87 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2167,6 +2177,90 @@ void wined3d_cs_emit_evict_resource(struct wined3d_cs *cs, struct wined3d_resour
@@ -2196,6 +2206,90 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
cs->ops->submit(cs, sizeof(*op));
}
@ -128,19 +128,19 @@ index 3ffefd4..e4f1a87 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2218,6 +2312,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2248,6 +2342,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
/* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
+ /* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
};
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index fd866ad..79326f8 100644
index 5aecf4e..f2f0d7b 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4079,14 +4079,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
@@ -4117,14 +4117,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
unsigned int depth_pitch)
{
struct wined3d_texture_sub_resource *sub_resource;
@ -155,7 +155,7 @@ index fd866ad..79326f8 100644
TRACE("device %p, resource %p, sub_resource_idx %u, box %s, data %p, row_pitch %u, depth_pitch %u.\n",
device, resource, sub_resource_idx, debug_box(box), data, row_pitch, depth_pitch);
@@ -4120,16 +4113,15 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
@@ -4158,16 +4151,15 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
WARN("Invalid sub_resource_idx %u.\n", sub_resource_idx);
return;
}
@ -178,7 +178,7 @@ index fd866ad..79326f8 100644
if (box->left >= box->right || box->right > width
|| box->top >= box->bottom || box->bottom > height
|| box->front >= box->back)
@@ -4137,40 +4129,9 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
@@ -4175,40 +4167,9 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
WARN("Invalid box %s specified.\n", debug_box(box));
return;
}
@ -221,19 +221,19 @@ index fd866ad..79326f8 100644
HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a23106e..a26123d 100644
index 1571657..c0829a1 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3157,6 +3157,9 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu
void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
struct wined3d_texture *dst) DECLSPEC_HIDDEN;
void wined3d_cs_emit_evict_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@@ -3160,6 +3160,9 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu
void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
+ unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
+ unsigned int depth_pitch) DECLSPEC_HIDDEN;
void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
struct wined3d_texture *dst) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From 45dd4157e3456db1d50368029269acc72e082cf6 Mon Sep 17 00:00:00 2001
From 004a1700d1b40a0127bf22de9ed706e1092a38c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
Date: Sun, 24 Apr 2016 15:07:54 +0100
Subject: wined3d: Dirtify changed textures through the command stream.
@ -14,10 +14,10 @@ FIXME: The lost unmap_dirtify = FALSE is unfortunate.
3 files changed, 45 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 9471829..eac0aaa 100644
index fcc4504..efc05b8 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_SET_LIGHT_ENABLE,
WINED3D_CS_OP_BLT,
WINED3D_CS_OP_CLEAR_RTV,
@ -25,7 +25,7 @@ index 9471829..eac0aaa 100644
WINED3D_CS_OP_TEXTURE_MAP,
WINED3D_CS_OP_TEXTURE_UNMAP,
WINED3D_CS_OP_TEXTURE_PRELOAD,
@@ -401,6 +402,13 @@ struct wined3d_cs_texture_unmap
@@ -407,6 +408,13 @@ struct wined3d_cs_texture_unmap
unsigned int sub_resource_idx;
};
@ -39,7 +39,7 @@ index 9471829..eac0aaa 100644
struct wined3d_cs_skip
{
enum wined3d_cs_op opcode;
@@ -2071,6 +2079,28 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
@@ -2100,6 +2108,28 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
cs->ops->submit(cs, sizeof(*op));
}
@ -68,7 +68,7 @@ index 9471829..eac0aaa 100644
static UINT wined3d_cs_exec_texture_map(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_texture_map *op = data;
@@ -2337,6 +2367,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2338,6 +2368,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_LIGHT_ENABLE */ wined3d_cs_exec_set_light_enable,
/* WINED3D_CS_OP_BLT */ wined3d_cs_exec_blt,
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
@ -77,10 +77,10 @@ index 9471829..eac0aaa 100644
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 5145de0..605e851 100644
index fa7488b..a676167 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1784,7 +1784,6 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -1913,7 +1913,6 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
void wined3d_texture_unmap_internal(struct wined3d_texture *texture, unsigned int sub_resource_idx)
{
@ -88,7 +88,7 @@ index 5145de0..605e851 100644
struct wined3d_context *context = NULL;
struct wined3d_bo_address data;
@@ -1808,12 +1807,11 @@ void wined3d_texture_unmap_internal(struct wined3d_texture *texture, unsigned in
@@ -1937,12 +1936,11 @@ void wined3d_texture_unmap_internal(struct wined3d_texture *texture, unsigned in
{
FIXME("Depth / stencil buffer locking is not implemented.\n");
}
@ -105,7 +105,7 @@ index 5145de0..605e851 100644
}
static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
@@ -1838,6 +1836,12 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
@@ -1967,6 +1965,12 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
wined3d_cs_emit_texture_unmap(device->cs, texture, sub_resource_idx);
@ -119,10 +119,10 @@ index 5145de0..605e851 100644
if (!--resource->map_count && texture->update_map_binding)
wined3d_texture_update_map_binding(texture);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index b5785b4..68d076b 100644
index ba50966..540bc1d 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2774,6 +2774,8 @@ void wined3d_texture_bind(struct wined3d_texture *texture,
@@ -2777,6 +2777,8 @@ void wined3d_texture_bind(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
@ -131,15 +131,15 @@ index b5785b4..68d076b 100644
BOOL wined3d_texture_check_block_align(const struct wined3d_texture *texture,
unsigned int level, const struct wined3d_box *box) DECLSPEC_HIDDEN;
GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture) DECLSPEC_HIDDEN;
@@ -3151,6 +3153,8 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil,
const struct blit_shader *blitter) DECLSPEC_HIDDEN;
@@ -3154,6 +3156,8 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_texture_changed(struct wined3d_cs *cs, struct wined3d_texture *texture,
+ unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture *texture,
void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
--
2.9.0

View File

@ -1,4 +1,4 @@
From 70af66f5937a43b642abf38920ef206a9348d45c Mon Sep 17 00:00:00 2001
From db8659a79fde86ef104d3972077eeac1d1659749 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Fri, 27 Sep 2013 19:06:41 +0200
Subject: wined3d: Implement DISCARD texture maps with PBOs.
@ -10,10 +10,10 @@ Subject: wined3d: Implement DISCARD texture maps with PBOs.
3 files changed, 43 insertions(+), 13 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 75dd990..d30c449 100644
index efc05b8..1f288e0 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -393,6 +393,7 @@ struct wined3d_cs_texture_changed
@@ -413,6 +413,7 @@ struct wined3d_cs_texture_changed
enum wined3d_cs_op opcode;
struct wined3d_texture *texture;
unsigned int sub_resource_idx;
@ -21,7 +21,7 @@ index 75dd990..d30c449 100644
};
struct wined3d_cs_skip
@@ -1951,13 +1952,13 @@ static UINT wined3d_cs_exec_texture_changed(struct wined3d_cs *cs, const void *d
@@ -2112,13 +2113,13 @@ static UINT wined3d_cs_exec_texture_changed(struct wined3d_cs *cs, const void *d
{
const struct wined3d_cs_texture_changed *op = data;
@ -37,7 +37,7 @@ index 75dd990..d30c449 100644
{
struct wined3d_cs_texture_changed *op;
@@ -1965,6 +1966,7 @@ void wined3d_cs_emit_texture_changed(struct wined3d_cs *cs, struct wined3d_textu
@@ -2126,6 +2127,7 @@ void wined3d_cs_emit_texture_changed(struct wined3d_cs *cs, struct wined3d_textu
op->opcode = WINED3D_CS_OP_TEXTURE_CHANGED;
op->texture = texture;
op->sub_resource_idx = sub_resource_idx;
@ -46,10 +46,10 @@ index 75dd990..d30c449 100644
cs->ops->submit(cs, sizeof(*op));
}
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index ab7127b..43bcb51 100644
index 6eb36e2..df0cd21 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1673,10 +1673,26 @@ void *wined3d_texture_map_internal(struct wined3d_texture *texture, unsigned int
@@ -1768,10 +1768,26 @@ void *wined3d_texture_map_internal(struct wined3d_texture *texture, unsigned int
if (flags & WINED3D_MAP_DISCARD)
{
@ -78,7 +78,7 @@ index ab7127b..43bcb51 100644
wined3d_texture_validate_location(texture, sub_resource_idx, texture->resource.map_binding);
}
else
@@ -1772,11 +1788,11 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -1867,11 +1883,11 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
flags = wined3d_resource_sanitize_map_flags(resource, flags);
@ -95,7 +95,7 @@ index ab7127b..43bcb51 100644
base_memory = wined3d_cs_emit_texture_map(device->cs, texture, sub_resource_idx, flags);
@@ -1850,8 +1866,20 @@ void wined3d_texture_unmap_internal(struct wined3d_texture *texture, unsigned in
@@ -1945,8 +1961,20 @@ void wined3d_texture_unmap_internal(struct wined3d_texture *texture, unsigned in
}
}
@ -117,7 +117,7 @@ index ab7127b..43bcb51 100644
wined3d_texture_invalidate_location(texture, sub_resource_idx, ~texture->resource.map_binding);
}
@@ -1879,7 +1907,7 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
@@ -1974,7 +2002,7 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
if (sub_resource->unmap_dirtify)
{
@ -127,10 +127,10 @@ index ab7127b..43bcb51 100644
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 4fd8892..e3b6ff8 100644
index 396a753..7899487 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2733,7 +2733,7 @@ void wined3d_texture_bind(struct wined3d_texture *texture,
@@ -2791,7 +2791,7 @@ void wined3d_texture_bind(struct wined3d_texture *texture,
void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
void wined3d_texture_changed(struct wined3d_texture *texture,
@ -139,15 +139,15 @@ index 4fd8892..e3b6ff8 100644
BOOL wined3d_texture_check_block_align(const struct wined3d_texture *texture,
unsigned int level, const struct wined3d_box *box) DECLSPEC_HIDDEN;
GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture) DECLSPEC_HIDDEN;
@@ -3118,7 +3118,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil,
const struct blit_shader *blitter) DECLSPEC_HIDDEN;
@@ -3170,7 +3170,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
void wined3d_cs_emit_texture_changed(struct wined3d_cs *cs, struct wined3d_texture *texture,
- unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
+ unsigned int sub_resource_idx, struct wined3d_gl_bo *swap_buffer) DECLSPEC_HIDDEN;
void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture *texture,
void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From bd07c044ca2439da5464de6f88f4e001e13a0dc2 Mon Sep 17 00:00:00 2001
From 490b534e7c3bb675d447aa86ddaa019c0eed28d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Fri, 27 Sep 2013 19:24:21 +0200
Subject: wined3d: Implement DISCARD resource maps with heap memory.
@ -12,10 +12,10 @@ Subject: wined3d: Implement DISCARD resource maps with heap memory.
5 files changed, 51 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 314415c..a841f6b 100644
index 9a5d6c5..5b684cb 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -496,6 +496,7 @@ BYTE *buffer_get_sysmem(struct wined3d_buffer *buffer, struct wined3d_context *c
@@ -499,6 +499,7 @@ BYTE *buffer_get_sysmem(struct wined3d_buffer *buffer, struct wined3d_context *c
if (!wined3d_resource_allocate_sysmem(&buffer->resource))
ERR("Failed to allocate system memory.\n");
@ -24,10 +24,10 @@ index 314415c..a841f6b 100644
buffer_bind(buffer, context);
GL_EXTCALL(glGetBufferSubData(buffer->buffer_type_hint, 0, buffer->resource.size, buffer->resource.heap_memory));
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index d30c449..2325138 100644
index 1f288e0..3fc1fce 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -394,6 +394,7 @@ struct wined3d_cs_texture_changed
@@ -414,6 +414,7 @@ struct wined3d_cs_texture_changed
struct wined3d_texture *texture;
unsigned int sub_resource_idx;
struct wined3d_gl_bo *swap_buffer;
@ -35,7 +35,7 @@ index d30c449..2325138 100644
};
struct wined3d_cs_skip
@@ -1952,13 +1953,13 @@ static UINT wined3d_cs_exec_texture_changed(struct wined3d_cs *cs, const void *d
@@ -2113,13 +2114,13 @@ static UINT wined3d_cs_exec_texture_changed(struct wined3d_cs *cs, const void *d
{
const struct wined3d_cs_texture_changed *op = data;
@ -51,7 +51,7 @@ index d30c449..2325138 100644
{
struct wined3d_cs_texture_changed *op;
@@ -1967,6 +1968,7 @@ void wined3d_cs_emit_texture_changed(struct wined3d_cs *cs, struct wined3d_textu
@@ -2128,6 +2129,7 @@ void wined3d_cs_emit_texture_changed(struct wined3d_cs *cs, struct wined3d_textu
op->texture = texture;
op->sub_resource_idx = sub_resource_idx;
op->swap_buffer = swap_buffer;
@ -89,7 +89,7 @@ index 7f80957..1029f12 100644
return TRUE;
}
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 43bcb51..15d27a5 100644
index df0cd21..bf142b4 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -104,6 +104,7 @@ static void wined3d_texture_evict_sysmem(struct wined3d_texture *texture)
@ -100,7 +100,7 @@ index 43bcb51..15d27a5 100644
}
void wined3d_texture_validate_location(struct wined3d_texture *texture,
@@ -220,7 +221,10 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
@@ -351,7 +352,10 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
}
if (locations & WINED3D_LOCATION_SYSMEM)
{
@ -112,7 +112,7 @@ index 43bcb51..15d27a5 100644
data->addr += sub_resource->offset;
data->buffer_object = 0;
return;
@@ -1137,6 +1141,7 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
@@ -1262,6 +1266,7 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
}
wined3d_resource_free_sysmem(&texture->resource);
@ -120,7 +120,7 @@ index 43bcb51..15d27a5 100644
if ((texture->row_pitch = pitch))
texture->slice_pitch = height * pitch;
@@ -1331,6 +1336,7 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
@@ -1456,6 +1461,7 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
ERR("Failed to allocate system memory.\n");
return FALSE;
}
@ -128,7 +128,7 @@ index 43bcb51..15d27a5 100644
return TRUE;
case WINED3D_LOCATION_USER_MEMORY:
@@ -1686,6 +1692,12 @@ void *wined3d_texture_map_internal(struct wined3d_texture *texture, unsigned int
@@ -1781,6 +1787,12 @@ void *wined3d_texture_map_internal(struct wined3d_texture *texture, unsigned int
ret = !!sub_resource->map_buffer;
break;
@ -141,7 +141,7 @@ index 43bcb51..15d27a5 100644
default:
ret = wined3d_texture_prepare_location(texture, sub_resource_idx,
context, texture->resource.map_binding);
@@ -1791,7 +1803,21 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -1886,7 +1898,21 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
if (flags & WINED3D_MAP_NOOVERWRITE)
FIXME("WINED3D_MAP_NOOVERWRITE is not implemented yet.\n");
@ -164,7 +164,7 @@ index 43bcb51..15d27a5 100644
wined3d_resource_wait_idle(&texture->resource);
base_memory = wined3d_cs_emit_texture_map(device->cs, texture, sub_resource_idx, flags);
@@ -1867,7 +1893,7 @@ void wined3d_texture_unmap_internal(struct wined3d_texture *texture, unsigned in
@@ -1962,7 +1988,7 @@ void wined3d_texture_unmap_internal(struct wined3d_texture *texture, unsigned in
}
void wined3d_texture_changed(struct wined3d_texture *texture, unsigned int sub_resource_idx,
@ -173,7 +173,7 @@ index 43bcb51..15d27a5 100644
{
struct wined3d_texture_sub_resource *sub_resource = &texture->sub_resources[sub_resource_idx];
@@ -1880,6 +1906,12 @@ void wined3d_texture_changed(struct wined3d_texture *texture, unsigned int sub_r
@@ -1975,6 +2001,12 @@ void wined3d_texture_changed(struct wined3d_texture *texture, unsigned int sub_r
sub_resource->buffer = swap_buffer;
}
@ -186,7 +186,7 @@ index 43bcb51..15d27a5 100644
wined3d_texture_invalidate_location(texture, sub_resource_idx, ~texture->resource.map_binding);
}
@@ -1907,7 +1939,8 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
@@ -2002,7 +2034,8 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
if (sub_resource->unmap_dirtify)
{
@ -196,7 +196,7 @@ index 43bcb51..15d27a5 100644
sub_resource->unmap_dirtify = FALSE;
}
@@ -2348,6 +2381,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
@@ -2644,6 +2677,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
if (wined3d_texture_use_pbo(texture, gl_info))
{
wined3d_resource_free_sysmem(&texture->resource);
@ -205,10 +205,10 @@ index 43bcb51..15d27a5 100644
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index e3b6ff8..de30dd4 100644
index 7899487..c690d2c 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2536,7 +2536,7 @@ struct wined3d_resource
@@ -2594,7 +2594,7 @@ struct wined3d_resource
UINT depth;
UINT size;
DWORD priority;
@ -217,7 +217,7 @@ index e3b6ff8..de30dd4 100644
struct list resource_list_entry;
LONG access_count;
@@ -2733,7 +2733,8 @@ void wined3d_texture_bind(struct wined3d_texture *texture,
@@ -2791,7 +2791,8 @@ void wined3d_texture_bind(struct wined3d_texture *texture,
void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
void wined3d_texture_changed(struct wined3d_texture *texture,
@ -227,16 +227,16 @@ index e3b6ff8..de30dd4 100644
BOOL wined3d_texture_check_block_align(const struct wined3d_texture *texture,
unsigned int level, const struct wined3d_box *box) DECLSPEC_HIDDEN;
GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture) DECLSPEC_HIDDEN;
@@ -3118,7 +3119,8 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil,
const struct blit_shader *blitter) DECLSPEC_HIDDEN;
@@ -3170,7 +3171,8 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
void wined3d_cs_emit_texture_changed(struct wined3d_cs *cs, struct wined3d_texture *texture,
- unsigned int sub_resource_idx, struct wined3d_gl_bo *swap_buffer) DECLSPEC_HIDDEN;
+ unsigned int sub_resource_idx, struct wined3d_gl_bo *swap_buffer,
+ void *swap_heap_memory) DECLSPEC_HIDDEN;
void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture *texture,
void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From ab9aeec2012b5d821f22d71714a3ad5008209e0d Mon Sep 17 00:00:00 2001
From 2c66c9febb6c4f93bcc52d426d18005059fc76c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sat, 6 Jul 2013 16:14:16 +0200
Subject: wined3d: Accelerate DISCARD buffer maps
@ -13,10 +13,10 @@ TODO3: Clean up the map_mem allocation mess.
3 files changed, 51 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 4cf3cdd..35deef8 100644
index 8352972..76cc5f3 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -1060,10 +1060,19 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
@@ -1056,10 +1056,19 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
buffer->flags |= WINED3D_BUFFER_SYNC;
}
@ -40,18 +40,18 @@ index 4cf3cdd..35deef8 100644
base = buffer->map_ptr ? buffer->map_ptr : buffer->resource.map_heap_memory;
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 20a3d66..cb4f7a2 100644
index b416a39..3d68c71 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -72,6 +72,7 @@ enum wined3d_cs_op
@@ -73,6 +73,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_TEXTURE_CHANGED,
WINED3D_CS_OP_TEXTURE_MAP,
WINED3D_CS_OP_TEXTURE_UNMAP,
+ WINED3D_CS_OP_BUFFER_SWAP_MEM,
WINED3D_CS_OP_TEXTURE_PRELOAD,
WINED3D_CS_OP_UPDATE_TEXTURE,
WINED3D_CS_OP_EVICT_RESOURCE,
@@ -411,6 +412,13 @@ struct wined3d_cs_texture_changed
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
@@ -417,6 +418,13 @@ struct wined3d_cs_texture_changed
void *swap_heap_memory;
};
@ -100,27 +100,27 @@ index 20a3d66..cb4f7a2 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2374,6 +2410,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2375,6 +2411,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_TEXTURE_CHANGED */ wined3d_cs_exec_texture_changed,
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
+ /* WINED3D_CS_OP_BUFFER_SWAP_MEM */ wined3d_cs_exec_buffer_swap_mem,
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
/* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 31375ed..2b25a33 100644
index 7990862..6858059 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3182,6 +3182,8 @@ void wined3d_cs_emit_evict_resource(struct wined3d_cs *cs, struct wined3d_resour
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
unsigned int depth_pitch) DECLSPEC_HIDDEN;
@@ -3102,6 +3102,8 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
const RECT *dst_rect, struct wined3d_surface *src_surface,
const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx,
enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
+ BYTE *mem) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
--
2.9.0

View File

@ -1,4 +1,4 @@
From 7061e74d97edf88035aacacc3e6a549ed7792d96 Mon Sep 17 00:00:00 2001
From a836152c841dc2929ada3eece3466a8b1741ef05 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 2f049fc..e23ec3b 100644
index 3307fd4..d7ea6ee 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -41,7 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
@ -39,7 +39,7 @@ index 2f049fc..e23ec3b 100644
{
if (!offset && (!size || size == buffer->resource.size))
goto invalidate_all;
@@ -986,9 +986,9 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
@@ -982,9 +982,9 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
* being uploaded in that case. Two such applications are Port Royale
* and Darkstar One. */
if (flags & WINED3D_MAP_DISCARD)
@ -52,18 +52,18 @@ index 2f049fc..e23ec3b 100644
if (!(buffer->flags & WINED3D_BUFFER_DOUBLEBUFFER))
{
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index cb4f7a2..819a371 100644
index 3d68c71..9e8539d 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -73,6 +73,7 @@ enum wined3d_cs_op
@@ -74,6 +74,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_TEXTURE_MAP,
WINED3D_CS_OP_TEXTURE_UNMAP,
WINED3D_CS_OP_BUFFER_SWAP_MEM,
+ WINED3D_CS_OP_BUFFER_INVALIDATE_RANGE,
WINED3D_CS_OP_TEXTURE_PRELOAD,
WINED3D_CS_OP_UPDATE_TEXTURE,
WINED3D_CS_OP_EVICT_RESOURCE,
@@ -419,6 +420,13 @@ struct wined3d_cs_buffer_swap_mem
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
@@ -425,6 +426,13 @@ struct wined3d_cs_buffer_swap_mem
BYTE *mem;
};
@ -106,28 +106,28 @@ index cb4f7a2..819a371 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2411,6 +2441,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2412,6 +2442,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
/* WINED3D_CS_OP_BUFFER_SWAP_MEM */ wined3d_cs_exec_buffer_swap_mem,
+ /* WINED3D_CS_OP_BUFFER_INVALIDATE_RANGE */ wined3d_cs_exec_buffer_invalidate_bo_range,
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
/* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 2b25a33..6b566fe 100644
index 6858059..f23efe7 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3184,6 +3184,8 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
unsigned int depth_pitch) DECLSPEC_HIDDEN;
void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
BYTE *mem) DECLSPEC_HIDDEN;
@@ -3102,6 +3102,8 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
const RECT *dst_rect, struct wined3d_surface *src_surface,
const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx,
enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
+ struct wined3d_buffer *buffer, unsigned int offset, unsigned int size) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
@@ -3238,6 +3240,7 @@ HRESULT wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_
void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
BYTE *mem) DECLSPEC_HIDDEN;
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
@@ -3240,6 +3242,7 @@ HRESULT wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_
struct wined3d_buffer *src_buffer, unsigned int src_offset, unsigned int size) DECLSPEC_HIDDEN;
HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
const struct wined3d_box *box, const void *data) DECLSPEC_HIDDEN;

View File

@ -1,4 +1,4 @@
From 5b3571a652a975d117d0422e5ebe532b1ccda5be Mon Sep 17 00:00:00 2001
From 366a6468228b98fd526e614503364b61a4d6b61b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 7 Jul 2013 12:02:59 +0200
Subject: wined3d: Send buffer preloads through the CS
@ -13,10 +13,10 @@ the dirty area list, have to be considered.
3 files changed, 33 insertions(+), 11 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 11a3c66..d0c21b2 100644
index 1da6f03..8b6d6b6 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -933,7 +933,6 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte
@@ -929,7 +929,6 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte
void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
{
@ -24,7 +24,7 @@ index 11a3c66..d0c21b2 100644
struct wined3d_device *device = buffer->resource.device;
if (buffer->resource.map_count)
@@ -942,16 +941,7 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
@@ -938,16 +937,7 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
return;
}
@ -43,17 +43,17 @@ index 11a3c66..d0c21b2 100644
struct wined3d_resource * CDECL wined3d_buffer_get_resource(struct wined3d_buffer *buffer)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 819a371..56eb444 100644
index 9e8539d..650290b 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -74,6 +74,7 @@ enum wined3d_cs_op
@@ -75,6 +75,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_TEXTURE_UNMAP,
WINED3D_CS_OP_BUFFER_SWAP_MEM,
WINED3D_CS_OP_BUFFER_INVALIDATE_RANGE,
+ WINED3D_CS_OP_BUFFER_PRELOAD,
WINED3D_CS_OP_TEXTURE_PRELOAD,
WINED3D_CS_OP_UPDATE_TEXTURE,
WINED3D_CS_OP_EVICT_RESOURCE,
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
@@ -460,6 +461,12 @@ struct wined3d_cs_update_sub_resource
const void *data;
};
@ -97,26 +97,26 @@ index 819a371..56eb444 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2442,6 +2472,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2443,6 +2473,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
/* WINED3D_CS_OP_BUFFER_SWAP_MEM */ wined3d_cs_exec_buffer_swap_mem,
/* WINED3D_CS_OP_BUFFER_INVALIDATE_RANGE */ wined3d_cs_exec_buffer_invalidate_bo_range,
+ /* WINED3D_CS_OP_BUFFER_PRELOAD */ wined3d_cs_exec_buffer_preload,
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
/* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 6b566fe..ccfc0f3 100644
index f23efe7..dc70283 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3186,6 +3186,7 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe
BYTE *mem) DECLSPEC_HIDDEN;
@@ -3104,6 +3104,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
struct wined3d_buffer *buffer, unsigned int offset, unsigned int size) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
BYTE *mem) DECLSPEC_HIDDEN;
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
--
2.9.0

View File

@ -1,4 +1,4 @@
From bf3c76661ed644e19dc55141e3244f29e9bace4d Mon Sep 17 00:00:00 2001
From 6e1451770f45f6e635f49956e5756d9e7c0f167b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 2 Oct 2013 21:47:08 +0200
Subject: wined3d: Create VBOs through the command stream.
@ -11,7 +11,7 @@ A stop-gap solution to make fglrx happier until buffers are updated.
3 files changed, 37 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 646903a..cedd5c3 100644
index 47155ed..b69f8a3 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -122,7 +122,7 @@ static void delete_gl_buffer(struct wined3d_buffer *This, const struct wined3d_g
@ -32,7 +32,7 @@ index 646903a..cedd5c3 100644
This->buffer_object_usage = gl_usage;
@@ -940,9 +938,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
@@ -936,9 +934,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
* on buffer creation won't work either. */
if (!buffer->buffer_object && buffer->flags & WINED3D_BUFFER_USE_BO)
{
@ -44,18 +44,18 @@ index 646903a..cedd5c3 100644
flags = wined3d_resource_sanitize_map_flags(&buffer->resource, flags);
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index ac22a08..3d51e6c 100644
index 24e9a74..826d6ec 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -78,6 +78,7 @@ enum wined3d_cs_op
@@ -79,6 +79,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_TEXTURE_PRELOAD,
WINED3D_CS_OP_UPDATE_TEXTURE,
WINED3D_CS_OP_EVICT_RESOURCE,
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
+ WINED3D_CS_OP_CREATE_VBO,
WINED3D_CS_OP_STOP,
};
@@ -460,6 +461,12 @@ struct wined3d_cs_buffer_preload
@@ -467,6 +468,12 @@ struct wined3d_cs_buffer_preload
struct wined3d_buffer *buffer;
};
@ -68,7 +68,7 @@ index ac22a08..3d51e6c 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2396,6 +2403,30 @@ void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer
@@ -2425,6 +2432,30 @@ void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer
cs->ops->submit(cs, sizeof(*op));
}
@ -99,27 +99,27 @@ index ac22a08..3d51e6c 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2452,6 +2483,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2482,6 +2513,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
/* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
+ /* WINED3D_CS_OP_CREATE_VBO */ wined3d_cs_exec_create_vbo,
};
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index b2fb28e..e3e718e 100644
index 718afab..486f8d9 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3184,6 +3184,7 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe
void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
struct wined3d_buffer *buffer, unsigned int offset, unsigned int size) DECLSPEC_HIDDEN;
void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
@@ -3112,6 +3112,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil,
const struct blit_shader *blitter) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
@@ -3241,6 +3242,8 @@ HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs,
void (*callback)(void *object), void *object) DECLSPEC_HIDDEN;
void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned int start_idx, unsigned int index_count,
@@ -3246,6 +3247,8 @@ HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
const struct wined3d_box *box, const void *data) DECLSPEC_HIDDEN;
void buffer_invalidate_bo_range(struct wined3d_buffer *buffer, unsigned int offset, unsigned int size) DECLSPEC_HIDDEN;
void buffer_swap_mem(struct wined3d_buffer *buffer, BYTE *mem) DECLSPEC_HIDDEN;
@ -129,5 +129,5 @@ index b2fb28e..e3e718e 100644
struct wined3d_rendertarget_view
{
--
2.8.0
2.9.0

View File

@ -1,22 +1,19 @@
From 1efe7efdae17dd457ea138a6322cd2377096a1a6 Mon Sep 17 00:00:00 2001
From eccccbda7585db3087ef33db7641b99d098f6904 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 2 Oct 2013 23:28:56 +0200
Subject: wined3d: Unload resources through the CS in uninit_3d.
---
dlls/wined3d/device.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
dlls/wined3d/device.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index c22910d..fd8ac2a 100644
index 9284804..44ff6fc 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1163,8 +1163,10 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
{
@@ -1186,6 +1186,8 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
TRACE("Unloading resource %p.\n", resource);
- resource->resource_ops->resource_unload(resource);
+ wined3d_cs_emit_evict_resource(device->cs, resource);
wined3d_cs_emit_unload_resource(device->cs, resource);
}
+ if (wined3d_settings.cs_multithreaded)
+ device->cs->ops->finish(device->cs);
@ -24,5 +21,5 @@ index c22910d..fd8ac2a 100644
wine_rb_clear(&device->samplers, device_free_sampler, NULL);
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From 3e183a1addfdc55b56ae1fa52cba63f05a89efe4 Mon Sep 17 00:00:00 2001
From 88fc47f261800a4c622935e5ad03dae71215c3ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 2 Oct 2013 23:40:20 +0200
Subject: wined3d: Unload resources through the CS in device_reset.
@ -8,10 +8,10 @@ Subject: wined3d: Unload resources through the CS in device_reset.
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index fd8ac2a..fd12f05 100644
index 44ff6fc..2b5c063 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4483,20 +4483,22 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
@@ -4559,20 +4559,22 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
struct wined3d_context *context;
struct wined3d_shader *shader;
@ -22,7 +22,7 @@ index fd8ac2a..fd12f05 100644
{
TRACE("Unloading resource %p.\n", resource);
- resource->resource_ops->resource_unload(resource);
+ wined3d_cs_emit_evict_resource(device->cs, resource);
+ wined3d_cs_emit_unload_resource(device->cs, resource);
}
+ if (wined3d_settings.cs_multithreaded)
+ device->cs->ops->finish(device->cs);
@ -39,5 +39,5 @@ index fd8ac2a..fd12f05 100644
{
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->depth_blt_texture);
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From b59dff5178712b4eefafd02bf40837fe9d11b624 Mon Sep 17 00:00:00 2001
From 66785672e0f1887700cde16403d79a112065d15c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Fri, 11 Oct 2013 12:09:37 +0200
Subject: wined3d: Invoke surface_unload through the CS in
@ -11,21 +11,21 @@ crash fglrx in doing so.
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 765192d..f42127e 100644
index e25c121..4e57a58 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1033,7 +1033,10 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
@@ -1255,7 +1255,10 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
}
if (device->d3d_initialized)
- texture->resource.resource_ops->resource_unload(&texture->resource);
+ {
+ wined3d_cs_emit_evict_resource(device->cs, &texture->resource);
+ wined3d_cs_emit_unload_resource(device->cs, &texture->resource);
+ device->cs->ops->finish(device->cs);
+ }
sub_resource = &texture->sub_resources[0];
surface = sub_resource->u.surface;
--
2.8.0
2.9.0

View File

@ -1,31 +0,0 @@
From 8d7b7ffe6ddd6be993c5f330fbc84c98eeac79bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Mon, 25 Aug 2014 19:57:42 +0200
Subject: wined3d: Add a comment about worker thread lag.
---
dlls/wined3d/cs.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 1af5827..b8ee474 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -614,6 +614,14 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
cs->ops->submit(cs, sizeof(*op));
+ /* D3D10 documentation suggests that Windows allows the game to run
+ * 3 frames ahead of the GPU. Increasing this above 1 causes uneven
+ * animation in some games, most notably StarCraft II. The framerates
+ * don't show this problem. The issue is more noticable with vsync
+ * on, but also happens with vsync off.
+ *
+ * In Counter-Strike: Source a frame difference of 3 causes noticable
+ * input delay that makes the game unplayable. */
while (pending > 1)
pending = InterlockedCompareExchange(&cs->pending_presents, 0, 0);
}
--
2.8.0

View File

@ -1,4 +1,4 @@
From 159c9a54375ea6b1e35fb7de5c7dd8db15ba6809 Mon Sep 17 00:00:00 2001
From 65fdec5a37a115c8c9a4c3b70d99fac6b243cf24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 16 Mar 2014 14:13:42 +0100
Subject: wined3d: Send getdc and releasedc through the command stream.
@ -11,11 +11,11 @@ Another hacky patch to avoid using GL outside the worker thread.
3 files changed, 113 insertions(+), 34 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 890c2a2..a8d1205 100644
index c011bf1..0089911 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -79,6 +79,8 @@ enum wined3d_cs_op
WINED3D_CS_OP_EVICT_RESOURCE,
@@ -80,6 +80,8 @@ enum wined3d_cs_op
WINED3D_CS_OP_UPDATE_TEXTURE,
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
WINED3D_CS_OP_CREATE_VBO,
+ WINED3D_CS_OP_GET_DC,
@ -23,7 +23,7 @@ index 890c2a2..a8d1205 100644
WINED3D_CS_OP_STOP,
};
@@ -467,6 +469,13 @@ struct wined3d_cs_create_vbo
@@ -474,6 +476,13 @@ struct wined3d_cs_create_vbo
struct wined3d_buffer *buffer;
};
@ -37,7 +37,7 @@ index 890c2a2..a8d1205 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2449,6 +2458,52 @@ void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *bu
@@ -2478,6 +2487,52 @@ void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *bu
cs->ops->finish_prio(cs);
}
@ -90,8 +90,8 @@ index 890c2a2..a8d1205 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2506,6 +2561,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
@@ -2536,6 +2591,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
/* WINED3D_CS_OP_CREATE_VBO */ wined3d_cs_exec_create_vbo,
+ /* WINED3D_CS_OP_GET_DC */ wined3d_cs_exec_get_dc,
@ -100,10 +100,10 @@ index 890c2a2..a8d1205 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index d20322d..492d121 100644
index d69dfc1..a90391c 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -2742,13 +2742,39 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
@@ -3057,13 +3057,39 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
return WINED3D_OK;
}
@ -145,7 +145,7 @@ index d20322d..492d121 100644
TRACE("texture %p, sub_resource_idx %u, dc %p.\n", texture, sub_resource_idx, dc);
@@ -2766,35 +2792,30 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
@@ -3081,35 +3107,30 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
if (texture->resource.map_count && !(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT))
return WINED3DERR_INVALIDCALL;
@ -200,7 +200,7 @@ index d20322d..492d121 100644
}
HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC dc)
@@ -2825,14 +2846,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
@@ -3140,14 +3161,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
return WINED3DERR_INVALIDCALL;
}
@ -217,10 +217,10 @@ index d20322d..492d121 100644
return WINED3D_OK;
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 94f136d..64845ec 100644
index d370367..a524314 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2686,6 +2686,7 @@ struct wined3d_texture
@@ -2702,6 +2702,7 @@ struct wined3d_texture
DWORD flags;
GLenum target;
DWORD update_map_binding;
@ -228,7 +228,7 @@ index 94f136d..64845ec 100644
GLuint rb_multisample;
GLuint rb_resolved;
@@ -2780,6 +2781,7 @@ void wined3d_texture_changed(struct wined3d_texture *texture,
@@ -2795,6 +2796,7 @@ void wined3d_texture_changed(struct wined3d_texture *texture,
void *swap_heap_memory) DECLSPEC_HIDDEN;
BOOL wined3d_texture_check_block_align(const struct wined3d_texture *texture,
unsigned int level, const struct wined3d_box *box) DECLSPEC_HIDDEN;
@ -236,7 +236,7 @@ index 94f136d..64845ec 100644
GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture) DECLSPEC_HIDDEN;
void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int sub_resource_idx,
struct wined3d_bo_address *data, DWORD locations, BOOL map) DECLSPEC_HIDDEN;
@@ -2799,6 +2801,8 @@ void *wined3d_texture_map_internal(struct wined3d_texture *texture, unsigned int
@@ -2814,6 +2816,8 @@ void *wined3d_texture_map_internal(struct wined3d_texture *texture, unsigned int
DWORD flags) DECLSPEC_HIDDEN;
void wined3d_texture_prepare_texture(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
@ -245,17 +245,21 @@ index 94f136d..64845ec 100644
void wined3d_texture_set_map_binding(struct wined3d_texture *texture, DWORD map_binding) DECLSPEC_HIDDEN;
void wined3d_texture_set_swapchain(struct wined3d_texture *texture,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
@@ -3190,6 +3194,10 @@ void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
struct wined3d_buffer *buffer, unsigned int offset, unsigned int size) DECLSPEC_HIDDEN;
void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
@@ -3122,10 +3126,14 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs,
void (*callback)(void *object), void *object) DECLSPEC_HIDDEN;
void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned int start_idx, unsigned int index_count,
unsigned int start_instance, unsigned int instance_count, BOOL indexed) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
+ unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
+ unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
UINT base_vertex_index) DECLSPEC_HIDDEN;
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From 4d3cc344c79ce23144e339e91e21c67290ed99a7 Mon Sep 17 00:00:00 2001
From 73ba4bb84fd27c19ee2b538d36c315130a2eed4e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 10 Oct 2013 16:29:42 +0200
Subject: wined3d: Create dummy textures through the CS.
@ -12,10 +12,10 @@ crash.
3 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index a8d1205..9884361 100644
index 0089911..2aa43d6 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -81,6 +81,7 @@ enum wined3d_cs_op
@@ -82,6 +82,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_CREATE_VBO,
WINED3D_CS_OP_GET_DC,
WINED3D_CS_OP_RELEASE_DC,
@ -23,7 +23,7 @@ index a8d1205..9884361 100644
WINED3D_CS_OP_STOP,
};
@@ -476,6 +477,11 @@ struct wined3d_cs_get_release_dc
@@ -483,6 +484,11 @@ struct wined3d_cs_get_release_dc
unsigned int sub_resource_idx;
};
@ -35,7 +35,7 @@ index a8d1205..9884361 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2504,6 +2510,28 @@ void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *t
@@ -2533,6 +2539,28 @@ void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *t
cs->ops->finish(cs);
}
@ -64,7 +64,7 @@ index a8d1205..9884361 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2563,6 +2591,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2593,6 +2621,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_CREATE_VBO */ wined3d_cs_exec_create_vbo,
/* WINED3D_CS_OP_GET_DC */ wined3d_cs_exec_get_dc,
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
@ -73,10 +73,10 @@ index a8d1205..9884361 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 5c47a70..bca71ad 100644
index 2b5c063..2dfed0a 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -664,7 +664,7 @@ out:
@@ -663,7 +663,7 @@ out:
}
/* Context activation is done by the caller. */
@ -85,7 +85,7 @@ index 5c47a70..bca71ad 100644
{
const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
@@ -1045,17 +1045,15 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
@@ -1054,17 +1054,15 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
device->swapchains[0] = swapchain;
device_init_swapchain_state(device, swapchain);
@ -105,7 +105,7 @@ index 5c47a70..bca71ad 100644
/* Clear the screen */
if (swapchain->back_buffers && swapchain->back_buffers[0])
clear_flags |= WINED3DCLEAR_TARGET;
@@ -4604,7 +4602,7 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
@@ -4639,7 +4637,7 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
swapchain->context[0] = context;
swapchain->num_contexts = 1;
@ -115,10 +115,10 @@ index 5c47a70..bca71ad 100644
context_release(context);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 64845ec..ef2f632 100644
index a524314..b8b597d 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2535,7 +2535,7 @@ struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT
@@ -2550,7 +2550,7 @@ struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT
GLenum type_hint, struct wined3d_context *context) DECLSPEC_HIDDEN;
void wined3d_device_release_bo(struct wined3d_device *device, struct wined3d_gl_bo *bo,
const struct wined3d_context *context) DECLSPEC_HIDDEN;
@ -127,14 +127,14 @@ index 64845ec..ef2f632 100644
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -3198,6 +3198,7 @@ void wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *textu
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
@@ -3121,6 +3121,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil,
const struct blit_shader *blitter) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs,
void (*callback)(void *object), void *object) DECLSPEC_HIDDEN;
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From d495dd3080f450789da87d61e21dffdd0d2a4738 Mon Sep 17 00:00:00 2001
From 261adc11a7e5c6a0445575f5d53213c7a08f31d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 10 Oct 2013 16:43:19 +0200
Subject: wined3d: Create the initial context through the CS.
@ -11,10 +11,10 @@ Very hacky.
3 files changed, 103 insertions(+), 54 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 9884361..2bfd100 100644
index 2aa43d6..dc5a878 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -82,6 +82,7 @@ enum wined3d_cs_op
@@ -83,6 +83,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_GET_DC,
WINED3D_CS_OP_RELEASE_DC,
WINED3D_CS_OP_CREATE_DUMMY_TEXTURES,
@ -22,7 +22,7 @@ index 9884361..2bfd100 100644
WINED3D_CS_OP_STOP,
};
@@ -482,6 +483,13 @@ struct wined3d_cs_create_dummy_textures
@@ -489,6 +490,13 @@ struct wined3d_cs_create_dummy_textures
enum wined3d_cs_op opcode;
};
@ -36,7 +36,7 @@ index 9884361..2bfd100 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2532,6 +2540,31 @@ void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs)
@@ -2561,6 +2569,31 @@ void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs)
cs->ops->finish(cs);
}
@ -68,7 +68,7 @@ index 9884361..2bfd100 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2592,6 +2625,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2622,6 +2655,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_GET_DC */ wined3d_cs_exec_get_dc,
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
/* WINED3D_CS_OP_CREATE_DUMMY_TEXTURES */ wined3d_cs_exec_create_dummy_textures,
@ -77,10 +77,10 @@ index 9884361..2bfd100 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 4e7664c..92b70e0 100644
index f238563..2356571 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -814,6 +814,69 @@ static void wined3d_swapchain_apply_sample_count_override(const struct wined3d_s
@@ -817,6 +817,69 @@ static void wined3d_swapchain_apply_sample_count_override(const struct wined3d_s
*quality = 0;
}
@ -150,7 +150,7 @@ index 4e7664c..92b70e0 100644
static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3d_device *device,
struct wined3d_swapchain_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops)
{
@@ -931,61 +994,9 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
@@ -939,61 +1002,9 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
if (!(device->wined3d->flags & WINED3D_NO3D))
{
@ -215,19 +215,19 @@ index 4e7664c..92b70e0 100644
if (swapchain->desc.backbuffer_count > 0)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index ef2f632..8e32350 100644
index b8b597d..afe7fe0 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3199,6 +3199,8 @@ void wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *textu
void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
@@ -3122,6 +3122,8 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil,
const struct blit_shader *blitter) DECLSPEC_HIDDEN;
void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
+HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs,
+ struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
@@ -3356,6 +3358,8 @@ struct wined3d_swapchain
void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs,
void (*callback)(void *object), void *object) DECLSPEC_HIDDEN;
@@ -3362,6 +3364,8 @@ struct wined3d_swapchain
void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activate) DECLSPEC_HIDDEN;
struct wined3d_context *swapchain_get_context(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
@ -237,5 +237,5 @@ index ef2f632..8e32350 100644
HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From a606d1fcd9fa176486ecccccf2f45c046704b7e4 Mon Sep 17 00:00:00 2001
From 3d9f56982b23b16ed256f5edc1802a63fb0605b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Fri, 11 Oct 2013 10:11:13 +0200
Subject: wined3d: Delete GL contexts through the CS in reset.
@ -11,10 +11,10 @@ Let's see if this fixes the remaining fglrx crashes...
3 files changed, 47 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 2bfd100..ec3beb9 100644
index dc5a878..360667b 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -83,6 +83,7 @@ enum wined3d_cs_op
@@ -84,6 +84,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_RELEASE_DC,
WINED3D_CS_OP_CREATE_DUMMY_TEXTURES,
WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT,
@ -22,7 +22,7 @@ index 2bfd100..ec3beb9 100644
WINED3D_CS_OP_STOP,
};
@@ -490,6 +491,12 @@ struct wined3d_cs_create_swapchain_context
@@ -497,6 +498,12 @@ struct wined3d_cs_create_swapchain_context
HRESULT *ret;
};
@ -35,7 +35,7 @@ index 2bfd100..ec3beb9 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2565,6 +2572,27 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs, struct w
@@ -2594,6 +2601,27 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs, struct w
return ret;
}
@ -63,7 +63,7 @@ index 2bfd100..ec3beb9 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2626,6 +2654,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2656,6 +2684,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
/* WINED3D_CS_OP_CREATE_DUMMY_TEXTURES */ wined3d_cs_exec_create_dummy_textures,
/* WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT */ wined3d_cs_exec_create_swapchain_context,
@ -72,10 +72,10 @@ index 2bfd100..ec3beb9 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 102fa9c..3e6bcc4 100644
index 4684d43..20d09a2 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4513,21 +4513,12 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
@@ -4548,21 +4548,12 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
}
}
@ -90,7 +90,7 @@ index 102fa9c..3e6bcc4 100644
- LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
- {
- TRACE("Unloading resource %p.\n", resource);
- wined3d_cs_emit_evict_resource(device->cs, resource);
- wined3d_cs_emit_unload_resource(device->cs, resource);
- }
- if (wined3d_settings.cs_multithreaded)
- device->cs->ops->finish(device->cs);
@ -98,7 +98,7 @@ index 102fa9c..3e6bcc4 100644
LIST_FOR_EACH_ENTRY(shader, &device->shaders, struct wined3d_shader, shader_list_entry)
{
device->shader_backend->shader_destroy(shader);
@@ -4558,6 +4549,19 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
@@ -4593,6 +4584,19 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
swapchain->context = NULL;
}
@ -109,7 +109,7 @@ index 102fa9c..3e6bcc4 100644
+ LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
+ {
+ TRACE("Unloading resource %p.\n", resource);
+ wined3d_cs_emit_evict_resource(device->cs, resource);
+ wined3d_cs_emit_unload_resource(device->cs, resource);
+ }
+
+ wined3d_cs_emit_delete_opengl_contexts(device->cs, swapchain);
@ -119,10 +119,10 @@ index 102fa9c..3e6bcc4 100644
{
HRESULT hr;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 8e32350..bba2798 100644
index afe7fe0..ea7aa2b 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2536,6 +2536,8 @@ struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT
@@ -2551,6 +2551,8 @@ struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT
void wined3d_device_release_bo(struct wined3d_device *device, struct wined3d_gl_bo *bo,
const struct wined3d_context *context) DECLSPEC_HIDDEN;
void device_create_dummy_textures(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN;
@ -131,15 +131,15 @@ index 8e32350..bba2798 100644
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -3201,6 +3203,8 @@ void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *t
void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
@@ -3125,6 +3127,8 @@ void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs) DECLSPEC_HIDDE
HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs,
+ struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs,
void (*callback)(void *object), void *object) DECLSPEC_HIDDEN;
void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned int start_idx, unsigned int index_count,
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From 64af5e64f6a40fd7ac7236476e19bd3dcd2a7ea0 Mon Sep 17 00:00:00 2001
From e7dcf35fcb8ae00086a72d4942972dcc1a4bc835 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Fri, 11 Oct 2013 10:17:42 +0200
Subject: wined3d: Delete GL contexts through the CS in uninit_3d.
@ -8,10 +8,10 @@ Subject: wined3d: Delete GL contexts through the CS in uninit_3d.
1 file changed, 3 insertions(+), 30 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 31421d3..6af2755 100644
index 20d09a2..60e21ba 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1122,8 +1122,6 @@ static void device_free_sampler(struct wine_rb_entry *entry, void *context)
@@ -1132,8 +1132,6 @@ static void device_free_sampler(struct wine_rb_entry *entry, void *context)
HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
{
struct wined3d_resource *resource, *cursor;
@ -20,7 +20,7 @@ index 31421d3..6af2755 100644
struct wined3d_surface *surface;
UINT i;
@@ -1135,12 +1133,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
@@ -1145,12 +1143,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
if (wined3d_settings.cs_multithreaded)
device->cs->ops->finish(device->cs);
@ -33,9 +33,9 @@ index 31421d3..6af2755 100644
if (device->logo_texture)
wined3d_texture_decref(device->logo_texture);
if (device->cursor_texture)
@@ -1172,31 +1164,11 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
@@ -1182,31 +1174,11 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
TRACE("Unloading resource %p.\n", resource);
wined3d_cs_emit_evict_resource(device->cs, resource);
wined3d_cs_emit_unload_resource(device->cs, resource);
}
- if (wined3d_settings.cs_multithreaded)
- device->cs->ops->finish(device->cs);
@ -67,7 +67,7 @@ index 31421d3..6af2755 100644
if (device->back_buffer_view)
{
@@ -4545,6 +4517,7 @@ void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wine
@@ -4582,6 +4554,7 @@ void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wine
HeapFree(GetProcessHeap(), 0, swapchain->context);
swapchain->context = NULL;
@ -76,5 +76,5 @@ index 31421d3..6af2755 100644
static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From 394bb641cf384184b11c03647fd0779cc52a2c98 Mon Sep 17 00:00:00 2001
From 3994c7d67a6c38cdab6fe1e72cd4250d0984ce78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
Date: Sat, 7 May 2016 21:58:06 +0100
Subject: wined3d: Update the swap interval through the CS in reset.
@ -10,10 +10,10 @@ Subject: wined3d: Update the swap interval through the CS in reset.
3 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index ec3beb9..de270cb 100644
index 360667b..aea9a8a 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -84,6 +84,7 @@ enum wined3d_cs_op
@@ -85,6 +85,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_CREATE_DUMMY_TEXTURES,
WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT,
WINED3D_CS_OP_DELETE_GL_CONTEXTS,
@ -21,7 +21,7 @@ index ec3beb9..de270cb 100644
WINED3D_CS_OP_STOP,
};
@@ -497,6 +498,12 @@ struct wined3d_cs_delete_gl_contexts
@@ -504,6 +505,12 @@ struct wined3d_cs_delete_gl_contexts
struct wined3d_swapchain *swapchain;
};
@ -34,7 +34,7 @@ index ec3beb9..de270cb 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2593,6 +2600,27 @@ void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs, struct wined3
@@ -2622,6 +2629,27 @@ void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs, struct wined3
cs->ops->finish(cs);
}
@ -62,7 +62,7 @@ index ec3beb9..de270cb 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2655,6 +2683,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2685,6 +2713,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_CREATE_DUMMY_TEXTURES */ wined3d_cs_exec_create_dummy_textures,
/* WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT */ wined3d_cs_exec_create_swapchain_context,
/* WINED3D_CS_OP_DELETE_GL_CONTEXTS */ wined3d_cs_exec_delete_gl_contexts,
@ -71,10 +71,10 @@ index ec3beb9..de270cb 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index dabc91d..8fddf18 100644
index 60e21ba..b6a0896 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4880,7 +4880,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4851,7 +4851,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
{
if (reset_state)
hr = create_primary_opengl_context(device, swapchain);
@ -84,17 +84,17 @@ index dabc91d..8fddf18 100644
/* All done. There is no need to reload resources or shaders, this will happen automatically on the
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index bba2798..5d963fb 100644
index ea7aa2b..693093e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3205,6 +3205,7 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
@@ -3208,6 +3208,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
unsigned int depth_pitch) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
struct wined3d_texture *dst) DECLSPEC_HIDDEN;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
--
2.8.0
2.9.0

View File

@ -1,4 +1,4 @@
From 3bc2195fcff838f6875a50a6b07332a232e7f546 Mon Sep 17 00:00:00 2001
From 3122cfad1f999ea1e66d15da8faac83ddc12bc94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
Date: Sat, 7 May 2016 22:07:22 +0100
Subject: wined3d: Do the sampler GL init through the CS.
@ -12,18 +12,18 @@ This extra parameter is barf-inducing.
4 files changed, 63 insertions(+), 23 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 0e976b0..acf2ae0 100644
index aea9a8a..f139241 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -79,6 +79,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_EVICT_RESOURCE,
@@ -80,6 +80,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_UPDATE_TEXTURE,
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
WINED3D_CS_OP_CREATE_VBO,
+ WINED3D_CS_OP_SAMPLER_INIT,
WINED3D_CS_OP_GET_DC,
WINED3D_CS_OP_RELEASE_DC,
WINED3D_CS_OP_CREATE_DUMMY_TEXTURES,
@@ -473,6 +474,12 @@ struct wined3d_cs_create_vbo
@@ -480,6 +481,12 @@ struct wined3d_cs_create_vbo
struct wined3d_buffer *buffer;
};
@ -36,7 +36,7 @@ index 0e976b0..acf2ae0 100644
struct wined3d_cs_get_release_dc
{
enum wined3d_cs_op opcode;
@@ -2433,6 +2440,26 @@ void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *bu
@@ -2515,6 +2522,26 @@ void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *bu
cs->ops->finish_prio(cs);
}
@ -63,8 +63,8 @@ index 0e976b0..acf2ae0 100644
static UINT wined3d_cs_exec_get_dc(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_get_release_dc *op = data;
@@ -2625,6 +2652,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
@@ -2708,6 +2735,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
/* WINED3D_CS_OP_CREATE_VBO */ wined3d_cs_exec_create_vbo,
+ /* WINED3D_CS_OP_SAMPLER_INIT */ wined3d_cs_exec_sampler_init,
@ -72,7 +72,7 @@ index 0e976b0..acf2ae0 100644
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
/* WINED3D_CS_OP_CREATE_DUMMY_TEXTURES */ wined3d_cs_exec_create_dummy_textures,
diff --git a/dlls/wined3d/sampler.c b/dlls/wined3d/sampler.c
index 1a2e2a1..2bf881f 100644
index 5902feb..9939b78 100644
--- a/dlls/wined3d/sampler.c
+++ b/dlls/wined3d/sampler.c
@@ -66,43 +66,37 @@ void * CDECL wined3d_sampler_get_parent(const struct wined3d_sampler *sampler)
@ -164,10 +164,10 @@ index 1a2e2a1..2bf881f 100644
TRACE("Created sampler %p.\n", object);
*sampler = object;
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 50cf6cd..64afaac 100644
index c08af26..f0d025c 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -3604,7 +3604,7 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state
@@ -3651,7 +3651,7 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state
}
else
{
@ -177,10 +177,10 @@ index 50cf6cd..64afaac 100644
ERR("Failed to create sampler.\n");
sampler = NULL;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 9a43938..fd4ba77 100644
index 693093e..849c5ad 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2914,6 +2914,10 @@ struct wined3d_sampler
@@ -2963,6 +2963,10 @@ struct wined3d_sampler
GLuint name;
};
@ -191,14 +191,14 @@ index 9a43938..fd4ba77 100644
struct wined3d_vertex_declaration_element
{
const struct wined3d_format *format;
@@ -3153,6 +3157,7 @@ void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
struct wined3d_buffer *buffer, unsigned int offset, unsigned int size) DECLSPEC_HIDDEN;
void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
void wined3d_cs_emit_create_vbo(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_sampler_init(struct wined3d_cs *cs, struct wined3d_sampler *sampler) DECLSPEC_HIDDEN;
void wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
@@ -3142,6 +3146,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_sampler_init(struct wined3d_cs *cs, struct wined3d_sampler *sampler) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
UINT base_vertex_index) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx,
--
2.8.0
2.9.0

View File

@ -1,24 +0,0 @@
From 51cdd61c99614b34131f59dfac9ac684f6001e61 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
Date: Sat, 7 May 2016 22:16:43 +0100
Subject: wined3d: Remove the device_reset CS sync fixme.
---
dlls/wined3d/device.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 95c34b2..24c66a8 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4543,7 +4543,6 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
if (wined3d_settings.cs_multithreaded)
{
- FIXME("Waiting for cs.\n");
wined3d_cs_emit_glfinish(device->cs);
device->cs->ops->finish(device->cs);
}
--
2.8.0

View File

@ -1,4 +1,4 @@
From 50fa1cd464e2ad5a85d3a4400e32b4f9f7ff4e36 Mon Sep 17 00:00:00 2001
From 6fac21d0265b08214e7c229466514279c3297427 Mon Sep 17 00:00:00 2001
From: Nils Kuhnhenn <nils@volafile.io>
Date: Fri, 5 Aug 2016 20:28:46 +0200
Subject: wined3d: Fix context_acquire not being called from the command thread
@ -11,10 +11,10 @@ Subject: wined3d: Fix context_acquire not being called from the command thread
3 files changed, 53 insertions(+), 14 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 7052c19..9f850a5 100644
index ddd5703..0b15565 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -72,6 +72,7 @@ enum wined3d_cs_op
@@ -73,6 +73,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_TEXTURE_CHANGED,
WINED3D_CS_OP_TEXTURE_MAP,
WINED3D_CS_OP_TEXTURE_UNMAP,
@ -22,7 +22,7 @@ index 7052c19..9f850a5 100644
WINED3D_CS_OP_BUFFER_SWAP_MEM,
WINED3D_CS_OP_BUFFER_INVALIDATE_RANGE,
WINED3D_CS_OP_BUFFER_PRELOAD,
@@ -413,6 +414,13 @@ struct wined3d_cs_texture_unmap
@@ -419,6 +420,13 @@ struct wined3d_cs_texture_unmap
unsigned int sub_resource_idx;
};
@ -36,7 +36,7 @@ index 7052c19..9f850a5 100644
struct wined3d_cs_texture_changed
{
enum wined3d_cs_op opcode;
@@ -2253,6 +2261,47 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
@@ -2274,6 +2282,47 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
cs->ops->submit_prio(cs, sizeof(*op));
}
@ -84,7 +84,7 @@ index 7052c19..9f850a5 100644
static UINT wined3d_cs_exec_texture_preload(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_texture_preload *op = data;
@@ -2730,6 +2779,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2723,6 +2772,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_TEXTURE_CHANGED */ wined3d_cs_exec_texture_changed,
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
@ -93,7 +93,7 @@ index 7052c19..9f850a5 100644
/* WINED3D_CS_OP_BUFFER_INVALIDATE_RANGE */ wined3d_cs_exec_buffer_invalidate_bo_range,
/* WINED3D_CS_OP_BUFFER_PRELOAD */ wined3d_cs_exec_buffer_preload,
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index de0cf58..585cf8e 100644
index 9730148..b1fc1e5 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1551,7 +1551,6 @@ struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(struct win
@ -126,18 +126,18 @@ index de0cf58..585cf8e 100644
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index d8eaeb7..bd8557c 100644
index 0822b2e..b930a6a 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3192,6 +3192,8 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
unsigned int sub_resource_idx, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
@@ -3201,6 +3201,8 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs, struct wined3d_texture *texture,
+ unsigned int sub_resource_idx, const struct wined3d_box *dirty_region) DECLSPEC_HIDDEN;
void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
struct wined3d_texture *dst) DECLSPEC_HIDDEN;
void wined3d_cs_emit_texture_changed(struct wined3d_cs *cs, struct wined3d_texture *texture,
unsigned int sub_resource_idx, struct wined3d_gl_bo *swap_buffer,
void *swap_heap_memory) DECLSPEC_HIDDEN;
--
2.9.0

File diff suppressed because it is too large Load Diff