Re: [v5 1/8] d3dx9: Add test for preshader in effect.
2016-03-21 14:55 GMT+01:00 Paul Gofman <gofmanp(a)gmail.com>:
+struct test_struct +{ + float3 v1; + float fv; + float4 v2; +}; + +test_struct ts1[1] = {{{9, 10, 11}, 12, {13, 14, 15, 16}}}; +test_struct ts2[2] = {{{0, 0, 0}, 0, {0, 0, 0, 0}}, {{1, 2, 3}, 4, {5, 6, 7, 8}}};
Is it also possible to create a struct with an array field? And an array of those structs?
+ static const struct + { + const char *comment; + BOOL todo[4]; + unsigned int result[4]; + } + test_effect_preshader_op_results[] = + { + {"1 / op", { TRUE, TRUE, TRUE, TRUE}, {0x7f800000, 0xff800000, 0xbee8ba2e, 0x00200000}}, +#if __x86_64__ + {"rsq", { TRUE, TRUE, TRUE, TRUE}, {0x7f800000, 0x7f800000, 0x3f2c985d, 0x1f800000}}, +#else + {"rsq", { TRUE, TRUE, TRUE, TRUE}, {0x7f800000, 0x7f800000, 0x3f2c985c, 0x1f800001}}, +#endif + {"mul", { TRUE, TRUE, TRUE, TRUE}, {0x00000000, 0x80000000, 0x40d33334, 0x7f800000}}, + {"add", {FALSE, TRUE, TRUE, TRUE}, {0x3f800000, 0x40000000, 0xc0a66666, 0x7f7fffff}}, + {"lt", {FALSE, FALSE, TRUE, FALSE}, {0x3f800000, 0x3f800000, 0x00000000, 0x00000000}}, + {"ge", { TRUE, TRUE, FALSE, TRUE}, {0x00000000, 0x00000000, 0x3f800000, 0x3f800000}}, + {"neg", { TRUE, TRUE, TRUE, TRUE}, {0x80000000, 0x00000000, 0x400ccccd, 0xff7fffff}}, + {"rcp", { TRUE, TRUE, TRUE, TRUE}, {0x7f800000, 0xff800000, 0xbee8ba2e, 0x00200000}}, + {"frac", {FALSE, FALSE, TRUE, FALSE}, {0x00000000, 0x00000000, 0x3f4ccccc, 0x00000000}}, + {"min", {FALSE, TRUE, TRUE, TRUE}, {0x00000000, 0x80000000, 0xc0400000, 0x40800000}}, + {"max", { TRUE, TRUE, TRUE, TRUE}, {0x3f800000, 0x40000000, 0xc00ccccd, 0x7f7fffff}}, +#if __x86_64__ + {"sin", {FALSE, TRUE, TRUE, TRUE}, {0x00000000, 0x80000000, 0xbf4ef99e, 0xbf0599b3}}, + {"cos", { TRUE, TRUE, TRUE, TRUE}, {0x3f800000, 0x3f800000, 0xbf16a803, 0x3f5a5f96}}, +#else + {"sin", {FALSE, TRUE, TRUE, TRUE}, {0x00000000, 0x80000000, 0xbf4ef99e, 0x3f792dc4}}, + {"cos", { TRUE, TRUE, TRUE, TRUE}, {0x3f800000, 0x3f800000, 0xbf16a803, 0xbe6acefc}}, +#endif + {"den mul",{ TRUE, TRUE, TRUE, TRUE}, {0x7f800000, 0xff800000, 0xbb94f209, 0x000051ec}}, + {"dot", {FALSE, TRUE, TRUE, FALSE}, {0x00000000, 0x7f800000, 0x41f00000, 0x00000000}}, +#if __x86_64__ + {"prec", { TRUE, TRUE, TRUE, FALSE}, {0x2b8cbccc, 0x2c0cbccc, 0xac531800, 0x00000000}} +#else + {"prec", { TRUE, TRUE, FALSE, FALSE}, {0x2b8cbccc, 0x2c0cbccc, 0x00000000, 0x00000000}} +#endif + };
I don't like those #ifdefs much although apparently I don't have nicer suggestions.
On 03/23/2016 01:05 AM, Matteo Bruni wrote:
2016-03-21 14:55 GMT+01:00 Paul Gofman <gofmanp(a)gmail.com>:
+struct test_struct +{ + float3 v1; + float fv; + float4 v2; +}; + +test_struct ts1[1] = {{{9, 10, 11}, 12, {13, 14, 15, 16}}}; +test_struct ts2[2] = {{{0, 0, 0}, 0, {0, 0, 0, 0}}, {{1, 2, 3}, 4, {5, 6, 7, 8}}}; Is it also possible to create a struct with an array field? And an array of those structs? Since you signed this off already, I suggest I do it together with a couple of additions to this test effect I wanted to do for IsParameterUsed test I am preparing.
2016-03-22 23:22 GMT+01:00 Paul Gofman <gofmanp(a)gmail.com>:
On 03/23/2016 01:05 AM, Matteo Bruni wrote:
2016-03-21 14:55 GMT+01:00 Paul Gofman <gofmanp(a)gmail.com>:
+struct test_struct +{ + float3 v1; + float fv; + float4 v2; +}; + +test_struct ts1[1] = {{{9, 10, 11}, 12, {13, 14, 15, 16}}}; +test_struct ts2[2] = {{{0, 0, 0}, 0, {0, 0, 0, 0}}, {{1, 2, 3}, 4, {5, 6, 7, 8}}}; Is it also possible to create a struct with an array field? And an array of those structs? Since you signed this off already, I suggest I do it together with a couple of additions to this test effect I wanted to do for IsParameterUsed test I am preparing.
Sure. It can even be two separate patches.
participants (2)
-
Matteo Bruni -
Paul Gofman