mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Added patch with stubs for QUERY_TYPE_SO_STATISTICS and QUERY_TYPE_SO_OVERFLOW.
This commit is contained in:
parent
181ad80116
commit
4b7dbb610b
@ -361,6 +361,7 @@ patch_enable_all ()
|
||||
enable_wined3d_DXTn="$1"
|
||||
enable_wined3d_Fix_Typos="$1"
|
||||
enable_wined3d_Limit_Vram="$1"
|
||||
enable_wined3d_QUERY_Stubs="$1"
|
||||
enable_wined3d_Revert_PixelFormat="$1"
|
||||
enable_wined3d_Silence_FIXMEs="$1"
|
||||
enable_winedevice_Fix_Relocation="$1"
|
||||
@ -1256,6 +1257,9 @@ patch_enable ()
|
||||
wined3d-Limit_Vram)
|
||||
enable_wined3d_Limit_Vram="$2"
|
||||
;;
|
||||
wined3d-QUERY_Stubs)
|
||||
enable_wined3d_QUERY_Stubs="$2"
|
||||
;;
|
||||
wined3d-Revert_PixelFormat)
|
||||
enable_wined3d_Revert_PixelFormat="$2"
|
||||
;;
|
||||
@ -7211,6 +7215,21 @@ if test "$enable_wined3d_Limit_Vram" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-QUERY_Stubs
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#20776] Add stubs for QUERY_TYPE_SO_STATISTICS and QUERY_TYPE_SO_OVERFLOW
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/query.c, include/wine/wined3d.h
|
||||
# |
|
||||
if test "$enable_wined3d_QUERY_Stubs" -eq 1; then
|
||||
patch_apply wined3d-QUERY_Stubs/0001-wined3d-Add-stubs-for-QUERY_TYPE_SO_STATISTICS-and-Q.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "wined3d: Add stubs for QUERY_TYPE_SO_STATISTICS and QUERY_TYPE_SO_OVERFLOW.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Revert_PixelFormat
|
||||
# |
|
||||
# | Modified files:
|
||||
|
@ -0,0 +1,118 @@
|
||||
From 4eb44bc7f251082d2e0c37ac6487fa702f7de013 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 16 Apr 2016 18:18:54 +0200
|
||||
Subject: wined3d: Add stubs for QUERY_TYPE_SO_STATISTICS and
|
||||
QUERY_TYPE_SO_OVERFLOW.
|
||||
|
||||
---
|
||||
dlls/wined3d/query.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
include/wine/wined3d.h | 6 +++++
|
||||
2 files changed, 68 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
index 410ce6c..0c56b23 100644
|
||||
--- a/dlls/wined3d/query.c
|
||||
+++ b/dlls/wined3d/query.c
|
||||
@@ -681,6 +681,42 @@ static HRESULT wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
+static HRESULT wined3d_statistics_query_ops_get_data(struct wined3d_query *query,
|
||||
+ void *data, DWORD size, DWORD flags)
|
||||
+{
|
||||
+ static const struct wined3d_query_data_so_statistics statistics = { 1, 1 };
|
||||
+
|
||||
+ FIXME("query %p, data %p, size %#x, flags %#x.\n", query, data, size, flags);
|
||||
+
|
||||
+ if (!data || !size) return S_OK;
|
||||
+ fill_query_data(data, size, &statistics, sizeof(statistics));
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT wined3d_statistics_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
+{
|
||||
+ FIXME("query %p, flags %#x.\n", query, flags);
|
||||
+ return WINED3D_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT wined3d_overflow_query_ops_get_data(struct wined3d_query *query,
|
||||
+ void *data, DWORD size, DWORD flags)
|
||||
+{
|
||||
+ static const BOOL overflow = FALSE;
|
||||
+
|
||||
+ FIXME("query %p, data %p, size %#x, flags %#x.\n", query, data, size, flags);
|
||||
+
|
||||
+ if (!data || !size) return S_OK;
|
||||
+ fill_query_data(data, size, &overflow, sizeof(overflow));
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT wined3d_overflow_query_ops_issue(struct wined3d_query *query, DWORD flags)
|
||||
+{
|
||||
+ FIXME("query %p, flags %#x.\n", query, flags);
|
||||
+ return WINED3D_OK;
|
||||
+}
|
||||
+
|
||||
static const struct wined3d_query_ops event_query_ops =
|
||||
{
|
||||
wined3d_event_query_ops_get_data,
|
||||
@@ -705,6 +741,18 @@ static const struct wined3d_query_ops timestamp_disjoint_query_ops =
|
||||
wined3d_timestamp_disjoint_query_ops_issue,
|
||||
};
|
||||
|
||||
+static const struct wined3d_query_ops statistics_query_ops =
|
||||
+{
|
||||
+ wined3d_statistics_query_ops_get_data,
|
||||
+ wined3d_statistics_query_ops_issue,
|
||||
+};
|
||||
+
|
||||
+static const struct wined3d_query_ops overflow_query_ops =
|
||||
+{
|
||||
+ wined3d_overflow_query_ops_get_data,
|
||||
+ wined3d_overflow_query_ops_issue
|
||||
+};
|
||||
+
|
||||
static HRESULT query_init(struct wined3d_query *query, struct wined3d_device *device,
|
||||
enum wined3d_query_type type, void *parent)
|
||||
{
|
||||
@@ -752,6 +800,20 @@ static HRESULT query_init(struct wined3d_query *query, struct wined3d_device *de
|
||||
}
|
||||
break;
|
||||
|
||||
+ case WINED3D_QUERY_TYPE_SO_STATISTICS:
|
||||
+ FIXME("Statistics query.\n");
|
||||
+ query->query_ops = &statistics_query_ops;
|
||||
+ query->data_size = sizeof(struct wined3d_query_data_so_statistics);
|
||||
+ query->extendedData = NULL;
|
||||
+ break;
|
||||
+
|
||||
+ case WINED3D_QUERY_TYPE_SO_OVERFLOW:
|
||||
+ FIXME("Overflow query.\n");
|
||||
+ query->query_ops = &overflow_query_ops;
|
||||
+ query->data_size = sizeof(BOOL);
|
||||
+ query->extendedData = NULL;
|
||||
+ break;
|
||||
+
|
||||
case WINED3D_QUERY_TYPE_TIMESTAMP:
|
||||
TRACE("Timestamp query.\n");
|
||||
if (!gl_info->supported[ARB_TIMER_QUERY])
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index cf2715c..c61bf17 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -702,6 +702,12 @@ struct wined3d_query_data_timestamp_disjoint
|
||||
BOOL disjoint;
|
||||
};
|
||||
|
||||
+struct wined3d_query_data_so_statistics
|
||||
+{
|
||||
+ UINT64 written;
|
||||
+ UINT64 needed;
|
||||
+};
|
||||
+
|
||||
#define WINED3DISSUE_BEGIN (1u << 1)
|
||||
#define WINED3DISSUE_END (1u << 0)
|
||||
#define WINED3DGETDATA_FLUSH (1u << 0)
|
||||
--
|
||||
2.7.1
|
||||
|
1
patches/wined3d-QUERY_Stubs/definition
Normal file
1
patches/wined3d-QUERY_Stubs/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [20776] Add stubs for QUERY_TYPE_SO_STATISTICS and QUERY_TYPE_SO_OVERFLOW
|
Loading…
Reference in New Issue
Block a user