st/nine: Disallow non-argb8888 cursors
authorAxel Davy <axel.davy@ens.fr>
Tue, 26 Jan 2016 15:40:30 +0000 (16:40 +0100)
committerAxel Davy <axel.davy@ens.fr>
Thu, 4 Feb 2016 21:12:17 +0000 (22:12 +0100)
Only argb8888 cursors are allowed.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
src/gallium/state_trackers/nine/device9.c

index 17a8b60dfd607ebf53272ce5b3076a607e37e3ed..475ef96788e4b9416d9839beadc447fbe36f3214 100644 (file)
@@ -629,6 +629,7 @@ NineDevice9_SetCursorProperties( struct NineDevice9 *This,
              "pCursorBitmap=%p\n", This, XHotSpot, YHotSpot, pCursorBitmap);
 
     user_assert(pCursorBitmap, D3DERR_INVALIDCALL);
+    user_assert(surf->desc.Format == D3DFMT_A8R8G8B8, D3DERR_INVALIDCALL);
 
     if (This->swapchains[0]->params.Windowed) {
         This->cursor.w = MIN2(surf->desc.Width, 32);