From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/d3d10/effect.c | 10 ++++++++++ dlls/d3d10/tests/effect.c | 31 ++++++++++++++++--------------- 2 files changed, 26 insertions(+), 15 deletions(-)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 00a3b1b4c79..da67fecc908 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -207,6 +207,15 @@ struct preshader_instr
typedef void (*pres_op_func)(float **args, unsigned int n, const struct preshader_instr *instr);
+static void pres_neg(float **args, unsigned int n, const struct preshader_instr *instr) +{ + float *retval = args[1]; + unsigned int i; + + for (i = 0; i < instr->comp_count; ++i) + retval[i] = -args[0][i]; +} + static void pres_ftou(float **args, unsigned int n, const struct preshader_instr *instr) { float *retval = args[1]; @@ -255,6 +264,7 @@ struct preshader_op_info
static const struct preshader_op_info preshader_ops[] = { + { 0x101, "neg", pres_neg }, { 0x133, "ftou", pres_ftou }, { 0x200, "min", pres_min }, { 0x201, "max", pres_max }, diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c index e318083d899..f1c7af4e050 100644 --- a/dlls/d3d10/tests/effect.c +++ b/dlls/d3d10/tests/effect.c @@ -8142,7 +8142,7 @@ technique10 tech { pass p0 { - SetBlendState( NULL, g_var + 0.1f + g_var2, 0 ); + SetBlendState( NULL, -g_var + 0.1f + g_var2, 0 ); } pass p1 { @@ -8156,23 +8156,24 @@ technique10 tech #endif static DWORD fx_test_value_expression[] = { - 0x43425844, 0x998fdf90, 0xbfa437be, 0x8d71413d, 0xe31c8b21, 0x00000001, 0x00000703, 0x00000001, - 0x00000024, 0x30315846, 0x000006d7, 0xfeff1001, 0x00000001, 0x00000002, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000001, 0x0000057b, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x5efbe2c7, 0xf0e73736, 0x817c47b1, 0x221654f8, 0x00000001, 0x00000723, 0x00000001, + 0x00000024, 0x30315846, 0x000006f7, 0xfeff1001, 0x00000001, 0x00000002, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x0000059b, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x6f6c4724, 0x736c6162, 0x6f6c6600, 0x00347461, 0x0000000d, 0x00000001, 0x00000000, 0x00000010, 0x00000010, - 0x00000010, 0x0000210a, 0x61765f67, 0x5f670072, 0x32726176, 0x63657400, 0x30700068, 0x00016000, - 0x42584400, 0x312ce543, 0xc3ebc897, 0xea47c0a2, 0x8a710323, 0x000001d2, 0x00016000, 0x00000300, + 0x00000010, 0x0000210a, 0x61765f67, 0x5f670072, 0x32726176, 0x63657400, 0x30700068, 0x00018000, + 0x42584400, 0x042b4d43, 0x89240778, 0x7627fdd4, 0xd3b7fecb, 0x0000014d, 0x00018000, 0x00000300, 0x00002c00, 0x0000d400, 0x0000f000, 0x41544300, 0x0000a042, 0x00001c00, 0x00007700, 0x58040000, 0x00000246, 0x00001c00, 0x00010000, 0x00007400, 0x00004400, 0x00000200, 0x00000100, 0x00004c00, 0x00000000, 0x00005c00, 0x01000200, 0x00000100, 0x00006400, 0x00000000, 0x765f6700, 0xab007261, 0x030001ab, 0x04000100, 0x00000100, 0x00000000, 0x765f6700, 0x00327261, 0x030001ab, 0x04000100, 0x00000100, 0x00000000, 0x00787400, 0x7263694d, 0x666f736f, 0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x31207265, 0x00312e30, 0x494c43ab, 0x00001434, 0x00000400, - 0xcccccd00, 0x0000003d, 0x00000000, 0x00000000, 0x4c584600, 0x00006843, 0x00000200, 0x40000400, - 0x00000220, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0x00000200, 0x00000400, 0x00000000, - 0x00000700, 0x00000000, 0x40000400, 0x000002a0, 0x00000000, 0x00000100, 0x00000000, 0x00000000, - 0x00000700, 0x00000000, 0x00000000, 0x00000400, 0x00000000, 0xf0f0f000, 0x0f0f0ff0, 0x00ffff0f, + 0xcccccd00, 0x0000003d, 0x00000000, 0x00000000, 0x4c584600, 0x00008843, 0x00000300, 0x10000400, + 0x00000110, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0x00000700, 0x00000000, 0x40000400, + 0x00000220, 0x00000000, 0x00000700, 0x00000000, 0x00000000, 0x00000200, 0x00000400, 0x00000000, + 0x00000700, 0x00000400, 0x40000400, 0x000002a0, 0x00000000, 0x00000100, 0x00000000, 0x00000000, + 0x00000700, 0x00000400, 0x00000000, 0x00000400, 0x00000000, 0xf0f0f000, 0x0f0f0ff0, 0x00ffff0f, 0x00000100, 0x00000200, 0x00000000, 0x00000100, 0x00000200, 0x00000000, 0x00317000, 0x00000150, 0x43425844, 0xc6a29e4c, 0x6292ed35, 0xd90bb8cb, 0x50dcd25f, 0x00000001, 0x00000150, 0x00000003, 0x0000002c, 0x000000d4, 0x000000e0, 0x42415443, 0x000000a0, 0x0000001c, 0x00000077, 0x46580400, @@ -8207,11 +8208,11 @@ static DWORD fx_test_value_expression[] = 0xff000000, 0x00ffffff, 0x30000000, 0x14000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x36000000, 0x14000000, 0x00000000, 0x10000000, 0x00000000, 0x00000000, 0x00000000, 0x3d000000, 0x03000000, 0x00000000, 0x42000000, 0x03000000, 0x00000000, 0x0a000000, 0x00000000, - 0x06000000, 0x45000000, 0x0b000000, 0x00000000, 0x01000000, 0xa9000000, 0x02000001, 0x00000000, - 0x01000000, 0xb5000000, 0xc1000001, 0x03000001, 0x00000000, 0x0a000000, 0x00000000, 0x06000000, - 0xc4000000, 0x0b000001, 0x00000000, 0x01000000, 0x18000000, 0x02000003, 0x00000000, 0x01000000, - 0x24000000, 0x30000003, 0x03000003, 0x00000000, 0x0a000000, 0x00000000, 0x06000000, 0x33000000, - 0x0b000003, 0x00000000, 0x01000000, 0x63000000, 0x02000005, 0x00000000, 0x01000000, 0x6f000000, + 0x06000000, 0x45000000, 0x0b000000, 0x00000000, 0x01000000, 0xc9000000, 0x02000001, 0x00000000, + 0x01000000, 0xd5000000, 0xe1000001, 0x03000001, 0x00000000, 0x0a000000, 0x00000000, 0x06000000, + 0xe4000000, 0x0b000001, 0x00000000, 0x01000000, 0x38000000, 0x02000003, 0x00000000, 0x01000000, + 0x44000000, 0x50000003, 0x03000003, 0x00000000, 0x0a000000, 0x00000000, 0x06000000, 0x53000000, + 0x0b000003, 0x00000000, 0x01000000, 0x83000000, 0x02000005, 0x00000000, 0x01000000, 0x8f000000, 0x00000005, };