st/nine: Change a few advertised caps
authorAxel Davy <davyaxel0@gmail.com>
Mon, 4 Feb 2019 23:11:46 +0000 (00:11 +0100)
committerAxel Davy <davyaxel0@gmail.com>
Sat, 9 Mar 2019 12:57:49 +0000 (13:57 +0100)
Most hw on the native platform advertise these
caps this way.

D3DCAPS_READ_SCANLINE: We don't really have hardware
support for that, but many games don't even check the
flag, and expect GetRasterStatus to work, which is
why we emulated it with a timer (like wine). So we
may as well advertise the cap.
D3DCURSORCAPS_LOWRES: I don't know what is the status
of this on X11, but I don't know of any dx9 game
running at height < 400 either.
D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE: The cap should
correspond to what the current generation of hw is doing.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
include/D3D9/d3d9caps.h
src/gallium/state_trackers/nine/adapter9.c

index 0cce5d3f689fbe1682918ae9fdcd5d990cc2651a..70f9919c53da22961df343746bba281a84022b1d 100644 (file)
@@ -26,6 +26,9 @@
 #include "d3d9types.h"
 
 /* Caps flags */
+#define D3DCAPS_OVERLAY       0x00000800
+#define D3DCAPS_READ_SCANLINE 0x00020000
+
 #define D3DCAPS2_FULLSCREENGAMMA   0x00020000
 #define D3DCAPS2_CANCALIBRATEGAMMA 0x00100000
 #define D3DCAPS2_RESERVED          0x02000000
index 94a5d8d2aa3e0f728e598614b7e7e48259f5d579..3aa95b93b2ffcd7af9af1f64dc9a9669a7fddbcb 100644 (file)
@@ -545,7 +545,7 @@ NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This,
 
     pCaps->AdapterOrdinal = 0;
 
-    pCaps->Caps = 0;
+    pCaps->Caps = D3DCAPS_READ_SCANLINE;
 
     pCaps->Caps2 = /* D3DCAPS2_CANMANAGERESOURCE | */
                 /* D3DCAPS2_CANSHARERESOURCE | */
@@ -568,7 +568,7 @@ NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This,
                                    D3DPRESENT_INTERVAL_THREE |
                                    D3DPRESENT_INTERVAL_FOUR |
                                    D3DPRESENT_INTERVAL_IMMEDIATE;
-    pCaps->CursorCaps = D3DCURSORCAPS_COLOR | D3DCURSORCAPS_LOWRES;
+    pCaps->CursorCaps = D3DCURSORCAPS_COLOR /* | D3DCURSORCAPS_LOWRES*/;
 
     pCaps->DevCaps = D3DDEVCAPS_CANBLTSYSTONONLOCAL |
                      D3DDEVCAPS_CANRENDERAFTERFLIP |
@@ -678,7 +678,7 @@ NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This,
         D3DPTEXTURECAPS_ALPHAPALETTE |
         D3DPTEXTURECAPS_PERSPECTIVE |
         D3DPTEXTURECAPS_PROJECTED |
-        /*D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE |*/
+        D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE |
         D3DPTEXTURECAPS_CUBEMAP |
         D3DPTEXTURECAPS_VOLUMEMAP |
         D3DNPIPECAP(NPOT_TEXTURES, D3DPTEXTURECAPS_POW2) |