[Mesa-dev] [PATCH 44/45] st/nine: Disallow non-argb8888 cursors

Axel Davy axel.davy at ens.fr
Fri Jan 29 08:09:08 PST 2016


Only argb8888 cursors are allowed.

Signed-off-by: Axel Davy <axel.davy at ens.fr>
Reviewed-by: Patrick Rudolph <siro at das-labor.org>
---
 src/gallium/state_trackers/nine/device9.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index 593f2b5..0805b79 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -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);
-- 
2.7.0



More information about the mesa-dev mailing list