st/nine: Setting D3DRS_ALPHAFUNC to 0 means D3DCMP_NEVER
authorTiziano Bacocco <tizbac2@gmail.com>
Mon, 19 Jan 2015 14:27:38 +0000 (15:27 +0100)
committerAxel Davy <axel.davy@ens.fr>
Thu, 5 Feb 2015 23:07:19 +0000 (00:07 +0100)
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Tiziano Bacocco <tizbac2@gmail.com>
include/D3D9/d3d9types.h
src/gallium/state_trackers/nine/nine_pipe.h

index 5020934ddfe7570c833dc517eaf12eab9064c673..e96f751be4b74bd23a8588dfafe38cf7e8988b35 100644 (file)
@@ -472,6 +472,7 @@ typedef enum _D3DBUSTYPE {
 } D3DBUSTYPE;
 
 typedef enum _D3DCMPFUNC {
+    D3DCMP_NEVER_ZERO = 0, //Needed to avoid warnings
     D3DCMP_NEVER = 1,
     D3DCMP_LESS = 2,
     D3DCMP_EQUAL = 3,
index 640bbdbfbf2a359653bedf62bd736a69f70e74f9..c1269b3d0d9a5918f4432072b412f00e1d33ceee 100644 (file)
@@ -472,6 +472,7 @@ d3dcmpfunc_to_pipe_func(D3DCMPFUNC func)
     case D3DCMP_NOTEQUAL:     return PIPE_FUNC_NOTEQUAL;
     case D3DCMP_GREATEREQUAL: return PIPE_FUNC_GEQUAL;
     case D3DCMP_ALWAYS:       return PIPE_FUNC_ALWAYS;
+    case D3DCMP_NEVER_ZERO:   return PIPE_FUNC_NEVER; // Tested on windows + ATI HD5770
     default:
         assert(0);
         return PIPE_FUNC_NEVER;