Module: Mesa
Branch: master
Commit: 5d904d27491aab489d54746bc6650b27c5927c39
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5d904d27491aab489d54746bc6650b27c5927c39

Author: Axel Davy <[email protected]>
Date:   Tue Jun  4 00:37:28 2019 +0200

st/nine: Improve return error code in CheckDeviceFormat

This seems suspicious, but is better than what we currently do.

Signed-off-by: Axel Davy <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>

---

 src/gallium/frontends/nine/adapter9.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/frontends/nine/adapter9.c 
b/src/gallium/frontends/nine/adapter9.c
index 200e5389949..356cbb6e6dc 100644
--- a/src/gallium/frontends/nine/adapter9.c
+++ b/src/gallium/frontends/nine/adapter9.c
@@ -297,7 +297,9 @@ NineAdapter9_CheckDeviceFormat( struct NineAdapter9 *This,
     DBG("Usage=%x RType=%u CheckFormat=%s\n", Usage, RType,
         d3dformat_to_string(CheckFormat));
 
-    user_assert(display_format(AdapterFormat, FALSE), D3DERR_INVALIDCALL);
+    /* Wine tests, but suspicious. Needs more tests. */
+    user_assert(adapter_format(AdapterFormat), D3DERR_INVALIDCALL);
+    user_assert(display_format(AdapterFormat, FALSE), D3DERR_NOTAVAILABLE);
 
     hr = NineAdapter9_GetScreen(This, DeviceType, &screen);
     if (FAILED(hr))

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to