From: Patrick Rudolph Date: Sat, 5 Dec 2015 13:14:38 +0000 (+0100) Subject: st/nine: Allow ColorFill on D3DFMT_NULL surfaces X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b142f616214c810505c63c6a22f044041dab37a7;p=mesa.git st/nine: Allow ColorFill on D3DFMT_NULL surfaces Report success instead of failing as there's no resource for those surfaces. Fixes a crash in Crysis: Warhead. Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy --- diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index 496a6c96e5b..44c6ebdc67b 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -1669,6 +1669,8 @@ NineDevice9_ColorFill( struct NineDevice9 *This, user_assert((surf->base.usage & D3DUSAGE_RENDERTARGET) || NineSurface9_IsOffscreenPlain(surf), D3DERR_INVALIDCALL); + user_assert(surf->desc.Format != D3DFMT_NULL, D3D_OK); + if (pRect) { x = pRect->left; y = pRect->top;