wined3d: Add empty sampler entries to the state table.
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index a7772f5..8aeafb8 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -2127,4 +2127,21 @@
     { /*7, 30, undefined                            */      0 /* -> sampler state in ddraw / d3d8 */,           state_undefined     },
     { /*7, 31, undefined                            */      0 /* -> sampler state in ddraw / d3d8 */,           state_undefined     },
     { /*7, 32, WINED3DTSS_CONSTANT                  */      0 /* As long as we don't support D3DTA_CONSTANT */, state_nogl          },
+    /* Sampler states */
+    { /* 0, Sampler 0                               */      STATE_SAMPLER(0),                                   state_undefined     },
+    { /* 1, Sampler 1                               */      STATE_SAMPLER(1),                                   state_undefined     },
+    { /* 2, Sampler 2                               */      STATE_SAMPLER(2),                                   state_undefined     },
+    { /* 3, Sampler 3                               */      STATE_SAMPLER(3),                                   state_undefined     },
+    { /* 4, Sampler 3                               */      STATE_SAMPLER(4),                                   state_undefined     },
+    { /* 5, Sampler 5                               */      STATE_SAMPLER(5),                                   state_undefined     },
+    { /* 6, Sampler 6                               */      STATE_SAMPLER(6),                                   state_undefined     },
+    { /* 7, Sampler 7                               */      STATE_SAMPLER(7),                                   state_undefined     },
+    { /* 8, Sampler 8                               */      STATE_SAMPLER(8),                                   state_undefined     },
+    { /* 9, Sampler 9                               */      STATE_SAMPLER(9),                                   state_undefined     },
+    { /*10, Sampler 10                              */      STATE_SAMPLER(10),                                  state_undefined     },
+    { /*11, Sampler 11                              */      STATE_SAMPLER(11),                                  state_undefined     },
+    { /*12, Sampler 12                              */      STATE_SAMPLER(12),                                  state_undefined     },
+    { /*13, Sampler 13                              */      STATE_SAMPLER(13),                                  state_undefined     },
+    { /*14, Sampler 14                              */      STATE_SAMPLER(14),                                  state_undefined     },
+    { /*15, Sampler 15                              */      STATE_SAMPLER(15),                                  state_undefined     },
 };
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 6c75706..95bdbde 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -416,7 +416,11 @@
 #define STATE_TEXTURESTAGE(stage, num) (STATE_RENDER(WINEHIGHEST_RENDER_STATE) + (stage) * WINED3D_HIGHEST_TEXTURE_STATE + (num))
 #define STATE_IS_TEXTURESTAGE(a) ((a) >= STATE_TEXTURESTAGE(0, 1) && (a) <= STATE_TEXTURESTAGE(MAX_TEXTURES - 1, WINED3D_HIGHEST_TEXTURE_STATE))
 
-#define STATE_HIGHEST (STATE_TEXTURESTAGE(MAX_TEXTURES - 1, WINED3D_HIGHEST_TEXTURE_STATE))
+/* + 1 because samplers start with 0 */
+#define STATE_SAMPLER(num) (STATE_TEXTURESTAGE(MAX_TEXTURES - 1, WINED3D_HIGHEST_TEXTURE_STATE) + 1 + (num))
+#define STATE_IS_SAMPLER(num) ((num) >= STATE_SAMPLER(0) && (num) <= STATE_SAMPLER(MAX_SAMPLERS - 1))
+
+#define STATE_HIGHEST (STATE_SAMPLER(MAX_SAMPLERS - 1))
 
 struct StateEntry
 {