[2/4] WINED3D: Move the SHADER_OPCODE definition to wined3d_private.h

H. Verbeet hverbeet at gmail.com
Tue Mar 28 13:10:32 CST 2006


Currently SHADER_OPCODE is defined and used in both pixelshader.c and
vertexshader.c

Changelog:
  - Move the SHADER_OPCODE definition to wined3d_private.h
-------------- next part --------------
diff --git a/dlls/wined3d/pixelshader.c b/dlls/wined3d/pixelshader.c
index 381a828..64fe501 100644
--- a/dlls/wined3d/pixelshader.c
+++ b/dlls/wined3d/pixelshader.c
@@ -41,17 +41,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader);
 #define PGMSIZE 65535
 
 #define REGMASK 0x00001FFF
-typedef void (*shader_fct_t)();
-
-typedef struct SHADER_OPCODE {
-    unsigned int  opcode;
-    const char*   name;
-    const char*   glname;
-    CONST UINT    num_params;
-    shader_fct_t  soft_fct;
-    DWORD         min_version;
-    DWORD         max_version;
-} SHADER_OPCODE;
 
 #define GLNAME_REQUIRE_GLSL  ((const char *)1)
 /* *******************************************
diff --git a/dlls/wined3d/vertexshader.c b/dlls/wined3d/vertexshader.c
index 13da61c..cfa8f2e 100644
--- a/dlls/wined3d/vertexshader.c
+++ b/dlls/wined3d/vertexshader.c
@@ -78,18 +78,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader);
 /* TODO: Vertex and Pixel shaders are almost identicle, the only exception being the way that some of the data is looked up or the availablity of some of the data i.e. some instructions are only valid for pshaders and some for vshaders
 because of this the bulk of the software pipeline can be shared between pixel and vertex shaders... and it wouldn't supprise me if the programes can be cross compiled using a large body body shared code */
 
-typedef void (*shader_fct_t)();
-
-typedef struct SHADER_OPCODE {
-  unsigned int  opcode;
-  const char*   name;
-  const char*   glname;
-  CONST UINT    num_params;
-  shader_fct_t  soft_fct;
-  DWORD         min_version;
-  DWORD         max_version;
-} SHADER_OPCODE;
-
 #define GLNAME_REQUIRE_GLSL  ((const char *)1)
 
 /*******************************
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 66bf32b..b199f18 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1157,6 +1157,18 @@ enum vsConstantsEnum {
     VS_CONSTANT_FLOAT
 };
 
+typedef void (*shader_fct_t)();
+
+typedef struct SHADER_OPCODE {
+    unsigned int  opcode;
+    const char*   name;
+    const char*   glname;
+    CONST UINT    num_params;
+    shader_fct_t  soft_fct;
+    DWORD         min_version;
+    DWORD         max_version;
+} SHADER_OPCODE;
+
 /*****************************************************************************
  * IDirect3DVertexShader implementation structure
  */




More information about the wine-patches mailing list