OSDN Git Service

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 5020934..e96f751 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 640bbdb..c1269b3 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;