From 9cab25ae01c2fc273503e7f901597ac9e0d5f737 Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Wed, 10 Mar 2021 22:38:14 +0100 Subject: [PATCH] st/nine: pseudo implement set/getClipstatus Fixes: https://github.com/iXit/wine-nine-standalone/issues/99 Signed-off-by: Axel Davy --- src/gallium/frontends/nine/device9.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/gallium/frontends/nine/device9.c b/src/gallium/frontends/nine/device9.c index ddd0f916c54..fbc03058cad 100644 --- a/src/gallium/frontends/nine/device9.c +++ b/src/gallium/frontends/nine/device9.c @@ -2597,14 +2597,28 @@ HRESULT NINE_WINAPI NineDevice9_SetClipStatus( struct NineDevice9 *This, const D3DCLIPSTATUS9 *pClipStatus ) { - STUB(D3DERR_INVALIDCALL); + user_assert(pClipStatus, D3DERR_INVALIDCALL); + return D3D_OK; } HRESULT NINE_WINAPI NineDevice9_GetClipStatus( struct NineDevice9 *This, D3DCLIPSTATUS9 *pClipStatus ) { - STUB(D3DERR_INVALIDCALL); + user_assert(pClipStatus, D3DERR_INVALIDCALL); + /* Set/GetClipStatus is supposed to get the app some infos + * about vertices being clipped if it is using the software + * vertex rendering. It would be too complicated to implement. + * Probably the info is for developpers when working on their + * applications. Else it could be for apps to know if it is worth + * drawing some elements. In that case it makes sense to send + * 0 for ClipUnion and 0xFFFFFFFF for ClipIntersection (basically + * means not all vertices are clipped). Those values are known to + * be the default if SetClipStatus is not set. Else we could return + * what was set with SetClipStatus unchanged. */ + pClipStatus->ClipUnion = 0; + pClipStatus->ClipIntersection = 0xFFFFFFFF; + return D3D_OK; } HRESULT NINE_WINAPI