Skip to content

Commit

Permalink
st/nine: Pseudo implement set/getClipstatus
Browse files Browse the repository at this point in the history
Not sure why any app would use this in production,
it seems like a debugging feature. Still some do make
the calls.

Fixes: iXit/wine-nine-standalone#99

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
  • Loading branch information
axeldavy committed Apr 11, 2021
1 parent 4c80c5b commit 4f49825
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/gallium/frontends/nine/device9.c
Original file line number Diff line number Diff line change
Expand Up @@ -2592,14 +2592,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
Expand Down

0 comments on commit 4f49825

Please sign in to comment.