Commit 0b09ecb2 authored by Jason Green's avatar Jason Green Committed by Alexandre Julliard

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

parent 99c855e6
......@@ -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 */
......@@ -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,
......
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