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

wined3d: Allow multiple output modifiers.

parent c94ecdff
......@@ -547,13 +547,13 @@ void shader_dump_ins_modifiers(const DWORD output) {
default: TRACE("_unhandled_shift(%ld)", shift); break;
}
switch(mmask) {
case D3DSPDM_NONE: break;
case D3DSPDM_SATURATE: TRACE("_sat"); break;
case D3DSPDM_PARTIALPRECISION: TRACE("_pp"); break;
case D3DSPDM_MSAMPCENTROID: TRACE("_centroid"); break;
default: TRACE("_unhandled_modifier(%#lx)", mmask); break;
}
if (mmask & D3DSPDM_SATURATE) TRACE("_sat");
if (mmask & D3DSPDM_PARTIALPRECISION) TRACE("_pp");
if (mmask & D3DSPDM_MSAMPCENTROID) TRACE("_centroid");
mmask &= ~(D3DSPDM_SATURATE | D3DSPDM_PARTIALPRECISION | D3DSPDM_MSAMPCENTROID);
if (mmask)
FIXME("_unrecognized_modifier(%#lx)", mmask >> D3DSP_DSTMOD_SHIFT);
}
/* TODO: Move other shared code here */
......@@ -981,9 +981,13 @@ void pshader_hw_map2gl(SHADER_OPCODE_ARG* arg) {
unsigned int i;
char tmpLine[256];
/* Output token related */
char output_rname[256];
char output_wmask[20];
BOOL saturate = FALSE;
BOOL centroid = FALSE;
BOOL partialprecision = FALSE;
DWORD shift;
TRACE("Appending glname %s to tmpLine\n", curOpcode->glname);
......@@ -992,17 +996,19 @@ void pshader_hw_map2gl(SHADER_OPCODE_ARG* arg) {
/* Process modifiers */
if (0 != (dst & D3DSP_DSTMOD_MASK)) {
DWORD mask = dst & D3DSP_DSTMOD_MASK;
switch (mask) {
case D3DSPDM_SATURATE: saturate = TRUE; break;
#if 0 /* as yet unhandled modifiers */
case D3DSPDM_CENTROID: centroid = TRUE; break;
case D3DSPDM_PP: partialpresision = TRUE; break;
#endif
default:
TRACE("_unhandled_modifier(0x%08lx)\n", mask);
}
}
shift = (dst & D3DSP_DSTSHIFT_MASK) >> D3DSP_DSTSHIFT_SHIFT;
saturate = mask & D3DSPDM_SATURATE;
centroid = mask & D3DSPDM_MSAMPCENTROID;
partialprecision = mask & D3DSPDM_PARTIALPRECISION;
mask &= ~(D3DSPDM_MSAMPCENTROID | D3DSPDM_PARTIALPRECISION | D3DSPDM_SATURATE);
if (mask)
FIXME("Unrecognized modifier(0x%#lx)\n", mask >> D3DSP_DSTMOD_SHIFT);
if (centroid)
FIXME("Unhandled modifier(0x%#lx)\n", mask >> D3DSP_DSTMOD_SHIFT);
}
shift = (dst & D3DSP_DSTSHIFT_MASK) >> D3DSP_DSTSHIFT_SHIFT;
/* Generate input and output registers */
if (curOpcode->num_params > 0) {
......
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