diff options
author | Axel Davy <[email protected]> | 2019-06-03 22:22:59 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-15 15:43:57 +0000 |
commit | edff31c0d902cd83495a1e49f306d8f031cf118b (patch) | |
tree | 7e110e39839b8f0e6ea9d08dbc35806bab2471a5 /src/gallium | |
parent | 2c61b4db7d6f9ce2638bdd35c8dcac70ea950e4e (diff) |
st/nine: Do not return invalidcall on getrenderstate
To be fair I don't remember why I wrote this patch,
but it seems reasonable.
Signed-off-by: Axel Davy <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/frontends/nine/device9.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/frontends/nine/device9.c b/src/gallium/frontends/nine/device9.c index 841d62bc6ce..fd8e9274327 100644 --- a/src/gallium/frontends/nine/device9.c +++ b/src/gallium/frontends/nine/device9.c @@ -2283,7 +2283,7 @@ NineDevice9_SetRenderState( struct NineDevice9 *This, DBG("This=%p State=%u(%s) Value=%08x\n", This, State, nine_d3drs_to_string(State), Value); - user_assert(State < D3DRS_COUNT, D3DERR_INVALIDCALL); + user_assert(State < D3DRS_COUNT, D3D_OK); if (unlikely(This->is_recording)) { state->rs_advertised[State] = Value; @@ -2307,7 +2307,11 @@ NineDevice9_GetRenderState( struct NineDevice9 *This, DWORD *pValue ) { user_assert(!This->pure, D3DERR_INVALIDCALL); - user_assert(State < D3DRS_COUNT, D3DERR_INVALIDCALL); + /* TODO: This needs tests */ + if (State >= D3DRS_COUNT) { + *pValue = 0; + return D3D_OK; + } *pValue = This->state.rs_advertised[State]; return D3D_OK; |