st/nine: Fix behaviour of D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING
authorXavier Bouchoux <xavierb@gmail.com>
Sat, 21 Feb 2015 18:58:38 +0000 (19:58 +0100)
committerAxel Davy <axel.davy@ens.fr>
Wed, 29 Apr 2015 06:28:10 +0000 (08:28 +0200)
Ignore D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING when
D3DUSAGE_RENDERTARGET is not specified.

This behaviour matches windows drivers.

Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Xavier Bouchoux <xavierb@gmail.com>
src/gallium/state_trackers/nine/adapter9.c

index 1d751559991713d2a7e7ea8f8cf324b0428c748a..9d6d6590e00b9a416d0b4d4a460de167af37549a 100644 (file)
@@ -311,7 +311,8 @@ NineAdapter9_CheckDeviceFormat( struct NineAdapter9 *This,
     if (CheckFormat == D3DFMT_ATOC && RType == D3DRTYPE_SURFACE)
         return D3D_OK;
 
-    if (Usage & D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING)
+    if ((Usage & D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING) &&
+        (Usage & D3DUSAGE_RENDERTARGET))
         bind |= PIPE_BIND_BLENDABLE;
 
     if (Usage & D3DUSAGE_DMAP) {