You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f03d32e381 | ||
|
da7652e29c | ||
|
1bc2bc0404 | ||
|
e2b1620f07 | ||
|
e3d0d19955 | ||
|
d4483ee98c | ||
|
0236a37992 | ||
|
0e08b05863 | ||
|
6ae3756a4f | ||
|
8ad449f7b1 | ||
|
0855d4defe | ||
|
78bd3f0c6d | ||
|
16cfc61df8 | ||
|
153172ad27 |
@@ -1,371 +0,0 @@
|
||||
From 3eb7b781849135fefeece9ca257ca9673b1545fd Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sun, 16 Jul 2017 18:13:31 +0200
|
||||
Subject: d3dx9_36: Add semi-stub for D3DXOptimizeVertices.
|
||||
|
||||
---
|
||||
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/mesh.c | 27 +++++++++++++++++++++++++++
|
||||
dlls/d3dx9_36/tests/mesh.c | 22 ++++++++++++++++++++++
|
||||
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 +-
|
||||
22 files changed, 69 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_24/d3dx9_24.spec b/dlls/d3dx9_24/d3dx9_24.spec
|
||||
index 0ca8777efe6..9b52c2bf307 100644
|
||||
--- a/dlls/d3dx9_24/d3dx9_24.spec
|
||||
+++ b/dlls/d3dx9_24/d3dx9_24.spec
|
||||
@@ -226,7 +226,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_25/d3dx9_25.spec b/dlls/d3dx9_25/d3dx9_25.spec
|
||||
index a5449810a43..fc75dfd9c04 100644
|
||||
--- a/dlls/d3dx9_25/d3dx9_25.spec
|
||||
+++ b/dlls/d3dx9_25/d3dx9_25.spec
|
||||
@@ -226,7 +226,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_26/d3dx9_26.spec b/dlls/d3dx9_26/d3dx9_26.spec
|
||||
index 9e1200442f4..85d9fc5332e 100644
|
||||
--- a/dlls/d3dx9_26/d3dx9_26.spec
|
||||
+++ b/dlls/d3dx9_26/d3dx9_26.spec
|
||||
@@ -230,7 +230,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_27/d3dx9_27.spec b/dlls/d3dx9_27/d3dx9_27.spec
|
||||
index 9e1200442f4..85d9fc5332e 100644
|
||||
--- a/dlls/d3dx9_27/d3dx9_27.spec
|
||||
+++ b/dlls/d3dx9_27/d3dx9_27.spec
|
||||
@@ -230,7 +230,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_28/d3dx9_28.spec b/dlls/d3dx9_28/d3dx9_28.spec
|
||||
index b316a23baf1..62673ccd7af 100644
|
||||
--- a/dlls/d3dx9_28/d3dx9_28.spec
|
||||
+++ b/dlls/d3dx9_28/d3dx9_28.spec
|
||||
@@ -230,7 +230,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_29/d3dx9_29.spec b/dlls/d3dx9_29/d3dx9_29.spec
|
||||
index b316a23baf1..62673ccd7af 100644
|
||||
--- a/dlls/d3dx9_29/d3dx9_29.spec
|
||||
+++ b/dlls/d3dx9_29/d3dx9_29.spec
|
||||
@@ -230,7 +230,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_30/d3dx9_30.spec b/dlls/d3dx9_30/d3dx9_30.spec
|
||||
index e00fa547862..2c7575d88fc 100644
|
||||
--- a/dlls/d3dx9_30/d3dx9_30.spec
|
||||
+++ b/dlls/d3dx9_30/d3dx9_30.spec
|
||||
@@ -230,7 +230,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_31/d3dx9_31.spec b/dlls/d3dx9_31/d3dx9_31.spec
|
||||
index d308939ef67..a41eb3e9af2 100644
|
||||
--- a/dlls/d3dx9_31/d3dx9_31.spec
|
||||
+++ b/dlls/d3dx9_31/d3dx9_31.spec
|
||||
@@ -227,7 +227,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_32/d3dx9_32.spec b/dlls/d3dx9_32/d3dx9_32.spec
|
||||
index c2292dff396..eab56b3c9ee 100644
|
||||
--- a/dlls/d3dx9_32/d3dx9_32.spec
|
||||
+++ b/dlls/d3dx9_32/d3dx9_32.spec
|
||||
@@ -227,7 +227,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_33/d3dx9_33.spec b/dlls/d3dx9_33/d3dx9_33.spec
|
||||
index c2292dff396..eab56b3c9ee 100644
|
||||
--- a/dlls/d3dx9_33/d3dx9_33.spec
|
||||
+++ b/dlls/d3dx9_33/d3dx9_33.spec
|
||||
@@ -227,7 +227,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_34/d3dx9_34.spec b/dlls/d3dx9_34/d3dx9_34.spec
|
||||
index c2292dff396..eab56b3c9ee 100644
|
||||
--- a/dlls/d3dx9_34/d3dx9_34.spec
|
||||
+++ b/dlls/d3dx9_34/d3dx9_34.spec
|
||||
@@ -227,7 +227,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_35/d3dx9_35.spec b/dlls/d3dx9_35/d3dx9_35.spec
|
||||
index c2292dff396..eab56b3c9ee 100644
|
||||
--- a/dlls/d3dx9_35/d3dx9_35.spec
|
||||
+++ b/dlls/d3dx9_35/d3dx9_35.spec
|
||||
@@ -227,7 +227,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec
|
||||
index 0fdf4e135e1..6201657d4a5 100644
|
||||
--- a/dlls/d3dx9_36/d3dx9_36.spec
|
||||
+++ b/dlls/d3dx9_36/d3dx9_36.spec
|
||||
@@ -229,7 +229,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
|
||||
index 6294ce624fe..12cb7eb7258 100644
|
||||
--- a/dlls/d3dx9_36/mesh.c
|
||||
+++ b/dlls/d3dx9_36/mesh.c
|
||||
@@ -7184,6 +7184,33 @@ cleanup:
|
||||
return hr;
|
||||
}
|
||||
|
||||
+
|
||||
+/*************************************************************************
|
||||
+ * D3DXOptimizeVertices (D3DX9_36.@)
|
||||
+ */
|
||||
+HRESULT WINAPI D3DXOptimizeVertices(const void *indices, UINT num_faces,
|
||||
+ UINT num_vertices, BOOL indices_are_32bit, DWORD *vertex_remap)
|
||||
+{
|
||||
+ UINT i;
|
||||
+
|
||||
+ FIXME("indices %p, num_faces %u, num_vertices %u, indices_are_32bit %#x, vertex_remap %p semi-stub.\n",
|
||||
+ indices, num_faces, num_vertices, indices_are_32bit, vertex_remap);
|
||||
+
|
||||
+ if (!vertex_remap)
|
||||
+ {
|
||||
+ WARN("vertex remap pointer is NULL.\n");
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < num_vertices; i++)
|
||||
+ {
|
||||
+ vertex_remap[i] = i;
|
||||
+ }
|
||||
+
|
||||
+ return D3D_OK;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/*************************************************************************
|
||||
* D3DXOptimizeFaces (D3DX9_36.@)
|
||||
*
|
||||
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
|
||||
index f437a83cbd8..c5faae520c9 100644
|
||||
--- a/dlls/d3dx9_36/tests/mesh.c
|
||||
+++ b/dlls/d3dx9_36/tests/mesh.c
|
||||
@@ -10403,6 +10403,27 @@ cleanup:
|
||||
free_test_context(test_context);
|
||||
}
|
||||
|
||||
+static void test_optimize_vertices(void)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+ DWORD vertex_remap[3];
|
||||
+ const DWORD indices[] = {0, 1, 2};
|
||||
+ const UINT num_faces = 1;
|
||||
+ const UINT num_vertices = 3;
|
||||
+
|
||||
+ hr = D3DXOptimizeVertices(indices, num_faces,
|
||||
+ num_vertices, FALSE,
|
||||
+ vertex_remap);
|
||||
+ ok(hr == D3D_OK, "D3DXOptimizeVertices failed. Got %lx, expected D3D_OK.\n", hr);
|
||||
+
|
||||
+ /* vertex_remap must not be NULL */
|
||||
+ hr = D3DXOptimizeVertices(indices, num_faces,
|
||||
+ num_vertices, FALSE,
|
||||
+ NULL);
|
||||
+ ok(hr == D3DERR_INVALIDCALL, "D3DXOptimizeVertices passed NULL vertex_remap "
|
||||
+ "pointer. Got %lx, expected D3DERR_INVALIDCALL.\n", hr);
|
||||
+}
|
||||
+
|
||||
static void test_optimize_faces(void)
|
||||
{
|
||||
HRESULT hr;
|
||||
@@ -11291,6 +11312,7 @@ START_TEST(mesh)
|
||||
test_weld_vertices();
|
||||
test_clone_mesh();
|
||||
test_valid_mesh();
|
||||
+ test_optimize_vertices();
|
||||
test_optimize_faces();
|
||||
test_compute_normals();
|
||||
test_D3DXFrameFind();
|
||||
diff --git a/dlls/d3dx9_37/d3dx9_37.spec b/dlls/d3dx9_37/d3dx9_37.spec
|
||||
index 0fdf4e135e1..6201657d4a5 100644
|
||||
--- a/dlls/d3dx9_37/d3dx9_37.spec
|
||||
+++ b/dlls/d3dx9_37/d3dx9_37.spec
|
||||
@@ -229,7 +229,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_38/d3dx9_38.spec b/dlls/d3dx9_38/d3dx9_38.spec
|
||||
index 0fdf4e135e1..6201657d4a5 100644
|
||||
--- a/dlls/d3dx9_38/d3dx9_38.spec
|
||||
+++ b/dlls/d3dx9_38/d3dx9_38.spec
|
||||
@@ -229,7 +229,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_39/d3dx9_39.spec b/dlls/d3dx9_39/d3dx9_39.spec
|
||||
index 0fdf4e135e1..6201657d4a5 100644
|
||||
--- a/dlls/d3dx9_39/d3dx9_39.spec
|
||||
+++ b/dlls/d3dx9_39/d3dx9_39.spec
|
||||
@@ -229,7 +229,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_40/d3dx9_40.spec b/dlls/d3dx9_40/d3dx9_40.spec
|
||||
index 0fdf4e135e1..6201657d4a5 100644
|
||||
--- a/dlls/d3dx9_40/d3dx9_40.spec
|
||||
+++ b/dlls/d3dx9_40/d3dx9_40.spec
|
||||
@@ -229,7 +229,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_41/d3dx9_41.spec b/dlls/d3dx9_41/d3dx9_41.spec
|
||||
index 0fdf4e135e1..6201657d4a5 100644
|
||||
--- a/dlls/d3dx9_41/d3dx9_41.spec
|
||||
+++ b/dlls/d3dx9_41/d3dx9_41.spec
|
||||
@@ -229,7 +229,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_42/d3dx9_42.spec b/dlls/d3dx9_42/d3dx9_42.spec
|
||||
index 2f2ac5fd619..7cfc439f84b 100644
|
||||
--- a/dlls/d3dx9_42/d3dx9_42.spec
|
||||
+++ b/dlls/d3dx9_42/d3dx9_42.spec
|
||||
@@ -222,7 +222,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_43/d3dx9_43.spec b/dlls/d3dx9_43/d3dx9_43.spec
|
||||
index 2f2ac5fd619..7cfc439f84b 100644
|
||||
--- a/dlls/d3dx9_43/d3dx9_43.spec
|
||||
+++ b/dlls/d3dx9_43/d3dx9_43.spec
|
||||
@@ -222,7 +222,7 @@
|
||||
@ stdcall D3DXMatrixTranslation(ptr float float float)
|
||||
@ stdcall D3DXMatrixTranspose(ptr ptr)
|
||||
@ stdcall D3DXOptimizeFaces(ptr long long long ptr)
|
||||
-@ stub D3DXOptimizeVertices(ptr long long long ptr)
|
||||
+@ stdcall D3DXOptimizeVertices(ptr long long long ptr)
|
||||
@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||
@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr)
|
||||
--
|
||||
2.14.2
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [47776] Timeshift needs D3DXOptimizeVertices()
|
@@ -0,0 +1,158 @@
|
||||
From 79617ce168284934b09313f454e911394ec5eed8 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 1 Nov 2024 17:59:51 +1100
|
||||
Subject: [PATCH] dmime: Semi implement
|
||||
IDirectMusicSegment::GetAudioPathConfig.
|
||||
|
||||
---
|
||||
dlls/dmime/audiopath.c | 97 +++++++++++++++++++++++-------------------
|
||||
dlls/dmime/segment.c | 6 +++
|
||||
2 files changed, 59 insertions(+), 44 deletions(-)
|
||||
|
||||
diff --git a/dlls/dmime/audiopath.c b/dlls/dmime/audiopath.c
|
||||
index 3389f965b8f..501eecf234c 100644
|
||||
--- a/dlls/dmime/audiopath.c
|
||||
+++ b/dlls/dmime/audiopath.c
|
||||
@@ -649,18 +649,21 @@ HRESULT path_config_get_audio_path_params(IUnknown *iface, WAVEFORMATEX *format,
|
||||
{
|
||||
struct audio_path_config *This = impl_from_IUnknown(iface);
|
||||
struct list *first_port_config, *first_pchannel_to_buffer;
|
||||
- struct audio_path_port_config *port_config;
|
||||
- struct audio_path_pchannel_to_buffer *pchannel_to_buffer;
|
||||
+ struct audio_path_port_config *port_config = NULL;
|
||||
+ struct audio_path_pchannel_to_buffer *pchannel_to_buffer = NULL;
|
||||
GUID *guids;
|
||||
|
||||
first_port_config = list_head(&This->port_config_entries);
|
||||
- if (list_next(&This->port_config_entries, first_port_config))
|
||||
- FIXME("Only one port config supported. %p -> %p\n", first_port_config, list_next(&This->port_config_entries, first_port_config));
|
||||
- port_config = LIST_ENTRY(first_port_config, struct audio_path_port_config, entry);
|
||||
- first_pchannel_to_buffer = list_head(&port_config->pchannel_to_buffer_entries);
|
||||
- if (list_next(&port_config->pchannel_to_buffer_entries, first_pchannel_to_buffer))
|
||||
- FIXME("Only one pchannel to buffer entry supported.\n");
|
||||
- pchannel_to_buffer = LIST_ENTRY(first_pchannel_to_buffer, struct audio_path_pchannel_to_buffer, entry);
|
||||
+ if (first_port_config)
|
||||
+ {
|
||||
+ if (list_next(&This->port_config_entries, first_port_config))
|
||||
+ FIXME("Only one port config supported. %p -> %p\n", first_port_config, list_next(&This->port_config_entries, first_port_config));
|
||||
+ port_config = LIST_ENTRY(first_port_config, struct audio_path_port_config, entry);
|
||||
+ first_pchannel_to_buffer = list_head(&port_config->pchannel_to_buffer_entries);
|
||||
+ if (list_next(&port_config->pchannel_to_buffer_entries, first_pchannel_to_buffer))
|
||||
+ FIXME("Only one pchannel to buffer entry supported.\n");
|
||||
+ pchannel_to_buffer = LIST_ENTRY(first_pchannel_to_buffer, struct audio_path_pchannel_to_buffer, entry);
|
||||
+ }
|
||||
|
||||
/* Secondary buffer description */
|
||||
memset(format, 0, sizeof(*format));
|
||||
@@ -680,50 +683,56 @@ HRESULT path_config_get_audio_path_params(IUnknown *iface, WAVEFORMATEX *format,
|
||||
desc->lpwfxFormat = format;
|
||||
desc->guid3DAlgorithm = GUID_NULL;
|
||||
|
||||
- guids = pchannel_to_buffer->guids;
|
||||
- if (pchannel_to_buffer->header.dwBufferCount == 2)
|
||||
+ if (pchannel_to_buffer)
|
||||
{
|
||||
- if ((!IsEqualGUID(&guids[0], &GUID_Buffer_Reverb) && !IsEqualGUID(&guids[0], &GUID_Buffer_Stereo)) ||
|
||||
- (!IsEqualGUID(&guids[1], &GUID_Buffer_Reverb) && !IsEqualGUID(&guids[1], &GUID_Buffer_Stereo)) ||
|
||||
- IsEqualGUID(&guids[0], &guids[1]))
|
||||
- FIXME("Only a stereo plus reverb buffer is supported\n");
|
||||
- else
|
||||
+ guids = pchannel_to_buffer->guids;
|
||||
+ if (pchannel_to_buffer->header.dwBufferCount == 2)
|
||||
{
|
||||
- desc->dwFlags |= DSBCAPS_CTRLPAN | DSBCAPS_CTRLFREQUENCY;
|
||||
- format->nChannels = 2;
|
||||
- format->nBlockAlign *= 2;
|
||||
- format->nAvgBytesPerSec *= 2;
|
||||
+ if ((!IsEqualGUID(&guids[0], &GUID_Buffer_Reverb) && !IsEqualGUID(&guids[0], &GUID_Buffer_Stereo)) ||
|
||||
+ (!IsEqualGUID(&guids[1], &GUID_Buffer_Reverb) && !IsEqualGUID(&guids[1], &GUID_Buffer_Stereo)) ||
|
||||
+ IsEqualGUID(&guids[0], &guids[1]))
|
||||
+ FIXME("Only a stereo plus reverb buffer is supported\n");
|
||||
+ else
|
||||
+ {
|
||||
+ desc->dwFlags |= DSBCAPS_CTRLPAN | DSBCAPS_CTRLFREQUENCY;
|
||||
+ format->nChannels = 2;
|
||||
+ format->nBlockAlign *= 2;
|
||||
+ format->nAvgBytesPerSec *= 2;
|
||||
+ }
|
||||
}
|
||||
- }
|
||||
- else if (pchannel_to_buffer->header.dwBufferCount == 1)
|
||||
- {
|
||||
- if (IsEqualGUID(guids, &GUID_Buffer_Stereo))
|
||||
+ else if (pchannel_to_buffer->header.dwBufferCount == 1)
|
||||
{
|
||||
- desc->dwFlags |= DSBCAPS_CTRLPAN | DSBCAPS_CTRLFREQUENCY;
|
||||
- format->nChannels = 2;
|
||||
- format->nBlockAlign *= 2;
|
||||
- format->nAvgBytesPerSec *= 2;
|
||||
+ if (IsEqualGUID(guids, &GUID_Buffer_Stereo))
|
||||
+ {
|
||||
+ desc->dwFlags |= DSBCAPS_CTRLPAN | DSBCAPS_CTRLFREQUENCY;
|
||||
+ format->nChannels = 2;
|
||||
+ format->nBlockAlign *= 2;
|
||||
+ format->nAvgBytesPerSec *= 2;
|
||||
+ }
|
||||
+ else if (IsEqualGUID(guids, &GUID_Buffer_3D_Dry))
|
||||
+ desc->dwFlags |= DSBCAPS_CTRL3D | DSBCAPS_CTRLFREQUENCY | DSBCAPS_MUTE3DATMAXDISTANCE;
|
||||
+ else if (IsEqualGUID(guids, &GUID_Buffer_Mono))
|
||||
+ desc->dwFlags |= DSBCAPS_CTRLPAN | DSBCAPS_CTRLFREQUENCY;
|
||||
+ else
|
||||
+ FIXME("Unsupported buffer guid %s\n", debugstr_dmguid(guids));
|
||||
}
|
||||
- else if (IsEqualGUID(guids, &GUID_Buffer_3D_Dry))
|
||||
- desc->dwFlags |= DSBCAPS_CTRL3D | DSBCAPS_CTRLFREQUENCY | DSBCAPS_MUTE3DATMAXDISTANCE;
|
||||
- else if (IsEqualGUID(guids, &GUID_Buffer_Mono))
|
||||
- desc->dwFlags |= DSBCAPS_CTRLPAN | DSBCAPS_CTRLFREQUENCY;
|
||||
else
|
||||
- FIXME("Unsupported buffer guid %s\n", debugstr_dmguid(guids));
|
||||
+ FIXME("Multiple buffers not supported\n");
|
||||
}
|
||||
- else
|
||||
- FIXME("Multiple buffers not supported\n");
|
||||
|
||||
- *params = port_config->params;
|
||||
- if (!(params->dwValidParams & DMUS_PORTPARAMS_CHANNELGROUPS))
|
||||
- {
|
||||
- params->dwValidParams |= DMUS_PORTPARAMS_CHANNELGROUPS;
|
||||
- params->dwChannelGroups = (port_config->header.dwPChannelCount + 15) / 16;
|
||||
- }
|
||||
- if (!(params->dwValidParams & DMUS_PORTPARAMS_AUDIOCHANNELS))
|
||||
+ if (port_config)
|
||||
{
|
||||
- params->dwValidParams |= DMUS_PORTPARAMS_AUDIOCHANNELS;
|
||||
- params->dwAudioChannels = format->nChannels;
|
||||
+ *params = port_config->params;
|
||||
+ if (!(params->dwValidParams & DMUS_PORTPARAMS_CHANNELGROUPS))
|
||||
+ {
|
||||
+ params->dwValidParams |= DMUS_PORTPARAMS_CHANNELGROUPS;
|
||||
+ params->dwChannelGroups = (port_config->header.dwPChannelCount + 15) / 16;
|
||||
+ }
|
||||
+ if (!(params->dwValidParams & DMUS_PORTPARAMS_AUDIOCHANNELS))
|
||||
+ {
|
||||
+ params->dwValidParams |= DMUS_PORTPARAMS_AUDIOCHANNELS;
|
||||
+ params->dwAudioChannels = format->nChannels;
|
||||
+ }
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
diff --git a/dlls/dmime/segment.c b/dlls/dmime/segment.c
|
||||
index b96f0e2e401..36860b7c762 100644
|
||||
--- a/dlls/dmime/segment.c
|
||||
+++ b/dlls/dmime/segment.c
|
||||
@@ -516,6 +516,12 @@ static HRESULT WINAPI segment_GetAudioPathConfig(IDirectMusicSegment8 *iface, IU
|
||||
{
|
||||
struct segment *This = impl_from_IDirectMusicSegment8(iface);
|
||||
FIXME("(%p, %p): stub\n", This, ppAudioPathConfig);
|
||||
+
|
||||
+ if (!ppAudioPathConfig)
|
||||
+ return E_POINTER;
|
||||
+
|
||||
+ create_dmaudiopath_config(&IID_IUnknown, (void**)ppAudioPathConfig);
|
||||
+
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
--
|
||||
2.45.2
|
||||
|
1
patches/dmime_segment_getaudiopath/definition
Normal file
1
patches/dmime_segment_getaudiopath/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [56699] dmime: Semi-Implement IDirectMusicSegment8::GetAudioPathConfig
|
@@ -0,0 +1,27 @@
|
||||
From 59bed5259de3329ab2332c9c03f99126acdba4a4 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 1 Nov 2024 19:39:11 +1100
|
||||
Subject: [PATCH] dmscript: IDirectMusicScript::EnumRoutine return S_FALSE by
|
||||
default
|
||||
|
||||
https://bugs.winehq.org/show_bug.cgi?id=55982
|
||||
---
|
||||
dlls/dmscript/script.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/dmscript/script.c b/dlls/dmscript/script.c
|
||||
index 01d4bcd0290..278405a322a 100644
|
||||
--- a/dlls/dmscript/script.c
|
||||
+++ b/dlls/dmscript/script.c
|
||||
@@ -171,7 +171,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_EnumRoutine(IDirectMusicScript *ifa
|
||||
{
|
||||
IDirectMusicScriptImpl *This = impl_from_IDirectMusicScript(iface);
|
||||
FIXME("(%p, %ld, %p): stub\n", This, dwIndex, pwszName);
|
||||
- return S_OK;
|
||||
+ return S_FALSE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirectMusicScriptImpl_EnumVariable(IDirectMusicScript *iface, DWORD dwIndex,
|
||||
--
|
||||
2.45.2
|
||||
|
1
patches/dmscript_enum_routine/definition
Normal file
1
patches/dmscript_enum_routine/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [55982] dmscript: IDirectMusicScript::EnumRoutine return S_FALSE by default
|
@@ -1,4 +1,4 @@
|
||||
From 0c97689e30108869e0ffc5fb7a13edcb42de7450 Mon Sep 17 00:00:00 2001
|
||||
From 914fe97f7dc20348ec3e1a2e18bcefa9b7cab463 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Fri, 8 Jun 2018 18:51:40 -0500
|
||||
Subject: [PATCH] server: Add an object operation to grab the esync file
|
||||
@@ -10,7 +10,7 @@ Split off to decrease patch size.
|
||||
server/atom.c | 1 +
|
||||
server/change.c | 1 +
|
||||
server/clipboard.c | 1 +
|
||||
server/completion.c | 1 +
|
||||
server/completion.c | 2 ++
|
||||
server/console.c | 7 +++++++
|
||||
server/debugger.c | 2 ++
|
||||
server/device.c | 4 ++++
|
||||
@@ -41,7 +41,7 @@ Split off to decrease patch size.
|
||||
server/token.c | 1 +
|
||||
server/window.c | 1 +
|
||||
server/winstation.c | 2 ++
|
||||
35 files changed, 70 insertions(+)
|
||||
35 files changed, 71 insertions(+)
|
||||
|
||||
diff --git a/server/async.c b/server/async.c
|
||||
index 749c547af4f..2377c737e98 100644
|
||||
@@ -100,10 +100,18 @@ index 91f159bc7c9..0df7fd2f18e 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/completion.c b/server/completion.c
|
||||
index 6933195e72d..3d4be86a212 100644
|
||||
index f9e68c523f1..9093132efac 100644
|
||||
--- a/server/completion.c
|
||||
+++ b/server/completion.c
|
||||
@@ -75,6 +75,7 @@ static const struct object_ops completion_ops =
|
||||
@@ -92,6 +92,7 @@ static const struct object_ops completion_wait_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
completion_wait_signaled, /* signaled */
|
||||
+ NULL, /* get_esync_fd */
|
||||
completion_wait_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -166,6 +167,7 @@ static const struct object_ops completion_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
completion_signaled, /* signaled */
|
||||
@@ -653,7 +661,7 @@ index dd28efd3a75..c7f34412317 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/thread.c b/server/thread.c
|
||||
index cf69b3b53c3..4b537586e31 100644
|
||||
index 506adfc0a6f..339cdfec1fa 100644
|
||||
--- a/server/thread.c
|
||||
+++ b/server/thread.c
|
||||
@@ -96,6 +96,7 @@ static const struct object_ops thread_apc_ops =
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 7476e7b2e8680352cf2e1de7552ae58e11ff7869 Mon Sep 17 00:00:00 2001
|
||||
From 0ef3de9bd3b51a1e37c50fd75ceb3db6ea24abd0 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 15:19:37 -0500
|
||||
Subject: [PATCH] ntdll, server: Implement waiting on server-bound objects.
|
||||
@@ -16,14 +16,15 @@ With this patch we break waiting on svcctl.exe.
|
||||
dlls/ntdll/unix/esync.c | 84 ++++++++++++++++++++++++++++++++++++++---
|
||||
server/esync.c | 16 ++++++++
|
||||
server/esync.h | 1 +
|
||||
server/named_pipe.c | 1 +
|
||||
server/thread.c | 4 ++
|
||||
4 files changed, 99 insertions(+), 6 deletions(-)
|
||||
5 files changed, 100 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index 4f993689e0d..6fd195df759 100644
|
||||
index 65ef70acd36..b0168f5cde5 100644
|
||||
--- a/dlls/ntdll/unix/esync.c
|
||||
+++ b/dlls/ntdll/unix/esync.c
|
||||
@@ -199,6 +199,72 @@ static struct esync *get_cached_object( HANDLE handle )
|
||||
@@ -193,6 +193,72 @@ static struct esync *get_cached_object( HANDLE handle )
|
||||
return &esync_list[entry][idx];
|
||||
}
|
||||
|
||||
@@ -96,7 +97,7 @@ index 4f993689e0d..6fd195df759 100644
|
||||
NTSTATUS esync_close( HANDLE handle )
|
||||
{
|
||||
UINT_PTR entry, idx = handle_to_index( handle, &entry );
|
||||
@@ -278,10 +344,11 @@ NTSTATUS esync_release_semaphore( HANDLE handle, ULONG count, ULONG *prev )
|
||||
@@ -272,10 +338,11 @@ NTSTATUS esync_release_semaphore( HANDLE handle, ULONG count, ULONG *prev )
|
||||
struct semaphore *semaphore;
|
||||
uint64_t count64 = count;
|
||||
ULONG current;
|
||||
@@ -109,7 +110,7 @@ index 4f993689e0d..6fd195df759 100644
|
||||
semaphore = obj->shm;
|
||||
|
||||
do
|
||||
@@ -320,10 +387,11 @@ NTSTATUS esync_set_event( HANDLE handle )
|
||||
@@ -314,10 +381,11 @@ NTSTATUS esync_set_event( HANDLE handle )
|
||||
{
|
||||
static const uint64_t value = 1;
|
||||
struct esync *obj;
|
||||
@@ -122,7 +123,7 @@ index 4f993689e0d..6fd195df759 100644
|
||||
|
||||
if (write( obj->fd, &value, sizeof(value) ) == -1)
|
||||
ERR("write: %s\n", strerror(errno));
|
||||
@@ -335,10 +403,11 @@ NTSTATUS esync_reset_event( HANDLE handle )
|
||||
@@ -329,10 +397,11 @@ NTSTATUS esync_reset_event( HANDLE handle )
|
||||
{
|
||||
uint64_t value;
|
||||
struct esync *obj;
|
||||
@@ -135,7 +136,7 @@ index 4f993689e0d..6fd195df759 100644
|
||||
|
||||
if (read( obj->fd, &value, sizeof(value) ) == -1 && errno != EWOULDBLOCK && errno != EAGAIN)
|
||||
ERR("read: %s\n", strerror(errno));
|
||||
@@ -427,10 +496,13 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -421,10 +490,13 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
@@ -151,7 +152,7 @@ index 4f993689e0d..6fd195df759 100644
|
||||
}
|
||||
|
||||
if (has_esync && has_server)
|
||||
@@ -483,7 +555,7 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -477,7 +549,7 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
int64_t value;
|
||||
ssize_t size;
|
||||
|
||||
@@ -161,10 +162,10 @@ index 4f993689e0d..6fd195df759 100644
|
||||
/* Don't grab the object, just check if it's signaled. */
|
||||
if (fds[i].revents & POLLIN)
|
||||
diff --git a/server/esync.c b/server/esync.c
|
||||
index e18b76bff5b..2b9307267f9 100644
|
||||
index 44214e5fe02..60e98936455 100644
|
||||
--- a/server/esync.c
|
||||
+++ b/server/esync.c
|
||||
@@ -315,6 +315,22 @@ int esync_create_fd( int initval, int flags )
|
||||
@@ -313,6 +313,22 @@ int esync_create_fd( int initval, int flags )
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -188,19 +189,31 @@ index e18b76bff5b..2b9307267f9 100644
|
||||
{
|
||||
struct esync *esync;
|
||||
diff --git a/server/esync.h b/server/esync.h
|
||||
index 6a0a367124d..1e12560ddd6 100644
|
||||
index 8522d8a69ae..1241e6d9f1a 100644
|
||||
--- a/server/esync.h
|
||||
+++ b/server/esync.h
|
||||
@@ -21,3 +21,4 @@
|
||||
@@ -23,3 +23,4 @@
|
||||
extern int do_esync(void);
|
||||
void esync_init(void);
|
||||
int esync_create_fd( int initval, int flags );
|
||||
+void esync_wake_up( struct object *obj );
|
||||
diff --git a/server/named_pipe.c b/server/named_pipe.c
|
||||
index 68fa8953cca..1535c5188ec 100644
|
||||
--- a/server/named_pipe.c
|
||||
+++ b/server/named_pipe.c
|
||||
@@ -344,6 +344,7 @@ static const struct object_ops named_pipe_dir_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
default_fd_signaled, /* signaled */
|
||||
+ NULL, /* get_esync_fd */
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
named_pipe_dir_get_fd, /* get_fd */
|
||||
diff --git a/server/thread.c b/server/thread.c
|
||||
index 1e6f60182df..0413e889c7d 100644
|
||||
index 339cdfec1fa..4262b841fca 100644
|
||||
--- a/server/thread.c
|
||||
+++ b/server/thread.c
|
||||
@@ -51,6 +51,7 @@
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "request.h"
|
||||
#include "user.h"
|
||||
#include "security.h"
|
||||
@@ -208,7 +221,7 @@ index 1e6f60182df..0413e889c7d 100644
|
||||
|
||||
|
||||
/* thread queues */
|
||||
@@ -1053,6 +1054,9 @@ void wake_up( struct object *obj, int max )
|
||||
@@ -1073,6 +1074,9 @@ void wake_up( struct object *obj, int max )
|
||||
struct list *ptr;
|
||||
int ret;
|
||||
|
||||
@@ -219,5 +232,5 @@ index 1e6f60182df..0413e889c7d 100644
|
||||
{
|
||||
struct wait_queue_entry *entry = LIST_ENTRY( ptr, struct wait_queue_entry, entry );
|
||||
--
|
||||
2.30.2
|
||||
2.45.2
|
||||
|
||||
|
@@ -1,18 +1,18 @@
|
||||
From 24c407828bf5606e25e2905dfb920556ec1347b8 Mon Sep 17 00:00:00 2001
|
||||
From 2cf5a014dcd6f85a1afa76ad8ca6c65f2c17db39 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <pgofman@codeweavers.com>
|
||||
Date: Tue, 14 Jul 2020 15:00:34 +0300
|
||||
Subject: [PATCH] ntdll: Support x86_64 syscall emulation.
|
||||
|
||||
---
|
||||
configure.ac | 1 +
|
||||
dlls/ntdll/unix/signal_x86_64.c | 192 ++++++++++++++++++++++++++++++++
|
||||
2 files changed, 193 insertions(+)
|
||||
dlls/ntdll/unix/signal_x86_64.c | 195 ++++++++++++++++++++++++++++++++
|
||||
2 files changed, 196 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index bd655accac3..d581dbc1eae 100644
|
||||
index ef21a4313d4..db709285f79 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -420,6 +420,7 @@ AC_CHECK_HEADERS(\
|
||||
@@ -384,6 +384,7 @@ AC_CHECK_HEADERS(\
|
||||
linux/ioctl.h \
|
||||
linux/major.h \
|
||||
linux/param.h \
|
||||
@@ -21,7 +21,7 @@ index bd655accac3..d581dbc1eae 100644
|
||||
linux/types.h \
|
||||
linux/ucdrom.h \
|
||||
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
|
||||
index 0c291633ac6..a28762915be 100644
|
||||
index 537e4e1f60e..58397374ea4 100644
|
||||
--- a/dlls/ntdll/unix/signal_x86_64.c
|
||||
+++ b/dlls/ntdll/unix/signal_x86_64.c
|
||||
@@ -27,6 +27,7 @@
|
||||
@@ -56,7 +56,7 @@ index 0c291633ac6..a28762915be 100644
|
||||
#include "ntstatus.h"
|
||||
#define WIN32_NO_STATUS
|
||||
#include "windef.h"
|
||||
@@ -1783,6 +1794,186 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
|
||||
@@ -1824,6 +1835,186 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -243,14 +243,21 @@ index 0c291633ac6..a28762915be 100644
|
||||
|
||||
/***********************************************************************
|
||||
* handle_interrupt
|
||||
@@ -2460,6 +2651,7 @@ void signal_init_process(void)
|
||||
@@ -2560,10 +2751,14 @@ void signal_init_process(void)
|
||||
if (sigaction( SIGSEGV, &sig_act, NULL ) == -1) goto error;
|
||||
if (sigaction( SIGILL, &sig_act, NULL ) == -1) goto error;
|
||||
if (sigaction( SIGBUS, &sig_act, NULL ) == -1) goto error;
|
||||
+
|
||||
#ifdef __APPLE__
|
||||
sig_act.sa_sigaction = sigsys_handler;
|
||||
if (sigaction( SIGSYS, &sig_act, NULL ) == -1) goto error;
|
||||
#endif
|
||||
+
|
||||
+ install_bpf(&sig_act);
|
||||
+
|
||||
return;
|
||||
|
||||
error:
|
||||
--
|
||||
2.43.0
|
||||
2.45.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From f649ffcd8f68f82be173367b66f3c505ff75bcc3 Mon Sep 17 00:00:00 2001
|
||||
From 222ae102097fd34e6ff52813d1c0a165c7165776 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 12 Nov 2018 18:10:32 +0200
|
||||
Subject: [PATCH] server: Do not signal violently terminated threads until they
|
||||
@@ -27,10 +27,10 @@ Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
|
||||
2 files changed, 30 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/server/thread.c b/server/thread.c
|
||||
index 55386192fe6..60cd4ee16a8 100644
|
||||
index f7e5e5fabe8..506adfc0a6f 100644
|
||||
--- a/server/thread.c
|
||||
+++ b/server/thread.c
|
||||
@@ -241,6 +241,7 @@ static inline void init_thread_structure( struct thread *thread )
|
||||
@@ -246,6 +246,7 @@ static inline void init_thread_structure( struct thread *thread )
|
||||
thread->token = NULL;
|
||||
thread->desc = NULL;
|
||||
thread->desc_len = 0;
|
||||
@@ -38,7 +38,7 @@ index 55386192fe6..60cd4ee16a8 100644
|
||||
|
||||
thread->creation_time = current_time;
|
||||
thread->exit_time = 0;
|
||||
@@ -431,6 +432,7 @@ static void destroy_thread( struct object *obj )
|
||||
@@ -450,6 +451,7 @@ static void destroy_thread( struct object *obj )
|
||||
list_remove( &thread->entry );
|
||||
cleanup_thread( thread );
|
||||
release_object( thread->process );
|
||||
@@ -46,7 +46,7 @@ index 55386192fe6..60cd4ee16a8 100644
|
||||
if (thread->id) free_ptid( thread->id );
|
||||
if (thread->token) release_object( thread->token );
|
||||
}
|
||||
@@ -455,7 +457,7 @@ static struct object_type *thread_get_type( struct object *obj )
|
||||
@@ -467,7 +469,7 @@ static void dump_thread( struct object *obj, int verbose )
|
||||
static int thread_signaled( struct object *obj, struct wait_queue_entry *entry )
|
||||
{
|
||||
struct thread *mythread = (struct thread *)obj;
|
||||
@@ -55,7 +55,7 @@ index 55386192fe6..60cd4ee16a8 100644
|
||||
}
|
||||
|
||||
static unsigned int thread_map_access( struct object *obj, unsigned int access )
|
||||
@@ -1249,6 +1251,26 @@ int thread_get_inflight_fd( struct thread *thread, int client )
|
||||
@@ -1275,6 +1277,26 @@ int thread_get_inflight_fd( struct thread *thread, int client )
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ index 55386192fe6..60cd4ee16a8 100644
|
||||
/* kill a thread on the spot */
|
||||
void kill_thread( struct thread *thread, int violent_death )
|
||||
{
|
||||
@@ -1268,8 +1290,12 @@ void kill_thread( struct thread *thread, int violent_death )
|
||||
@@ -1294,8 +1316,12 @@ void kill_thread( struct thread *thread, int violent_death )
|
||||
}
|
||||
kill_console_processes( thread, 0 );
|
||||
abandon_mutexes( thread );
|
||||
@@ -98,17 +98,17 @@ index 55386192fe6..60cd4ee16a8 100644
|
||||
remove_process_thread( thread->process, thread );
|
||||
release_object( thread );
|
||||
diff --git a/server/thread.h b/server/thread.h
|
||||
index 184fa92d250..077ab0929ba 100644
|
||||
index a1bc5060bb9..edf2a825451 100644
|
||||
--- a/server/thread.h
|
||||
+++ b/server/thread.h
|
||||
@@ -90,6 +90,7 @@ struct thread
|
||||
struct list kernel_object; /* list of kernel object pointers */
|
||||
@@ -93,6 +93,7 @@ struct thread
|
||||
data_size_t desc_len; /* thread description length in bytes */
|
||||
WCHAR *desc; /* thread description string */
|
||||
struct completion_wait *completion_wait; /* completion port wait object the thread is associated with */
|
||||
+ struct timeout_user *exit_poll; /* poll if the thread/process has exited already */
|
||||
};
|
||||
|
||||
extern struct thread *current;
|
||||
--
|
||||
2.29.2
|
||||
2.45.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 8e45c14f92426d1a9610ef21f0f3223b7276b13f Mon Sep 17 00:00:00 2001
|
||||
From cd57704c5a232a8ed0beb3b951fb0b4a06d28b43 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Fri, 8 Mar 2024 11:15:57 +0100
|
||||
Subject: [PATCH] winex11: Add support for absolute position in RawMotion
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] winex11: Add support for absolute position in RawMotion
|
||||
1 file changed, 35 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
|
||||
index b596ec546b4..59fbd2bbe52 100644
|
||||
index 43df1408f39..6b0fb873fad 100644
|
||||
--- a/dlls/winex11.drv/mouse.c
|
||||
+++ b/dlls/winex11.drv/mouse.c
|
||||
@@ -30,6 +30,7 @@
|
||||
@@ -52,7 +52,7 @@ index b596ec546b4..59fbd2bbe52 100644
|
||||
|
||||
thread_data->x_valuator.value = 0;
|
||||
thread_data->y_valuator.value = 0;
|
||||
@@ -1669,6 +1680,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
|
||||
@@ -1667,6 +1678,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
|
||||
{
|
||||
struct x11drv_thread_data *thread_data = x11drv_thread_data();
|
||||
XIValuatorClassInfo *x = &thread_data->x_valuator, *y = &thread_data->y_valuator;
|
||||
@@ -60,11 +60,11 @@ index b596ec546b4..59fbd2bbe52 100644
|
||||
double x_value = 0, y_value = 0, x_scale, y_scale;
|
||||
const double *values = event->valuators.values;
|
||||
RECT virtual_rect;
|
||||
@@ -1679,7 +1691,15 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
|
||||
@@ -1677,7 +1689,15 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
|
||||
if (!xinput2_available) return FALSE;
|
||||
if (event->deviceid != thread_data->xinput2_pointer) return FALSE;
|
||||
|
||||
- virtual_rect = NtUserGetVirtualScreenRect( MDT_DEFAULT );
|
||||
- virtual_rect = NtUserGetVirtualScreenRect( MDT_RAW_DPI );
|
||||
+ if (x->mode == XIModeRelative && y->mode == XIModeRelative)
|
||||
+ input->mi.dwFlags &= ~absolute_flags;
|
||||
+ else if (x->mode == XIModeAbsolute && y->mode == XIModeAbsolute)
|
||||
@@ -73,11 +73,11 @@ index b596ec546b4..59fbd2bbe52 100644
|
||||
+ FIXME( "Unsupported relative/absolute X/Y axis mismatch\n." );
|
||||
+
|
||||
+ if (input->mi.dwFlags & MOUSEEVENTF_VIRTUALDESK) SetRect( &virtual_rect, 0, 0, UINT16_MAX, UINT16_MAX );
|
||||
+ else virtual_rect = NtUserGetVirtualScreenRect( MDT_DEFAULT );
|
||||
+ else virtual_rect = NtUserGetVirtualScreenRect( MDT_RAW_DPI );
|
||||
|
||||
if (x->max <= x->min) x_scale = 1;
|
||||
else x_scale = (virtual_rect.right - virtual_rect.left) / (x->max - x->min);
|
||||
@@ -1692,17 +1712,26 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
|
||||
@@ -1690,17 +1710,26 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
|
||||
if (i == x->number)
|
||||
{
|
||||
x_value = *values;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From a0452d319eecec33d0e130e19e9d1993b52caa2f Mon Sep 17 00:00:00 2001
|
||||
From 03ca1a439ace6f14b8551a5e9a83dec83872577f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Thu, 19 Dec 2019 22:34:44 +0100
|
||||
Subject: [PATCH] winex11: Keep track of mouse device and pointer button
|
||||
@@ -17,10 +17,10 @@ Original patch by Andrew Eikum <aeikum@codeweavers.com>.
|
||||
5 files changed, 114 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d95ff178367..5d38e874089 100644
|
||||
index d7d8411c1a3..720e016d0af 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1194,6 +1194,7 @@ then
|
||||
@@ -1203,6 +1203,7 @@ then
|
||||
|
||||
dnl *** All of the following tests require X11/Xlib.h
|
||||
AC_CHECK_HEADERS([X11/extensions/shape.h \
|
||||
@@ -29,10 +29,10 @@ index d95ff178367..5d38e874089 100644
|
||||
X11/extensions/XShm.h \
|
||||
X11/extensions/Xfixes.h \
|
||||
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
|
||||
index 23f07b851a7..130b7e516a2 100644
|
||||
index bb5bf6220e1..af0bdb54205 100644
|
||||
--- a/dlls/winex11.drv/keyboard.c
|
||||
+++ b/dlls/winex11.drv/keyboard.c
|
||||
@@ -1838,11 +1838,7 @@ BOOL X11DRV_ActivateKeyboardLayout(HKL hkl, UINT flags)
|
||||
@@ -1820,11 +1820,7 @@ BOOL X11DRV_ActivateKeyboardLayout(HKL hkl, UINT flags)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ index 23f07b851a7..130b7e516a2 100644
|
||||
{
|
||||
HWND hwnd;
|
||||
|
||||
@@ -1856,6 +1852,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event )
|
||||
@@ -1838,6 +1834,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event )
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ index 23f07b851a7..130b7e516a2 100644
|
||||
/***********************************************************************
|
||||
* VkKeyScanEx (X11DRV.@)
|
||||
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
|
||||
index d3c97468fdb..5a5ec51e370 100644
|
||||
index e513e302351..23ceb5eb00a 100644
|
||||
--- a/dlls/winex11.drv/mouse.c
|
||||
+++ b/dlls/winex11.drv/mouse.c
|
||||
@@ -31,6 +31,9 @@
|
||||
@@ -175,7 +175,7 @@ index d3c97468fdb..5a5ec51e370 100644
|
||||
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
|
||||
/***********************************************************************
|
||||
* update_relative_valuators
|
||||
@@ -1674,6 +1754,8 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev )
|
||||
@@ -1671,6 +1751,8 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev )
|
||||
|
||||
if (event->deviceid != data->xinput2_pointer) return FALSE;
|
||||
update_relative_valuators( event->classes, event->num_classes );
|
||||
@@ -184,7 +184,7 @@ index d3c97468fdb..5a5ec51e370 100644
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1822,7 +1904,7 @@ static BOOL X11DRV_TouchEvent( HWND hwnd, XGenericEventCookie *xev )
|
||||
@@ -1819,7 +1901,7 @@ static BOOL X11DRV_TouchEvent( HWND hwnd, XGenericEventCookie *xev )
|
||||
*/
|
||||
void x11drv_xinput2_load(void)
|
||||
{
|
||||
@@ -193,7 +193,7 @@ index d3c97468fdb..5a5ec51e370 100644
|
||||
int event, error;
|
||||
void *libxi_handle = dlopen( SONAME_LIBXI, RTLD_NOW );
|
||||
|
||||
@@ -1838,11 +1920,20 @@ void x11drv_xinput2_load(void)
|
||||
@@ -1835,11 +1917,20 @@ void x11drv_xinput2_load(void)
|
||||
return; \
|
||||
}
|
||||
|
||||
@@ -215,22 +215,22 @@ index d3c97468fdb..5a5ec51e370 100644
|
||||
|
||||
xinput2_available = XQueryExtension( gdi_display, "XInputExtension", &xinput2_opcode, &event, &error );
|
||||
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
|
||||
index 70ef0a112ac..a56eb8b0046 100644
|
||||
index 1e669f9fe61..a6cfd5a483e 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -682,6 +682,7 @@ extern void retry_grab_clipping_window(void);
|
||||
@@ -687,6 +687,7 @@ extern void reapply_cursor_clipping(void);
|
||||
extern void ungrab_clipping_window(void);
|
||||
extern void move_resize_window( HWND hwnd, int dir );
|
||||
extern void X11DRV_InitKeyboard( Display *display );
|
||||
+extern void X11DRV_InitMouse( Display *display );
|
||||
extern BOOL process_events( Display *display, Bool (*filter)(Display*, XEvent*, XPointer), ULONG_PTR arg );
|
||||
extern BOOL X11DRV_ProcessEvents( DWORD mask );
|
||||
extern HWND *build_hwnd_list(void);
|
||||
|
||||
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
|
||||
index c9e0d43c9ce..930f3a1c088 100644
|
||||
index abc14032c61..d95c4761529 100644
|
||||
--- a/dlls/winex11.drv/x11drv_main.c
|
||||
+++ b/dlls/winex11.drv/x11drv_main.c
|
||||
@@ -680,6 +680,7 @@ static NTSTATUS x11drv_init( void *arg )
|
||||
@@ -672,6 +672,7 @@ static NTSTATUS x11drv_init( void *arg )
|
||||
|
||||
XkbUseExtension( gdi_display, NULL, NULL );
|
||||
X11DRV_InitKeyboard( gdi_display );
|
||||
@@ -239,5 +239,5 @@ index c9e0d43c9ce..930f3a1c088 100644
|
||||
|
||||
init_user_driver();
|
||||
--
|
||||
2.43.0
|
||||
2.45.2
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,478 @@
|
||||
From 9f1222c0cc241c9a3256403a637d16ffd26587fc Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 24 Oct 2024 07:08:51 +1100
|
||||
Subject: [PATCH] Updated vkd3d to 91701f83035c0d67d1ab917e0f6b73f91e8583d4.
|
||||
|
||||
---
|
||||
libs/vkd3d/libs/vkd3d-shader/d3dbc.c | 12 --
|
||||
libs/vkd3d/libs/vkd3d-shader/dxil.c | 15 ---
|
||||
libs/vkd3d/libs/vkd3d-shader/tpf.c | 12 --
|
||||
.../libs/vkd3d-shader/vkd3d_shader_main.c | 105 +++++++++---------
|
||||
.../libs/vkd3d-shader/vkd3d_shader_private.h | 6 -
|
||||
libs/vkd3d/libs/vkd3d/device.c | 65 ++++++-----
|
||||
libs/vkd3d/libs/vkd3d/resource.c | 14 ++-
|
||||
libs/vkd3d/libs/vkd3d/state.c | 21 ++--
|
||||
libs/vkd3d/libs/vkd3d/vkd3d_private.h | 23 ++--
|
||||
9 files changed, 123 insertions(+), 150 deletions(-)
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/d3dbc.c b/libs/vkd3d/libs/vkd3d-shader/d3dbc.c
|
||||
index bbebf86e6d5..9e2eacbcfa6 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/d3dbc.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/d3dbc.c
|
||||
@@ -1391,18 +1391,6 @@ int d3dbc_parse(const struct vkd3d_shader_compile_info *compile_info, uint64_t c
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
- WARN("Failed to parse shader.\n");
|
||||
- vsir_program_cleanup(program);
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- if ((ret = vkd3d_shader_parser_validate(&sm1.p, config_flags)) < 0)
|
||||
- {
|
||||
- WARN("Failed to validate shader after parsing, ret %d.\n", ret);
|
||||
-
|
||||
- if (TRACE_ON())
|
||||
- vsir_program_trace(program);
|
||||
-
|
||||
vsir_program_cleanup(program);
|
||||
return ret;
|
||||
}
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/dxil.c b/libs/vkd3d/libs/vkd3d-shader/dxil.c
|
||||
index 570af5eca5a..3235a278769 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/dxil.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/dxil.c
|
||||
@@ -10603,22 +10603,7 @@ int dxil_parse(const struct vkd3d_shader_compile_info *compile_info, uint64_t co
|
||||
vkd3d_free(byte_code);
|
||||
|
||||
if (ret < 0)
|
||||
- {
|
||||
- WARN("Failed to parse shader.\n");
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- if ((ret = vkd3d_shader_parser_validate(&sm6.p, config_flags)) < 0)
|
||||
- {
|
||||
- WARN("Failed to validate shader after parsing, ret %d.\n", ret);
|
||||
-
|
||||
- if (TRACE_ON())
|
||||
- vsir_program_trace(program);
|
||||
-
|
||||
- sm6_parser_cleanup(&sm6);
|
||||
- vsir_program_cleanup(program);
|
||||
return ret;
|
||||
- }
|
||||
|
||||
sm6_parser_cleanup(&sm6);
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/tpf.c b/libs/vkd3d/libs/vkd3d-shader/tpf.c
|
||||
index f96d300676c..c937b245559 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/tpf.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/tpf.c
|
||||
@@ -2964,22 +2964,10 @@ int tpf_parse(const struct vkd3d_shader_compile_info *compile_info, uint64_t con
|
||||
|
||||
if (sm4.p.failed)
|
||||
{
|
||||
- WARN("Failed to parse shader.\n");
|
||||
vsir_program_cleanup(program);
|
||||
return VKD3D_ERROR_INVALID_SHADER;
|
||||
}
|
||||
|
||||
- if ((ret = vkd3d_shader_parser_validate(&sm4.p, config_flags)) < 0)
|
||||
- {
|
||||
- WARN("Failed to validate shader after parsing, ret %d.\n", ret);
|
||||
-
|
||||
- if (TRACE_ON())
|
||||
- vsir_program_trace(program);
|
||||
-
|
||||
- vsir_program_cleanup(program);
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
return VKD3D_OK;
|
||||
}
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c
|
||||
index ca012d4948a..3355e18b88e 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c
|
||||
@@ -489,13 +489,13 @@ static void vkd3d_shader_dump_shader(const struct shader_dump_data *dump_data,
|
||||
if ((f = fopen(filename, "wb")))
|
||||
{
|
||||
if (fwrite(data, 1, size, f) != size)
|
||||
- ERR("Failed to write shader to %s.\n", filename);
|
||||
+ WARN("Failed to write shader to %s.\n", filename);
|
||||
if (fclose(f))
|
||||
- ERR("Failed to close stream %s.\n", filename);
|
||||
+ WARN("Failed to close stream %s.\n", filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
- ERR("Failed to open %s for dumping shader.\n", filename);
|
||||
+ WARN("Failed to open %s for dumping shader.\n", filename);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -680,6 +680,50 @@ static int vkd3d_shader_validate_compile_info(const struct vkd3d_shader_compile_
|
||||
return VKD3D_OK;
|
||||
}
|
||||
|
||||
+static enum vkd3d_result vsir_parse(const struct vkd3d_shader_compile_info *compile_info, uint64_t config_flags,
|
||||
+ struct vkd3d_shader_message_context *message_context, struct vsir_program *program)
|
||||
+{
|
||||
+ enum vkd3d_result ret;
|
||||
+
|
||||
+ switch (compile_info->source_type)
|
||||
+ {
|
||||
+ case VKD3D_SHADER_SOURCE_D3D_BYTECODE:
|
||||
+ ret = d3dbc_parse(compile_info, config_flags, message_context, program);
|
||||
+ break;
|
||||
+
|
||||
+ case VKD3D_SHADER_SOURCE_DXBC_TPF:
|
||||
+ ret = tpf_parse(compile_info, config_flags, message_context, program);
|
||||
+ break;
|
||||
+
|
||||
+ case VKD3D_SHADER_SOURCE_DXBC_DXIL:
|
||||
+ ret = dxil_parse(compile_info, config_flags, message_context, program);
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ ERR("Unsupported source type %#x.\n", compile_info->source_type);
|
||||
+ ret = VKD3D_ERROR_INVALID_ARGUMENT;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (ret < 0)
|
||||
+ {
|
||||
+ WARN("Failed to parse shader.\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ if ((ret = vsir_program_validate(program, config_flags, compile_info->source_name, message_context)) < 0)
|
||||
+ {
|
||||
+ WARN("Failed to validate shader after parsing, ret %d.\n", ret);
|
||||
+
|
||||
+ if (TRACE_ON())
|
||||
+ vsir_program_trace(program);
|
||||
+
|
||||
+ vsir_program_cleanup(program);
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
void vkd3d_shader_free_messages(char *messages)
|
||||
{
|
||||
TRACE("messages %p.\n", messages);
|
||||
@@ -1578,31 +1622,7 @@ int vkd3d_shader_scan(const struct vkd3d_shader_compile_info *compile_info, char
|
||||
uint64_t config_flags = vkd3d_shader_init_config_flags();
|
||||
struct vsir_program program;
|
||||
|
||||
- switch (compile_info->source_type)
|
||||
- {
|
||||
- case VKD3D_SHADER_SOURCE_D3D_BYTECODE:
|
||||
- ret = d3dbc_parse(compile_info, config_flags, &message_context, &program);
|
||||
- break;
|
||||
-
|
||||
- case VKD3D_SHADER_SOURCE_DXBC_TPF:
|
||||
- ret = tpf_parse(compile_info, config_flags, &message_context, &program);
|
||||
- break;
|
||||
-
|
||||
- case VKD3D_SHADER_SOURCE_DXBC_DXIL:
|
||||
- ret = dxil_parse(compile_info, config_flags, &message_context, &program);
|
||||
- break;
|
||||
-
|
||||
- default:
|
||||
- ERR("Unsupported source type %#x.\n", compile_info->source_type);
|
||||
- ret = VKD3D_ERROR_INVALID_ARGUMENT;
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- if (ret < 0)
|
||||
- {
|
||||
- WARN("Failed to parse shader.\n");
|
||||
- }
|
||||
- else
|
||||
+ if (!(ret = vsir_parse(compile_info, config_flags, &message_context, &program)))
|
||||
{
|
||||
ret = vsir_program_scan(&program, compile_info, &message_context, NULL);
|
||||
vsir_program_cleanup(&program);
|
||||
@@ -1719,38 +1739,15 @@ int vkd3d_shader_compile(const struct vkd3d_shader_compile_info *compile_info,
|
||||
uint64_t config_flags = vkd3d_shader_init_config_flags();
|
||||
struct vsir_program program;
|
||||
|
||||
- switch (compile_info->source_type)
|
||||
- {
|
||||
- case VKD3D_SHADER_SOURCE_D3D_BYTECODE:
|
||||
- ret = d3dbc_parse(compile_info, config_flags, &message_context, &program);
|
||||
- break;
|
||||
-
|
||||
- case VKD3D_SHADER_SOURCE_DXBC_TPF:
|
||||
- ret = tpf_parse(compile_info, config_flags, &message_context, &program);
|
||||
- break;
|
||||
-
|
||||
- case VKD3D_SHADER_SOURCE_DXBC_DXIL:
|
||||
- ret = dxil_parse(compile_info, config_flags, &message_context, &program);
|
||||
- break;
|
||||
-
|
||||
- default:
|
||||
- ERR("Unsupported source type %#x.\n", compile_info->source_type);
|
||||
- ret = VKD3D_ERROR_INVALID_ARGUMENT;
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- if (ret < 0)
|
||||
- {
|
||||
- WARN("Failed to parse shader.\n");
|
||||
- }
|
||||
- else
|
||||
+ if (!(ret = vsir_parse(compile_info, config_flags, &message_context, &program)))
|
||||
{
|
||||
ret = vsir_program_compile(&program, config_flags, compile_info, out, &message_context);
|
||||
vsir_program_cleanup(&program);
|
||||
}
|
||||
}
|
||||
|
||||
- vkd3d_shader_dump_shader(&dump_data, out->code, out->size, false);
|
||||
+ if (ret >= 0)
|
||||
+ vkd3d_shader_dump_shader(&dump_data, out->code, out->size, false);
|
||||
|
||||
vkd3d_shader_message_context_trace_messages(&message_context);
|
||||
if (!vkd3d_shader_message_context_copy_messages(&message_context, messages))
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
|
||||
index d6c68155ee7..5ae938e0525 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
|
||||
@@ -1477,12 +1477,6 @@ void vkd3d_shader_parser_init(struct vkd3d_shader_parser *parser, struct vsir_pr
|
||||
void vkd3d_shader_parser_warning(struct vkd3d_shader_parser *parser,
|
||||
enum vkd3d_shader_error error, const char *format, ...) VKD3D_PRINTF_FUNC(3, 4);
|
||||
|
||||
-static inline enum vkd3d_result vkd3d_shader_parser_validate(struct vkd3d_shader_parser *parser, uint64_t config_flags)
|
||||
-{
|
||||
- return vsir_program_validate(parser->program, config_flags,
|
||||
- parser->location.source_name, parser->message_context);
|
||||
-}
|
||||
-
|
||||
struct vkd3d_shader_descriptor_info1
|
||||
{
|
||||
enum vkd3d_shader_descriptor_type type;
|
||||
diff --git a/libs/vkd3d/libs/vkd3d/device.c b/libs/vkd3d/libs/vkd3d/device.c
|
||||
index fd0ca20838f..54a39e18a0f 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d/device.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d/device.c
|
||||
@@ -136,7 +136,8 @@ static HRESULT vkd3d_create_vk_descriptor_heap_layout(struct d3d12_device *devic
|
||||
VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
|
||||
};
|
||||
|
||||
- if (device->vk_info.EXT_mutable_descriptor_type && index && index != VKD3D_SET_INDEX_UAV_COUNTER
|
||||
+ if (device->vk_info.EXT_mutable_descriptor_type
|
||||
+ && index != VKD3D_SET_INDEX_MUTABLE && index != VKD3D_SET_INDEX_UAV_COUNTER
|
||||
&& device->vk_descriptor_heap_layouts[index].applicable_heap_type == D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV)
|
||||
{
|
||||
device->vk_descriptor_heap_layouts[index].vk_set_layout = VK_NULL_HANDLE;
|
||||
@@ -144,7 +145,7 @@ static HRESULT vkd3d_create_vk_descriptor_heap_layout(struct d3d12_device *devic
|
||||
}
|
||||
|
||||
binding.binding = 0;
|
||||
- binding.descriptorType = (device->vk_info.EXT_mutable_descriptor_type && !index)
|
||||
+ binding.descriptorType = (device->vk_info.EXT_mutable_descriptor_type && index == VKD3D_SET_INDEX_MUTABLE)
|
||||
? VK_DESCRIPTOR_TYPE_MUTABLE_EXT : device->vk_descriptor_heap_layouts[index].type;
|
||||
binding.descriptorCount = device->vk_descriptor_heap_layouts[index].count;
|
||||
binding.stageFlags = VK_SHADER_STAGE_ALL;
|
||||
@@ -200,14 +201,20 @@ static HRESULT vkd3d_vk_descriptor_heap_layouts_init(struct d3d12_device *device
|
||||
{
|
||||
static const struct vkd3d_vk_descriptor_heap_layout vk_descriptor_heap_layouts[VKD3D_SET_INDEX_COUNT] =
|
||||
{
|
||||
- {VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, true, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
|
||||
- {VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, true, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
|
||||
- {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, false, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
|
||||
- {VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, true, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
|
||||
- {VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, false, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
|
||||
- {VK_DESCRIPTOR_TYPE_SAMPLER, false, D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER},
|
||||
- /* UAV counters */
|
||||
- {VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, true, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
|
||||
+ [VKD3D_SET_INDEX_UNIFORM_BUFFER] =
|
||||
+ {VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, true, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
|
||||
+ [VKD3D_SET_INDEX_UNIFORM_TEXEL_BUFFER] =
|
||||
+ {VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, true, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
|
||||
+ [VKD3D_SET_INDEX_SAMPLED_IMAGE] =
|
||||
+ {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, false, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
|
||||
+ [VKD3D_SET_INDEX_STORAGE_TEXEL_BUFFER] =
|
||||
+ {VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, true, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
|
||||
+ [VKD3D_SET_INDEX_STORAGE_IMAGE] =
|
||||
+ {VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, false, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
|
||||
+ [VKD3D_SET_INDEX_SAMPLER] =
|
||||
+ {VK_DESCRIPTOR_TYPE_SAMPLER, false, D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER},
|
||||
+ [VKD3D_SET_INDEX_UAV_COUNTER] =
|
||||
+ {VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, true, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
|
||||
};
|
||||
const struct vkd3d_device_descriptor_limits *limits = &device->vk_info.descriptor_limits;
|
||||
enum vkd3d_vk_descriptor_set_index set;
|
||||
@@ -1918,24 +1925,26 @@ static HRESULT vkd3d_init_device_caps(struct d3d12_device *device,
|
||||
&& descriptor_indexing->descriptorBindingUniformTexelBufferUpdateAfterBind
|
||||
&& descriptor_indexing->descriptorBindingStorageTexelBufferUpdateAfterBind;
|
||||
|
||||
- /* Many Vulkan implementations allow up to 8 descriptor sets. Unfortunately
|
||||
- * using vkd3d with Vulkan heaps and push descriptors currently requires up
|
||||
- * to 9 descriptor sets (up to one for the push descriptors, up to one for
|
||||
- * the static samplers and seven for Vulkan heaps, one for each needed
|
||||
- * descriptor type). If we detect such situation, we disable push
|
||||
- * descriptors, which allows us to stay within the limits (not doing so is
|
||||
- * fatal on many implmentations).
|
||||
- *
|
||||
- * It is possible that a different strategy might be used. For example, we
|
||||
- * could move the static samplers to one of the seven Vulkan heaps sets. Or
|
||||
- * we could decide whether to create the push descriptor set when creating
|
||||
- * the root signature, depending on whether there are static samplers or
|
||||
- * not. */
|
||||
- if (device->vk_info.device_limits.maxBoundDescriptorSets == 8 && device->use_vk_heaps
|
||||
- && device->vk_info.KHR_push_descriptor)
|
||||
- {
|
||||
- TRACE("Disabling VK_KHR_push_descriptor to save a descriptor set.\n");
|
||||
- device->vk_info.KHR_push_descriptor = VK_FALSE;
|
||||
+ if (device->use_vk_heaps && device->vk_info.KHR_push_descriptor)
|
||||
+ {
|
||||
+ /* VKD3D_SET_INDEX_COUNT for the Vulkan heaps, one for the push
|
||||
+ * descriptors set and one for the static samplers set. */
|
||||
+ unsigned int descriptor_set_count = VKD3D_SET_INDEX_COUNT + 2;
|
||||
+
|
||||
+ /* A mutable descriptor set can replace all those that should otherwise
|
||||
+ * back the SRV-UAV-CBV descriptor heap. */
|
||||
+ if (device->vk_info.EXT_mutable_descriptor_type)
|
||||
+ descriptor_set_count -= VKD3D_SET_INDEX_COUNT - (VKD3D_SET_INDEX_MUTABLE + 1);
|
||||
+
|
||||
+ /* For many Vulkan implementations maxBoundDescriptorSets == 8; also,
|
||||
+ * if mutable descriptors are not available the descriptor set count
|
||||
+ * will be 9; so saving a descriptor set is going to be often
|
||||
+ * significant. */
|
||||
+ if (descriptor_set_count > device->vk_info.device_limits.maxBoundDescriptorSets)
|
||||
+ {
|
||||
+ WARN("Disabling VK_KHR_push_descriptor to save a descriptor set.\n");
|
||||
+ device->vk_info.KHR_push_descriptor = VK_FALSE;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (device->use_vk_heaps)
|
||||
diff --git a/libs/vkd3d/libs/vkd3d/resource.c b/libs/vkd3d/libs/vkd3d/resource.c
|
||||
index 6d6820d3752..1f7d90eb95f 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d/resource.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d/resource.c
|
||||
@@ -2498,7 +2498,7 @@ static void d3d12_desc_write_vk_heap_null_descriptor(struct d3d12_descriptor_hea
|
||||
enum vkd3d_vk_descriptor_set_index set, end;
|
||||
unsigned int i = writes->count;
|
||||
|
||||
- end = device->vk_info.EXT_mutable_descriptor_type ? VKD3D_SET_INDEX_UNIFORM_BUFFER
|
||||
+ end = device->vk_info.EXT_mutable_descriptor_type ? VKD3D_SET_INDEX_MUTABLE
|
||||
: VKD3D_SET_INDEX_STORAGE_IMAGE;
|
||||
/* Binding a shader with the wrong null descriptor type works in Windows.
|
||||
* To support that here we must write one to all applicable Vulkan sets. */
|
||||
@@ -4250,7 +4250,8 @@ static HRESULT d3d12_descriptor_heap_create_descriptor_pool(struct d3d12_descrip
|
||||
if (device->vk_descriptor_heap_layouts[set].applicable_heap_type == desc->Type
|
||||
&& device->vk_descriptor_heap_layouts[set].vk_set_layout)
|
||||
{
|
||||
- pool_sizes[pool_desc.poolSizeCount].type = (device->vk_info.EXT_mutable_descriptor_type && !set)
|
||||
+ pool_sizes[pool_desc.poolSizeCount].type =
|
||||
+ (device->vk_info.EXT_mutable_descriptor_type && set == VKD3D_SET_INDEX_MUTABLE)
|
||||
? VK_DESCRIPTOR_TYPE_MUTABLE_EXT : device->vk_descriptor_heap_layouts[set].type;
|
||||
pool_sizes[pool_desc.poolSizeCount++].descriptorCount = desc->NumDescriptors;
|
||||
}
|
||||
@@ -4280,11 +4281,12 @@ static HRESULT d3d12_descriptor_heap_create_descriptor_set(struct d3d12_descript
|
||||
|
||||
if (!device->vk_descriptor_heap_layouts[set].vk_set_layout)
|
||||
{
|
||||
- /* Set 0 uses mutable descriptors, and this set is unused. */
|
||||
- if (!descriptor_heap->vk_descriptor_sets[0].vk_set
|
||||
- && FAILED(hr = d3d12_descriptor_heap_create_descriptor_set(descriptor_heap, device, 0)))
|
||||
+ /* Mutable descriptors are in use, and this set is unused. */
|
||||
+ if (!descriptor_heap->vk_descriptor_sets[VKD3D_SET_INDEX_MUTABLE].vk_set
|
||||
+ && FAILED(hr = d3d12_descriptor_heap_create_descriptor_set(descriptor_heap,
|
||||
+ device, VKD3D_SET_INDEX_MUTABLE)))
|
||||
return hr;
|
||||
- descriptor_set->vk_set = descriptor_heap->vk_descriptor_sets[0].vk_set;
|
||||
+ descriptor_set->vk_set = descriptor_heap->vk_descriptor_sets[VKD3D_SET_INDEX_MUTABLE].vk_set;
|
||||
descriptor_set->vk_type = device->vk_descriptor_heap_layouts[set].type;
|
||||
return S_OK;
|
||||
}
|
||||
diff --git a/libs/vkd3d/libs/vkd3d/state.c b/libs/vkd3d/libs/vkd3d/state.c
|
||||
index 8e5ec70a577..e7476a01bd7 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d/state.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d/state.c
|
||||
@@ -1016,7 +1016,7 @@ static void vkd3d_descriptor_heap_binding_from_descriptor_range(const struct d3d
|
||||
}
|
||||
else
|
||||
{
|
||||
- binding->set = 0;
|
||||
+ binding->set = VKD3D_SET_INDEX_MUTABLE;
|
||||
descriptor_set_size = descriptor_limits->sampled_image_max_descriptors;
|
||||
}
|
||||
}
|
||||
@@ -1483,21 +1483,24 @@ static unsigned int d3d12_root_signature_copy_descriptor_set_layouts(const struc
|
||||
{
|
||||
const struct d3d12_device *device = root_signature->device;
|
||||
enum vkd3d_vk_descriptor_set_index set;
|
||||
+ VkDescriptorSetLayout vk_set_layout;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < root_signature->vk_set_count; ++i)
|
||||
vk_set_layouts[i] = root_signature->descriptor_set_layouts[i].vk_layout;
|
||||
|
||||
- if (device->use_vk_heaps)
|
||||
+ if (!device->use_vk_heaps)
|
||||
+ return i;
|
||||
+
|
||||
+ for (set = 0; set < ARRAY_SIZE(device->vk_descriptor_heap_layouts); ++set)
|
||||
{
|
||||
- VkDescriptorSetLayout mutable_layout = device->vk_descriptor_heap_layouts[0].vk_set_layout;
|
||||
+ vk_set_layout = device->vk_descriptor_heap_layouts[set].vk_set_layout;
|
||||
|
||||
- for (set = 0; set < ARRAY_SIZE(device->vk_descriptor_heap_layouts); ++set)
|
||||
- {
|
||||
- VkDescriptorSetLayout vk_set_layout = device->vk_descriptor_heap_layouts[set].vk_set_layout;
|
||||
- /* All layouts must be valid, so if null, just set it to the mutable one. */
|
||||
- vk_set_layouts[i++] = vk_set_layout ? vk_set_layout : mutable_layout;
|
||||
- }
|
||||
+ VKD3D_ASSERT(vk_set_layout);
|
||||
+ vk_set_layouts[i++] = vk_set_layout;
|
||||
+
|
||||
+ if (device->vk_info.EXT_mutable_descriptor_type && set == VKD3D_SET_INDEX_MUTABLE)
|
||||
+ break;
|
||||
}
|
||||
|
||||
return i;
|
||||
diff --git a/libs/vkd3d/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/libs/vkd3d/vkd3d_private.h
|
||||
index e6d477a5c12..97a99782d6a 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d/vkd3d_private.h
|
||||
+++ b/libs/vkd3d/libs/vkd3d/vkd3d_private.h
|
||||
@@ -772,14 +772,21 @@ void d3d12_dsv_desc_create_dsv(struct d3d12_dsv_desc *dsv_desc, struct d3d12_dev
|
||||
|
||||
enum vkd3d_vk_descriptor_set_index
|
||||
{
|
||||
- VKD3D_SET_INDEX_UNIFORM_BUFFER = 0,
|
||||
- VKD3D_SET_INDEX_UNIFORM_TEXEL_BUFFER = 1,
|
||||
- VKD3D_SET_INDEX_SAMPLED_IMAGE = 2,
|
||||
- VKD3D_SET_INDEX_STORAGE_TEXEL_BUFFER = 3,
|
||||
- VKD3D_SET_INDEX_STORAGE_IMAGE = 4,
|
||||
- VKD3D_SET_INDEX_SAMPLER = 5,
|
||||
- VKD3D_SET_INDEX_UAV_COUNTER = 6,
|
||||
- VKD3D_SET_INDEX_COUNT = 7
|
||||
+ VKD3D_SET_INDEX_SAMPLER,
|
||||
+ VKD3D_SET_INDEX_UAV_COUNTER,
|
||||
+ VKD3D_SET_INDEX_MUTABLE,
|
||||
+
|
||||
+ /* These are used when mutable descriptors are not available to back
|
||||
+ * SRV-UAV-CBV descriptor heaps. They must stay at the end of this
|
||||
+ * enumeration, so that they can be ignored when mutable descriptors are
|
||||
+ * used. */
|
||||
+ VKD3D_SET_INDEX_UNIFORM_BUFFER = VKD3D_SET_INDEX_MUTABLE,
|
||||
+ VKD3D_SET_INDEX_UNIFORM_TEXEL_BUFFER,
|
||||
+ VKD3D_SET_INDEX_SAMPLED_IMAGE,
|
||||
+ VKD3D_SET_INDEX_STORAGE_TEXEL_BUFFER,
|
||||
+ VKD3D_SET_INDEX_STORAGE_IMAGE,
|
||||
+
|
||||
+ VKD3D_SET_INDEX_COUNT
|
||||
};
|
||||
|
||||
extern const enum vkd3d_vk_descriptor_set_index vk_descriptor_set_index_table[];
|
||||
--
|
||||
2.45.2
|
||||
|
@@ -1,386 +0,0 @@
|
||||
From 4b1bc5d293eca9de7f1f00f3afac32e329364515 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 10 Oct 2024 07:16:15 +1100
|
||||
Subject: [PATCH] Updated vkd3d to 9cb4207c92ec3ee05fce15580c89f2e5146354db.
|
||||
|
||||
---
|
||||
libs/vkd3d/libs/vkd3d-shader/dxil.c | 15 +++
|
||||
libs/vkd3d/libs/vkd3d-shader/glsl.c | 101 ++++++++++++++++--
|
||||
libs/vkd3d/libs/vkd3d-shader/ir.c | 40 +++++++
|
||||
libs/vkd3d/libs/vkd3d-shader/spirv.c | 24 ++---
|
||||
libs/vkd3d/libs/vkd3d-shader/tpf.c | 15 +++
|
||||
.../libs/vkd3d-shader/vkd3d_shader_main.c | 2 +
|
||||
.../libs/vkd3d-shader/vkd3d_shader_private.h | 1 +
|
||||
7 files changed, 173 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/dxil.c b/libs/vkd3d/libs/vkd3d-shader/dxil.c
|
||||
index c66b059325a..5db9d6da063 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/dxil.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/dxil.c
|
||||
@@ -10315,6 +10315,21 @@ static enum vkd3d_result sm6_parser_init(struct sm6_parser *sm6, struct vsir_pro
|
||||
sm6->ptr = &sm6->start[1];
|
||||
sm6->bitpos = 2;
|
||||
|
||||
+ switch (program->shader_version.type)
|
||||
+ {
|
||||
+ case VKD3D_SHADER_TYPE_HULL:
|
||||
+ case VKD3D_SHADER_TYPE_DOMAIN:
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ if (program->patch_constant_signature.element_count != 0)
|
||||
+ {
|
||||
+ WARN("The patch constant signature only makes sense for Hull and Domain Shaders, ignoring it.\n");
|
||||
+ shader_signature_cleanup(&program->patch_constant_signature);
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
input_signature = &program->input_signature;
|
||||
output_signature = &program->output_signature;
|
||||
patch_constant_signature = &program->patch_constant_signature;
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/glsl.c b/libs/vkd3d/libs/vkd3d-shader/glsl.c
|
||||
index 4dc95899a11..91ee355ed39 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/glsl.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/glsl.c
|
||||
@@ -651,6 +651,20 @@ static void shader_glsl_cast(struct vkd3d_glsl_generator *gen, const struct vkd3
|
||||
glsl_dst_cleanup(&dst, &gen->string_buffers);
|
||||
}
|
||||
|
||||
+static void shader_glsl_end_block(struct vkd3d_glsl_generator *gen)
|
||||
+{
|
||||
+ --gen->indent;
|
||||
+ shader_glsl_print_indent(gen->buffer, gen->indent);
|
||||
+ vkd3d_string_buffer_printf(gen->buffer, "}\n");
|
||||
+}
|
||||
+
|
||||
+static void shader_glsl_begin_block(struct vkd3d_glsl_generator *gen)
|
||||
+{
|
||||
+ shader_glsl_print_indent(gen->buffer, gen->indent);
|
||||
+ vkd3d_string_buffer_printf(gen->buffer, "{\n");
|
||||
+ ++gen->indent;
|
||||
+}
|
||||
+
|
||||
static void shader_glsl_if(struct vkd3d_glsl_generator *gen, const struct vkd3d_shader_instruction *ins)
|
||||
{
|
||||
const char *condition;
|
||||
@@ -664,23 +678,65 @@ static void shader_glsl_if(struct vkd3d_glsl_generator *gen, const struct vkd3d_
|
||||
|
||||
glsl_src_cleanup(&src, &gen->string_buffers);
|
||||
|
||||
- shader_glsl_print_indent(gen->buffer, gen->indent);
|
||||
- vkd3d_string_buffer_printf(gen->buffer, "{\n");
|
||||
- ++gen->indent;
|
||||
+ shader_glsl_begin_block(gen);
|
||||
}
|
||||
|
||||
static void shader_glsl_else(struct vkd3d_glsl_generator *gen, const struct vkd3d_shader_instruction *ins)
|
||||
{
|
||||
- unsigned int i = 4 * (gen->indent - 1);
|
||||
+ shader_glsl_end_block(gen);
|
||||
+ shader_glsl_print_indent(gen->buffer, gen->indent);
|
||||
+ vkd3d_string_buffer_printf(gen->buffer, "else\n");
|
||||
+ shader_glsl_begin_block(gen);
|
||||
+}
|
||||
|
||||
- vkd3d_string_buffer_printf(gen->buffer, "%*s}\n%*selse\n%*s{\n", i, "", i, "", i, "");
|
||||
+static void shader_glsl_loop(struct vkd3d_glsl_generator *gen)
|
||||
+{
|
||||
+ shader_glsl_print_indent(gen->buffer, gen->indent);
|
||||
+ vkd3d_string_buffer_printf(gen->buffer, "for (;;)\n");
|
||||
+ shader_glsl_begin_block(gen);
|
||||
}
|
||||
|
||||
-static void shader_glsl_endif(struct vkd3d_glsl_generator *gen)
|
||||
+static void shader_glsl_break(struct vkd3d_glsl_generator *gen)
|
||||
{
|
||||
- --gen->indent;
|
||||
shader_glsl_print_indent(gen->buffer, gen->indent);
|
||||
- vkd3d_string_buffer_printf(gen->buffer, "}\n");
|
||||
+ vkd3d_string_buffer_printf(gen->buffer, "break;\n");
|
||||
+}
|
||||
+
|
||||
+static void shader_glsl_continue(struct vkd3d_glsl_generator *gen)
|
||||
+{
|
||||
+ shader_glsl_print_indent(gen->buffer, gen->indent);
|
||||
+ vkd3d_string_buffer_printf(gen->buffer, "continue;\n");
|
||||
+}
|
||||
+
|
||||
+static void shader_glsl_switch(struct vkd3d_glsl_generator *gen, const struct vkd3d_shader_instruction *ins)
|
||||
+{
|
||||
+ struct glsl_src src;
|
||||
+
|
||||
+ glsl_src_init(&src, gen, &ins->src[0], VKD3DSP_WRITEMASK_0);
|
||||
+
|
||||
+ shader_glsl_print_indent(gen->buffer, gen->indent);
|
||||
+ vkd3d_string_buffer_printf(gen->buffer, "switch (%s)\n", src.str->buffer);
|
||||
+ shader_glsl_begin_block(gen);
|
||||
+
|
||||
+ glsl_src_cleanup(&src, &gen->string_buffers);
|
||||
+}
|
||||
+
|
||||
+static void shader_glsl_case(struct vkd3d_glsl_generator *gen, const struct vkd3d_shader_instruction *ins)
|
||||
+{
|
||||
+ struct glsl_src src;
|
||||
+
|
||||
+ glsl_src_init(&src, gen, &ins->src[0], VKD3DSP_WRITEMASK_0);
|
||||
+
|
||||
+ shader_glsl_print_indent(gen->buffer, gen->indent);
|
||||
+ vkd3d_string_buffer_printf(gen->buffer, "case %s:\n", src.str->buffer);
|
||||
+
|
||||
+ glsl_src_cleanup(&src, &gen->string_buffers);
|
||||
+}
|
||||
+
|
||||
+static void shader_glsl_default(struct vkd3d_glsl_generator *gen)
|
||||
+{
|
||||
+ shader_glsl_print_indent(gen->buffer, gen->indent);
|
||||
+ vkd3d_string_buffer_printf(gen->buffer, "default:\n");
|
||||
}
|
||||
|
||||
static void shader_glsl_ld(struct vkd3d_glsl_generator *gen, const struct vkd3d_shader_instruction *ins)
|
||||
@@ -1013,6 +1069,9 @@ static void shader_glsl_shader_prologue(struct vkd3d_glsl_generator *gen)
|
||||
case VKD3D_SHADER_COMPONENT_UINT:
|
||||
vkd3d_string_buffer_printf(buffer, " = uintBitsToFloat(shader_in_%u)", i);
|
||||
break;
|
||||
+ case VKD3D_SHADER_COMPONENT_INT:
|
||||
+ vkd3d_string_buffer_printf(buffer, " = intBitsToFloat(shader_in_%u)", i);
|
||||
+ break;
|
||||
default:
|
||||
vkd3d_glsl_compiler_error(gen, VKD3D_SHADER_ERROR_GLSL_INTERNAL,
|
||||
"Internal compiler error: Unhandled input component type %#x.", e->component_type);
|
||||
@@ -1127,6 +1186,15 @@ static void vkd3d_glsl_handle_instruction(struct vkd3d_glsl_generator *gen,
|
||||
case VKD3DSIH_AND:
|
||||
shader_glsl_binop(gen, ins, "&");
|
||||
break;
|
||||
+ case VKD3DSIH_BREAK:
|
||||
+ shader_glsl_break(gen);
|
||||
+ break;
|
||||
+ case VKD3DSIH_CASE:
|
||||
+ shader_glsl_case(gen, ins);
|
||||
+ break;
|
||||
+ case VKD3DSIH_CONTINUE:
|
||||
+ shader_glsl_continue(gen);
|
||||
+ break;
|
||||
case VKD3DSIH_DCL_INDEXABLE_TEMP:
|
||||
shader_glsl_dcl_indexable_temp(gen, ins);
|
||||
break;
|
||||
@@ -1138,6 +1206,9 @@ static void vkd3d_glsl_handle_instruction(struct vkd3d_glsl_generator *gen,
|
||||
case VKD3DSIH_DCL_OUTPUT_SIV:
|
||||
case VKD3DSIH_NOP:
|
||||
break;
|
||||
+ case VKD3DSIH_DEFAULT:
|
||||
+ shader_glsl_default(gen);
|
||||
+ break;
|
||||
case VKD3DSIH_DIV:
|
||||
shader_glsl_binop(gen, ins, "/");
|
||||
break;
|
||||
@@ -1154,7 +1225,9 @@ static void vkd3d_glsl_handle_instruction(struct vkd3d_glsl_generator *gen,
|
||||
shader_glsl_else(gen, ins);
|
||||
break;
|
||||
case VKD3DSIH_ENDIF:
|
||||
- shader_glsl_endif(gen);
|
||||
+ case VKD3DSIH_ENDLOOP:
|
||||
+ case VKD3DSIH_ENDSWITCH:
|
||||
+ shader_glsl_end_block(gen);
|
||||
break;
|
||||
case VKD3DSIH_EQO:
|
||||
case VKD3DSIH_IEQ:
|
||||
@@ -1184,6 +1257,7 @@ static void vkd3d_glsl_handle_instruction(struct vkd3d_glsl_generator *gen,
|
||||
break;
|
||||
case VKD3DSIH_ILT:
|
||||
case VKD3DSIH_LTO:
|
||||
+ case VKD3DSIH_ULT:
|
||||
shader_glsl_relop(gen, ins, "<", "lessThan");
|
||||
break;
|
||||
case VKD3DSIH_IMAX:
|
||||
@@ -1220,6 +1294,9 @@ static void vkd3d_glsl_handle_instruction(struct vkd3d_glsl_generator *gen,
|
||||
case VKD3DSIH_LOG:
|
||||
shader_glsl_intrinsic(gen, ins, "log2");
|
||||
break;
|
||||
+ case VKD3DSIH_LOOP:
|
||||
+ shader_glsl_loop(gen);
|
||||
+ break;
|
||||
case VKD3DSIH_MOV:
|
||||
shader_glsl_mov(gen, ins);
|
||||
break;
|
||||
@@ -1259,6 +1336,9 @@ static void vkd3d_glsl_handle_instruction(struct vkd3d_glsl_generator *gen,
|
||||
case VKD3DSIH_SQRT:
|
||||
shader_glsl_intrinsic(gen, ins, "sqrt");
|
||||
break;
|
||||
+ case VKD3DSIH_SWITCH:
|
||||
+ shader_glsl_switch(gen, ins);
|
||||
+ break;
|
||||
default:
|
||||
shader_glsl_unhandled(gen, ins);
|
||||
break;
|
||||
@@ -1663,6 +1743,9 @@ static void shader_glsl_generate_input_declarations(struct vkd3d_glsl_generator
|
||||
case VKD3D_SHADER_COMPONENT_UINT:
|
||||
vkd3d_string_buffer_printf(buffer, "uvec4");
|
||||
break;
|
||||
+ case VKD3D_SHADER_COMPONENT_INT:
|
||||
+ vkd3d_string_buffer_printf(buffer, "ivec4");
|
||||
+ break;
|
||||
case VKD3D_SHADER_COMPONENT_FLOAT:
|
||||
vkd3d_string_buffer_printf(buffer, "vec4");
|
||||
break;
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/ir.c b/libs/vkd3d/libs/vkd3d-shader/ir.c
|
||||
index 14cf23e8d1a..affbae3ea4e 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/ir.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/ir.c
|
||||
@@ -6505,6 +6505,30 @@ static bool vsir_validate_src_max_count(struct validation_context *ctx,
|
||||
return true;
|
||||
}
|
||||
|
||||
+static void vsir_validate_signature_element(struct validation_context *ctx,
|
||||
+ const struct shader_signature *signature, const char *signature_type,
|
||||
+ unsigned int idx)
|
||||
+{
|
||||
+ const struct signature_element *element = &signature->elements[idx];
|
||||
+
|
||||
+ if (element->register_count == 0)
|
||||
+ validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_SIGNATURE,
|
||||
+ "element %u of %s signature: Invalid zero register count.", idx, signature_type);
|
||||
+
|
||||
+ if (element->mask == 0 || (element->mask & ~0xf))
|
||||
+ validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_SIGNATURE,
|
||||
+ "element %u of %s signature: Invalid mask %#x.", idx, signature_type, element->mask);
|
||||
+}
|
||||
+
|
||||
+static void vsir_validate_signature(struct validation_context *ctx,
|
||||
+ const struct shader_signature *signature, const char *signature_type)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ for (i = 0; i < signature->element_count; ++i)
|
||||
+ vsir_validate_signature_element(ctx, signature, signature_type, i);
|
||||
+}
|
||||
+
|
||||
static const char *name_from_cf_type(enum vsir_control_flow_type type)
|
||||
{
|
||||
switch (type)
|
||||
@@ -7042,6 +7066,22 @@ enum vkd3d_result vsir_program_validate(struct vsir_program *program, uint64_t c
|
||||
if (!(config_flags & VKD3D_SHADER_CONFIG_FLAG_FORCE_VALIDATION))
|
||||
return VKD3D_OK;
|
||||
|
||||
+ switch (program->shader_version.type)
|
||||
+ {
|
||||
+ case VKD3D_SHADER_TYPE_HULL:
|
||||
+ case VKD3D_SHADER_TYPE_DOMAIN:
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ if (program->patch_constant_signature.element_count != 0)
|
||||
+ validator_error(&ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_SIGNATURE,
|
||||
+ "Patch constant signature is only valid for hull and domain shaders.");
|
||||
+ }
|
||||
+
|
||||
+ vsir_validate_signature(&ctx, &program->input_signature, "input");
|
||||
+ vsir_validate_signature(&ctx, &program->output_signature, "output");
|
||||
+ vsir_validate_signature(&ctx, &program->patch_constant_signature, "patch constant");
|
||||
+
|
||||
if (!(ctx.temps = vkd3d_calloc(ctx.program->temp_count, sizeof(*ctx.temps))))
|
||||
goto fail;
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/spirv.c b/libs/vkd3d/libs/vkd3d-shader/spirv.c
|
||||
index cb610c929b6..692432d5513 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/spirv.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/spirv.c
|
||||
@@ -3267,18 +3267,6 @@ static void spirv_compiler_emit_register_debug_name(struct vkd3d_spirv_builder *
|
||||
vkd3d_spirv_build_op_name(builder, id, "%s", debug_name);
|
||||
}
|
||||
|
||||
-static uint32_t spirv_compiler_emit_variable(struct spirv_compiler *compiler,
|
||||
- struct vkd3d_spirv_stream *stream, SpvStorageClass storage_class,
|
||||
- enum vkd3d_shader_component_type component_type, unsigned int component_count)
|
||||
-{
|
||||
- struct vkd3d_spirv_builder *builder = &compiler->spirv_builder;
|
||||
- uint32_t type_id, ptr_type_id;
|
||||
-
|
||||
- type_id = vkd3d_spirv_get_type_id(builder, component_type, component_count);
|
||||
- ptr_type_id = vkd3d_spirv_get_op_type_pointer(builder, storage_class, type_id);
|
||||
- return vkd3d_spirv_build_op_variable(builder, stream, ptr_type_id, storage_class, 0);
|
||||
-}
|
||||
-
|
||||
static uint32_t spirv_compiler_emit_array_variable(struct spirv_compiler *compiler,
|
||||
struct vkd3d_spirv_stream *stream, SpvStorageClass storage_class,
|
||||
enum vkd3d_shader_component_type component_type, unsigned int component_count,
|
||||
@@ -3288,10 +3276,6 @@ static uint32_t spirv_compiler_emit_array_variable(struct spirv_compiler *compil
|
||||
uint32_t type_id, length_id, ptr_type_id;
|
||||
unsigned int i;
|
||||
|
||||
- if (!length_count)
|
||||
- return spirv_compiler_emit_variable(compiler,
|
||||
- stream, storage_class, component_type, component_count);
|
||||
-
|
||||
type_id = vkd3d_spirv_get_type_id(builder, component_type, component_count);
|
||||
for (i = 0; i < length_count; ++i)
|
||||
{
|
||||
@@ -3305,6 +3289,14 @@ static uint32_t spirv_compiler_emit_array_variable(struct spirv_compiler *compil
|
||||
return vkd3d_spirv_build_op_variable(builder, stream, ptr_type_id, storage_class, 0);
|
||||
}
|
||||
|
||||
+static uint32_t spirv_compiler_emit_variable(struct spirv_compiler *compiler,
|
||||
+ struct vkd3d_spirv_stream *stream, SpvStorageClass storage_class,
|
||||
+ enum vkd3d_shader_component_type component_type, unsigned int component_count)
|
||||
+{
|
||||
+ return spirv_compiler_emit_array_variable(compiler, stream, storage_class,
|
||||
+ component_type, component_count, NULL, 0);
|
||||
+}
|
||||
+
|
||||
static const struct vkd3d_spec_constant_info
|
||||
{
|
||||
enum vkd3d_shader_parameter_name name;
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/tpf.c b/libs/vkd3d/libs/vkd3d-shader/tpf.c
|
||||
index 75bdb06fe0e..f79e97e92d4 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/tpf.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/tpf.c
|
||||
@@ -2914,6 +2914,21 @@ int tpf_parse(const struct vkd3d_shader_compile_info *compile_info, uint64_t con
|
||||
if (program->shader_version.type == VKD3D_SHADER_TYPE_HULL)
|
||||
uninvert_used_masks(&program->patch_constant_signature);
|
||||
|
||||
+ switch (program->shader_version.type)
|
||||
+ {
|
||||
+ case VKD3D_SHADER_TYPE_HULL:
|
||||
+ case VKD3D_SHADER_TYPE_DOMAIN:
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ if (program->patch_constant_signature.element_count != 0)
|
||||
+ {
|
||||
+ WARN("The patch constant signature only makes sense for Hull and Domain Shaders, ignoring it.\n");
|
||||
+ shader_signature_cleanup(&program->patch_constant_signature);
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
if (!shader_sm4_parser_validate_signature(&sm4, &program->input_signature,
|
||||
sm4.input_register_masks, "Input")
|
||||
|| !shader_sm4_parser_validate_signature(&sm4, &program->output_signature,
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c
|
||||
index 9b320106340..f84ac551272 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c
|
||||
@@ -1846,6 +1846,8 @@ void shader_signature_cleanup(struct shader_signature *signature)
|
||||
}
|
||||
vkd3d_free(signature->elements);
|
||||
signature->elements = NULL;
|
||||
+ signature->elements_capacity = 0;
|
||||
+ signature->element_count = 0;
|
||||
}
|
||||
|
||||
int vkd3d_shader_parse_input_signature(const struct vkd3d_shader_code *dxbc,
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
|
||||
index 1a42f385fc0..41b879af4b4 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
|
||||
@@ -245,6 +245,7 @@ enum vkd3d_shader_error
|
||||
VKD3D_SHADER_ERROR_VSIR_INVALID_GS = 9019,
|
||||
VKD3D_SHADER_ERROR_VSIR_INVALID_PARAMETER = 9020,
|
||||
VKD3D_SHADER_ERROR_VSIR_MISSING_SEMANTIC = 9021,
|
||||
+ VKD3D_SHADER_ERROR_VSIR_INVALID_SIGNATURE = 9022,
|
||||
|
||||
VKD3D_SHADER_WARNING_VSIR_DYNAMIC_DESCRIPTOR_ARRAY = 9300,
|
||||
|
||||
--
|
||||
2.45.2
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user