[Mesa-dev] [PATCH 2/2] st/nine: skip position checks in SetCursorPosition()
Andre Heider
a.heider at gmail.com
Thu Apr 4 10:34:30 UTC 2019
For HW cursors, "cursor.pos" doesn't hold the current position of the
pointer, just the position of the last call to SetCursorPosition().
Skip the check against stale values for present interface v1.5, so it
can do it properly itself.
Signed-off-by: Andre Heider <a.heider at gmail.com>
---
Corresponding d3d9-nine.dll patch:
https://github.com/iXit/wine-nine-standalone/commit/e095d0beb2004f69a9b917266e556920296050f7
src/gallium/state_trackers/nine/adapter9.c | 2 +-
src/gallium/state_trackers/nine/device9.c | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/gallium/state_trackers/nine/adapter9.c b/src/gallium/state_trackers/nine/adapter9.c
index 4f648e894b8..774e3cf10dd 100644
--- a/src/gallium/state_trackers/nine/adapter9.c
+++ b/src/gallium/state_trackers/nine/adapter9.c
@@ -35,7 +35,7 @@
#define DBG_CHANNEL DBG_ADAPTER
/* The maximum supported present version */
-#define MAX_PRESENT_VERSION_MINOR 4
+#define MAX_PRESENT_VERSION_MINOR 5
HRESULT
NineAdapter9_ctor( struct NineAdapter9 *This,
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index db1c3a1d23d..6f9094b62c2 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -793,9 +793,11 @@ NineDevice9_SetCursorPosition( struct NineDevice9 *This,
DBG("This=%p X=%d Y=%d Flags=%d\n", This, X, Y, Flags);
- if (This->cursor.pos.x == X &&
- This->cursor.pos.y == Y)
- return;
+ /* present >= v1.5 handles this itself */
+ if (This->minor_version_num < 5) {
+ if (This->cursor.pos.x == X && This->cursor.pos.y == Y)
+ return;
+ }
This->cursor.pos.x = X;
This->cursor.pos.y = Y;
--
2.20.1
More information about the mesa-dev
mailing list