Commit 2d7cdc3e authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Remove the DLL load init function.

parent 94b72350
......@@ -2090,9 +2090,6 @@ static void shader_arb_get_caps(WINED3DDEVTYPE devtype, WineD3D_GL_Info *gl_info
}
}
static void shader_arb_load_init(void) {
}
static void shader_arb_fragment_enable(IWineD3DDevice *iface, BOOL enable) {
none_shader_backend.shader_fragment_enable(iface, enable);
}
......@@ -2111,7 +2108,6 @@ const shader_backend_t arb_program_shader_backend = {
shader_arb_generate_pshader,
shader_arb_generate_vshader,
shader_arb_get_caps,
shader_arb_load_init,
shader_arb_fragment_enable,
FFPStateTable
};
......@@ -856,44 +856,6 @@ static void set_bumpmat(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
/* our state table. Borrows lots of stuff from the base implementation */
struct StateEntry ATIFSStateTable[STATE_HIGHEST + 1];
static void init_state_table() {
unsigned int i;
const DWORD rep = STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP);
memcpy(ATIFSStateTable, arb_program_shader_backend.StateTable_remove, sizeof(ATIFSStateTable));
for(i = 0; i < MAX_TEXTURES; i++) {
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_COLOROP)].apply = NULL;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_COLOROP)].representative = rep;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_COLORARG1)].apply = NULL;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_COLORARG1)].representative = rep;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_COLORARG2)].apply = NULL;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_COLORARG2)].representative = rep;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_COLORARG0)].apply = NULL;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_COLORARG0)].representative = rep;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_ALPHAOP)].apply = NULL;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_ALPHAOP)].representative = rep;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_ALPHAARG1)].apply = NULL;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_ALPHAARG1)].representative = rep;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_ALPHAARG2)].apply = NULL;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_ALPHAARG2)].representative = rep;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_ALPHAARG0)].apply = NULL;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_ALPHAARG0)].representative = rep;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_RESULTARG)].apply = NULL;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_RESULTARG)].representative = rep;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_BUMPENVMAT00)].apply = NULL;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_BUMPENVMAT01)].apply = NULL;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_BUMPENVMAT10)].apply = NULL;
ATIFSStateTable[STATE_TEXTURESTAGE(i, WINED3DTSS_BUMPENVMAT11)].apply = NULL;
}
ATIFSStateTable[STATE_RENDER(WINED3DRS_TEXTUREFACTOR)].apply = NULL;
ATIFSStateTable[STATE_RENDER(WINED3DRS_TEXTUREFACTOR)].representative = STATE_RENDER(WINED3DRS_TEXTUREFACTOR);
}
const struct StateEntryTemplate atifs_fragmentstate_template[] = {
{STATE_RENDER(WINED3DRS_TEXTUREFACTOR), { STATE_RENDER(WINED3DRS_TEXTUREFACTOR), state_texfactor_atifs }},
{STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP), { STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP), set_tex_op_atifs }},
......@@ -1079,11 +1041,6 @@ static BOOL shader_atifs_dirty_const(IWineD3DDevice *iface) {
return arb_program_shader_backend.shader_dirtifyable_constants(iface);
}
static void shader_atifs_load_init(void) {
arb_program_shader_backend.shader_dll_load_init();
init_state_table();
}
static void shader_atifs_get_caps(WINED3DDEVTYPE devtype, WineD3D_GL_Info *gl_info, struct shader_caps *caps) {
arb_program_shader_backend.shader_get_caps(devtype, gl_info, caps);
......@@ -1168,7 +1125,6 @@ const shader_backend_t atifs_shader_backend = {
shader_atifs_generate_pshader,
shader_atifs_generate_vshader,
shader_atifs_get_caps,
shader_atifs_load_init,
shader_atifs_fragment_enable,
ATIFSStateTable
};
......@@ -1105,7 +1105,6 @@ static void shader_none_generate_pshader(IWineD3DPixelShader *iface, SHADER_BUFF
static void shader_none_generate_vshader(IWineD3DVertexShader *iface, SHADER_BUFFER *buffer) {
FIXME("NONE shader backend asked to generate a vertex shader\n");
}
static void shader_none_load_init(void) {}
#define GLINFO_LOCATION (*gl_info)
static void shader_none_get_caps(WINED3DDEVTYPE devtype, WineD3D_GL_Info *gl_info, struct shader_caps *pCaps) {
......@@ -1214,7 +1213,6 @@ const shader_backend_t none_shader_backend = {
shader_none_generate_pshader,
shader_none_generate_vshader,
shader_none_get_caps,
shader_none_load_init,
shader_none_fragment_enable,
FFPStateTable
};
......
......@@ -3689,8 +3689,6 @@ static void shader_glsl_get_caps(WINED3DDEVTYPE devtype, WineD3D_GL_Info *gl_inf
TRACE_(d3d_caps)("Hardware pixel shader version %d.%d enabled (GLSL)\n", (pCaps->PixelShaderVersion >> 8) & 0xff, pCaps->PixelShaderVersion & 0xff);
}
static void shader_glsl_load_init(void) {}
static void shader_glsl_fragment_enable(IWineD3DDevice *iface, BOOL enable) {
none_shader_backend.shader_fragment_enable(iface, enable);
}
......@@ -3709,7 +3707,6 @@ const shader_backend_t glsl_shader_backend = {
shader_glsl_generate_pshader,
shader_glsl_generate_vshader,
shader_glsl_get_caps,
shader_glsl_load_init,
shader_glsl_fragment_enable,
FFPStateTable
};
......@@ -95,11 +95,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
DWORD len;
WNDCLASSA wc;
atifs_shader_backend.shader_dll_load_init();
glsl_shader_backend.shader_dll_load_init();
arb_program_shader_backend.shader_dll_load_init();
none_shader_backend.shader_dll_load_init();
/* We need our own window class for a fake window which we use to retrieve GL capabilities */
/* We might need CS_OWNDC in the future if we notice strange things on Windows.
* Various articles/posts about OpenGL problems on Windows recommend this. */
......
......@@ -300,7 +300,6 @@ typedef struct {
void (*shader_generate_pshader)(IWineD3DPixelShader *iface, SHADER_BUFFER *buffer);
void (*shader_generate_vshader)(IWineD3DVertexShader *iface, SHADER_BUFFER *buffer);
void (*shader_get_caps)(WINED3DDEVTYPE devtype, WineD3D_GL_Info *gl_info, struct shader_caps *caps);
void (*shader_dll_load_init)(void);
void (*shader_fragment_enable)(IWineD3DDevice *iface, BOOL enable);
const struct StateEntry *StateTable_remove; /* TODO: This has to go away */
} shader_backend_t;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment