summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine
diff options
context:
space:
mode:
authorPatrick Rudolph <[email protected]>2015-12-05 14:14:38 +0100
committerAxel Davy <[email protected]>2016-02-04 22:12:17 +0100
commitb142f616214c810505c63c6a22f044041dab37a7 (patch)
treeee5428d832c6142b00d8570b38886c958839aefc /src/gallium/state_trackers/nine
parent04e22a04a61e0388ccc5d8c65f79bc3cfa5ac3bc (diff)
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 <[email protected]> Reviewed-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine')
-rw-r--r--src/gallium/state_trackers/nine/device9.c2
1 files changed, 2 insertions, 0 deletions
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;