wined3d: Add a function around the handler table.

This reduces the number of methods in the shader backend(the instr
modifiers can be handled in that wrapper) and it will help flow
control emulation in the ARB backend.
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index dd74b25..a48925f 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -2666,8 +2666,25 @@
     /* WINED3DSIH_TEXREG2RGB    */ pshader_hw_texreg2rgb,
 };
 
+static void shader_arb_handle_instruction(const struct wined3d_shader_instruction *ins) {
+    SHADER_HANDLER hw_fct;
+
+    /* Select handler */
+    hw_fct = shader_arb_instruction_handler_table[ins->handler_idx];
+
+    /* Unhandled opcode */
+    if (!hw_fct)
+    {
+        FIXME("Backend can't handle opcode %#x\n", ins->handler_idx);
+        return;
+    }
+    hw_fct(ins);
+
+    shader_arb_add_instruction_modifiers(ins);
+}
+
 const shader_backend_t arb_program_shader_backend = {
-    shader_arb_instruction_handler_table,
+    shader_arb_handle_instruction,
     shader_arb_select,
     shader_arb_select_depth_blt,
     shader_arb_deselect_depth_blt,
@@ -2681,7 +2698,6 @@
     shader_arb_dirty_const,
     shader_arb_get_caps,
     shader_arb_color_fixup_supported,
-    shader_arb_add_instruction_modifiers,
 };
 
 /* ARB_fragment_program fixed function pipeline replacement definitions */
diff --git a/dlls/wined3d/baseshader.c b/dlls/wined3d/baseshader.c
index 0380c33..431b9a2 100644
--- a/dlls/wined3d/baseshader.c
+++ b/dlls/wined3d/baseshader.c
@@ -986,7 +986,6 @@
 {
     IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface;
     IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) This->baseShader.device; /* To access shader backend callbacks */
-    const SHADER_HANDLER *handler_table = device->shader_backend->shader_instruction_handler_table;
     const struct wined3d_shader_frontend *fe = This->baseShader.frontend;
     void *fe_data = This->baseShader.frontend_data;
     struct wined3d_shader_src_param src_rel_addr[4];
@@ -997,7 +996,6 @@
     struct wined3d_shader_instruction ins;
     struct wined3d_shader_context ctx;
     const DWORD *pToken = pFunction;
-    SHADER_HANDLER hw_fct;
     DWORD i;
 
     /* Initialize current parsing state */
@@ -1046,17 +1044,6 @@
             continue;
         }
 
-        /* Select handler */
-        hw_fct = handler_table[ins.handler_idx];
-
-        /* Unhandled opcode */
-        if (!hw_fct)
-        {
-            FIXME("Backend can't handle opcode %#x\n", ins.handler_idx);
-            pToken += param_size;
-            continue;
-        }
-
         /* Destination token */
         if (ins.dst_count) fe->shader_read_dst_param(fe_data, &pToken, &dst_param, &dst_rel_addr);
 
@@ -1070,10 +1057,7 @@
         }
 
         /* Call appropriate function for output target */
-        hw_fct(&ins);
-
-        /* Process instruction modifiers for GLSL apps ( _sat, etc. ) */
-        device->shader_backend->shader_add_instruction_modifiers(&ins);
+        device->shader_backend->shader_handle_instruction(&ins);
     }
 }
 
@@ -1271,7 +1255,7 @@
     }
 }
 
-static const SHADER_HANDLER shader_none_instruction_handler_table[WINED3DSIH_TABLE_SIZE] = {0};
+static void shader_none_handle_instruction(const struct wined3d_shader_instruction *ins) {}
 static void shader_none_select(IWineD3DDevice *iface, BOOL usePS, BOOL useVS) {}
 static void shader_none_select_depth_blt(IWineD3DDevice *iface, enum tex_types tex_type) {}
 static void shader_none_deselect_depth_blt(IWineD3DDevice *iface) {}
@@ -1283,7 +1267,6 @@
 static HRESULT shader_none_alloc(IWineD3DDevice *iface) {return WINED3D_OK;}
 static void shader_none_free(IWineD3DDevice *iface) {}
 static BOOL shader_none_dirty_const(IWineD3DDevice *iface) {return FALSE;}
-static void shader_none_add_instruction_modifiers(const struct wined3d_shader_instruction *ins) {}
 
 #define GLINFO_LOCATION      (*gl_info)
 static void shader_none_get_caps(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct shader_caps *pCaps)
@@ -1314,7 +1297,7 @@
 }
 
 const shader_backend_t none_shader_backend = {
-    shader_none_instruction_handler_table,
+    shader_none_handle_instruction,
     shader_none_select,
     shader_none_select_depth_blt,
     shader_none_deselect_depth_blt,
@@ -1328,5 +1311,4 @@
     shader_none_dirty_const,
     shader_none_get_caps,
     shader_none_color_fixup_supported,
-    shader_none_add_instruction_modifiers,
 };
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 0b20d33..08bcaa6 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -4656,8 +4656,25 @@
     /* WINED3DSIH_TEXREG2RGB    */ pshader_glsl_texreg2rgb,
 };
 
+static void shader_glsl_handle_instruction(const struct wined3d_shader_instruction *ins) {
+    SHADER_HANDLER hw_fct;
+
+    /* Select handler */
+    hw_fct = shader_glsl_instruction_handler_table[ins->handler_idx];
+
+    /* Unhandled opcode */
+    if (!hw_fct)
+    {
+        FIXME("Backend can't handle opcode %#x\n", ins->handler_idx);
+        return;
+    }
+    hw_fct(ins);
+
+    shader_glsl_add_instruction_modifiers(ins);
+}
+
 const shader_backend_t glsl_shader_backend = {
-    shader_glsl_instruction_handler_table,
+    shader_glsl_handle_instruction,
     shader_glsl_select,
     shader_glsl_select_depth_blt,
     shader_glsl_deselect_depth_blt,
@@ -4671,5 +4688,4 @@
     shader_glsl_dirty_const,
     shader_glsl_get_caps,
     shader_glsl_color_fixup_supported,
-    shader_glsl_add_instruction_modifiers,
 };
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index ce6fd40..1b4906a 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -797,7 +797,7 @@
 };
 
 typedef struct {
-    const SHADER_HANDLER *shader_instruction_handler_table;
+    void (*shader_handle_instruction)(const struct wined3d_shader_instruction *);
     void (*shader_select)(IWineD3DDevice *iface, BOOL usePS, BOOL useVS);
     void (*shader_select_depth_blt)(IWineD3DDevice *iface, enum tex_types tex_type);
     void (*shader_deselect_depth_blt)(IWineD3DDevice *iface);