[Mesa-dev] [PATCH 18/45] st/nine: Allow ColorFill on D3DFMT_NULL surfaces
Axel Davy
axel.davy at ens.fr
Fri Jan 29 08:08:42 PST 2016
From: Patrick Rudolph <siro at das-labor.org>
Report success instead of failing as there's no resource for those surfaces.
Fixes a crash in Crysis: Warhead.
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
Reviewed-by: Axel Davy <axel.davy at ens.fr>
---
src/gallium/state_trackers/nine/device9.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index 176db02..ecb33a8 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;
--
2.7.0
More information about the mesa-dev
mailing list