wined3d: Move D3DSIO_DEF instruction for ARB shaders into arb_program_shader.c.

oldstable
Jason Green 2006-06-19 17:53:38 -04:00 committed by Alexandre Julliard
parent 99c855e6ae
commit 0b09ecb291
2 changed files with 17 additions and 16 deletions

View File

@ -144,4 +144,21 @@ void shader_generate_arb_declarations(
This->baseShader.limits.constant_float - 1);
}
/** Process the D3DSIO_DEF opcode into an ARB string - creates a local vec4
* float constant, and stores it's usage on the regmaps. */
void shader_hw_def(SHADER_OPCODE_ARG* arg) {
DWORD reg = arg->dst & D3DSP_REGNUM_MASK;
shader_addline(arg->buffer,
"PARAM C%lu = { %f, %f, %f, %f };\n", reg,
*((const float *)(arg->src + 0)),
*((const float *)(arg->src + 1)),
*((const float *)(arg->src + 2)),
*((const float *)(arg->src + 3)) );
arg->reg_maps->constantsF[reg] = 1;
}
/* TODO: Add more ARB_[vertex/fragment]_program specific code here */

View File

@ -823,22 +823,6 @@ void shader_dump_ins_modifiers(const DWORD output) {
FIXME("_unrecognized_modifier(%#lx)", mmask >> D3DSP_DSTMOD_SHIFT);
}
/** Process the D3DSIO_DEF opcode into an ARB string - creates a local vec4
* float constant, and stores it's usage on the regmaps. */
void shader_hw_def(SHADER_OPCODE_ARG* arg) {
DWORD reg = arg->dst & D3DSP_REGNUM_MASK;
shader_addline(arg->buffer,
"PARAM C%lu = { %f, %f, %f, %f };\n", reg,
*((const float *)(arg->src + 0)),
*((const float *)(arg->src + 1)),
*((const float *)(arg->src + 2)),
*((const float *)(arg->src + 3)) );
arg->reg_maps->constantsF[reg] = 1;
}
/* First pass: trace shader, initialize length and version */
void shader_trace_init(
IWineD3DBaseShader *iface,