Commit 5638fac6 authored by Ivan Gyurdiev's avatar Ivan Gyurdiev Committed by Alexandre Julliard

wined3d: Trace ABS/ABSNEG modifiers.

parent 899c8cdb
...@@ -436,6 +436,7 @@ void shader_dump_param( ...@@ -436,6 +436,7 @@ void shader_dump_param(
DWORD reg = param & D3DSP_REGNUM_MASK; DWORD reg = param & D3DSP_REGNUM_MASK;
DWORD regtype = shader_get_regtype(param); DWORD regtype = shader_get_regtype(param);
DWORD modifier = param & D3DSP_SRCMOD_MASK;
/* There are some minor differences between pixel and vertex shaders */ /* There are some minor differences between pixel and vertex shaders */
char pshader = shader_is_pshader_version(This->baseShader.hex_version); char pshader = shader_is_pshader_version(This->baseShader.hex_version);
...@@ -449,15 +450,19 @@ void shader_dump_param( ...@@ -449,15 +450,19 @@ void shader_dump_param(
swizzle_reg_chars[3] = pshader? 'a': 'w'; swizzle_reg_chars[3] = pshader? 'a': 'w';
if (input) { if (input) {
if ( ((param & D3DSP_SRCMOD_MASK) == D3DSPSM_NEG) || if ( (modifier == D3DSPSM_NEG) ||
((param & D3DSP_SRCMOD_MASK) == D3DSPSM_BIASNEG) || (modifier == D3DSPSM_BIASNEG) ||
((param & D3DSP_SRCMOD_MASK) == D3DSPSM_SIGNNEG) || (modifier == D3DSPSM_SIGNNEG) ||
((param & D3DSP_SRCMOD_MASK) == D3DSPSM_X2NEG) ) (modifier == D3DSPSM_X2NEG) ||
(modifier == D3DSPSM_ABSNEG) )
TRACE("-"); TRACE("-");
else if ((param & D3DSP_SRCMOD_MASK) == D3DSPSM_COMP) else if (modifier == D3DSPSM_COMP)
TRACE("1-"); TRACE("1-");
else if ((param & D3DSP_SRCMOD_MASK) == D3DSPSM_NOT) else if (modifier == D3DSPSM_NOT)
TRACE("!"); TRACE("!");
if (modifier == D3DSPSM_ABS || modifier == D3DSPSM_ABSNEG)
TRACE("abs(");
} }
switch (regtype) { switch (regtype) {
...@@ -546,9 +551,8 @@ void shader_dump_param( ...@@ -546,9 +551,8 @@ void shader_dump_param(
DWORD swizzle_b = (swizzle >> 4) & 0x03; DWORD swizzle_b = (swizzle >> 4) & 0x03;
DWORD swizzle_a = (swizzle >> 6) & 0x03; DWORD swizzle_a = (swizzle >> 6) & 0x03;
if (0 != (param & D3DSP_SRCMOD_MASK)) { if (0 != modifier) {
DWORD mask = param & D3DSP_SRCMOD_MASK; switch (modifier) {
switch (mask) {
case D3DSPSM_NONE: break; case D3DSPSM_NONE: break;
case D3DSPSM_NEG: break; case D3DSPSM_NEG: break;
case D3DSPSM_NOT: break; case D3DSPSM_NOT: break;
...@@ -561,8 +565,10 @@ void shader_dump_param( ...@@ -561,8 +565,10 @@ void shader_dump_param(
case D3DSPSM_X2NEG: TRACE("_x2"); break; case D3DSPSM_X2NEG: TRACE("_x2"); break;
case D3DSPSM_DZ: TRACE("_dz"); break; case D3DSPSM_DZ: TRACE("_dz"); break;
case D3DSPSM_DW: TRACE("_dw"); break; case D3DSPSM_DW: TRACE("_dw"); break;
case D3DSPSM_ABSNEG: TRACE(")"); break;
case D3DSPSM_ABS: TRACE(")"); break;
default: default:
TRACE("_unknown_modifier(%#lx)", mask >> D3DSP_SRCMOD_SHIFT); TRACE("_unknown_modifier(%#lx)", modifier >> D3DSP_SRCMOD_SHIFT);
} }
} }
......
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