mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
st/nine: Return error when setting invalid depth buffer
Prevents a crash with the trace of https://github.com/iXit/wine-nine-standalone/issues/40 Signed-off-by: Axel Davy <davyaxel0@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>
This commit is contained in:
parent
c0f21cbaa1
commit
2c61b4db7d
1 changed files with 3 additions and 0 deletions
|
|
@ -1929,6 +1929,9 @@ NineDevice9_SetDepthStencilSurface( struct NineDevice9 *This,
|
|||
struct NineSurface9 *ds = NineSurface9(pNewZStencil);
|
||||
DBG("This=%p pNewZStencil=%p\n", This, pNewZStencil);
|
||||
|
||||
user_assert(!ds || util_format_is_depth_or_stencil(ds->base.info.format),
|
||||
D3DERR_INVALIDCALL);
|
||||
|
||||
if (This->state.ds != ds) {
|
||||
nine_bind(&This->state.ds, ds);
|
||||
nine_context_set_depth_stencil(This, ds);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue