Commit f144d58a authored by Ivan Gyurdiev's avatar Ivan Gyurdiev Committed by Alexandre Julliard

wined3d: The namedArrays code path is dead (always FALSE).

Delete the entire namedArrays code path and all its dependencies (one of which is quite long - storeOrder in drawprim is always FALSE, for example). Delete declaredArrays, and make its code path the default.
parent 3692219d
...@@ -685,6 +685,12 @@ void generate_base_shader( ...@@ -685,6 +685,12 @@ void generate_base_shader(
FIXME("Unrecognized opcode: token=%08lX\n", opcode_token); FIXME("Unrecognized opcode: token=%08lX\n", opcode_token);
pToken += shader_skip_unrecognized(iface, pToken); pToken += shader_skip_unrecognized(iface, pToken);
/* Nothing to do */
} else if (D3DSIO_DCL == curOpcode->opcode ||
D3DSIO_NOP == curOpcode->opcode) {
pToken += shader_skip_opcode(This, curOpcode, opcode_token);
/* If a generator function is set for current shader target, use it */ /* If a generator function is set for current shader target, use it */
} else if (hw_fct != NULL) { } else if (hw_fct != NULL) {
...@@ -694,12 +700,7 @@ void generate_base_shader( ...@@ -694,12 +700,7 @@ void generate_base_shader(
DWORD param, addr_token = 0; DWORD param, addr_token = 0;
/* DCL instruction has usage dst parameter, not register */ pToken += shader_get_param(iface, pToken, &param, &addr_token);
if (curOpcode->opcode == D3DSIO_DCL)
param = *pToken++;
else
pToken += shader_get_param(iface, pToken, &param, &addr_token);
hw_arg.dst = param; hw_arg.dst = param;
hw_arg.dst_addr = addr_token; hw_arg.dst_addr = addr_token;
...@@ -724,13 +725,11 @@ void generate_base_shader( ...@@ -724,13 +725,11 @@ void generate_base_shader(
/* Call appropriate function for output target */ /* Call appropriate function for output target */
hw_fct(&hw_arg); hw_fct(&hw_arg);
/* Unhandled opcode */
} else { } else {
/* Unless we encounter a no-op command, this opcode is unrecognized */ FIXME("Can't handle opcode %s in hwShader\n", curOpcode->name);
if (curOpcode->opcode != D3DSIO_NOP) { pToken += shader_skip_opcode(This, curOpcode, opcode_token);
FIXME("Can't handle opcode %s in hwShader\n", curOpcode->name);
pToken += shader_skip_opcode(This, curOpcode, opcode_token);
}
} }
} }
/* TODO: What about result.depth? */ /* TODO: What about result.depth? */
...@@ -763,7 +762,7 @@ void shader_dump_ins_modifiers(const DWORD output) { ...@@ -763,7 +762,7 @@ void shader_dump_ins_modifiers(const DWORD output) {
FIXME("_unrecognized_modifier(%#lx)", mmask >> D3DSP_DSTMOD_SHIFT); FIXME("_unrecognized_modifier(%#lx)", mmask >> D3DSP_DSTMOD_SHIFT);
} }
/** Process the D3DSIO_DCL opcode into an ARB string - creates a local vec4 /** Process the D3DSIO_DEF opcode into an ARB string - creates a local vec4
* float constant, and stores it's usage on the regmaps. */ * float constant, and stores it's usage on the regmaps. */
void shader_hw_def(SHADER_OPCODE_ARG* arg) { void shader_hw_def(SHADER_OPCODE_ARG* arg) {
......
...@@ -186,13 +186,7 @@ static void shader_glsl_get_register_name( ...@@ -186,13 +186,7 @@ static void shader_glsl_get_register_name(
|| reg == vshader->arrayUsageMap[WINED3DSHADERDECLUSAGE_SPECULAR]) { || reg == vshader->arrayUsageMap[WINED3DSHADERDECLUSAGE_SPECULAR]) {
(*is_color) = TRUE; (*is_color) = TRUE;
} }
/* if the attributes come in as named dcl's then use a named vertex (called namedVertexN) */ sprintf(tmpStr, "attrib%lu", reg);
if (vshader->namedArrays) {
sprintf(tmpStr, "namedVertex%lu", reg);
} else {
/* otherwise the input is on a numbered attribute so use opengl numbered attributes */
sprintf(tmpStr, "attrib%lu", reg);
}
} }
break; break;
case D3DSPR_CONST: case D3DSPR_CONST:
......
...@@ -1432,10 +1432,8 @@ typedef struct IWineD3DVertexShaderImpl { ...@@ -1432,10 +1432,8 @@ typedef struct IWineD3DVertexShaderImpl {
DWORD usage; DWORD usage;
/* vertex declaration array mapping */ /* vertex declaration array mapping */
BOOL namedArrays; /* don't map use named functions */ INT arrayUsageMap[WINED3DSHADERDECLUSAGE_MAX_USAGE];
BOOL declaredArrays; /* mapping requires */
INT arrayUsageMap[WINED3DSHADERDECLUSAGE_MAX_USAGE]; /* lookup table for the maps */
/* run time datas... */ /* run time datas... */
VSHADERDATA *data; VSHADERDATA *data;
IWineD3DVertexDeclaration *vertexDeclaration; IWineD3DVertexDeclaration *vertexDeclaration;
......
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