[PATCH] d3d9/tests: Add more tests for shader validator.

Henri Verbeet hverbeet at gmail.com
Mon Jan 11 11:53:25 CST 2021


On Fri, 8 Jan 2021 at 15:14, Paul Gofman <pgofman at codeweavers.com> wrote:
> +    static const struct instruction_test
> +    {
> +        unsigned int shader_version;
> +        const unsigned int *instruction;
> +        unsigned int instruction_length;
> +        DWORD_PTR message_id;
> +        const unsigned int *decl;
> +        unsigned int decl_length;
> +    }
> +    instruction_tests[] =
> +    {
> +        {0xffff0300, dcl_texcoord_9_9, ARRAY_SIZE(dcl_texcoord_9_9)},
> +        {0xffff0300, dcl_texcoord_9_10, ARRAY_SIZE(dcl_texcoord_9_10), 0x12c},
> +        {0xffff0300, dcl_texcoord_10_9, ARRAY_SIZE(dcl_texcoord_10_9)},
> +        {0xffff0300, mov_r2_v9, ARRAY_SIZE(mov_r2_v9), 0, dcl_texcoord_9_9, ARRAY_SIZE(dcl_texcoord_9_9)},
> +        {0xffff0300, mov_r2_v10, ARRAY_SIZE(mov_r2_v10), 0x167},
> +    };
D3DPS_VERSION(3, 0) instead of 0xffff0300, I'd say.

As an aside, I'm not sure how much thought you've already given to the
implementation of the shader validator, but we'll probably want most
of that to live in vkd3d-shader. Perhaps that can be part of
vkd3d_shader_scan(), although in its current form that requires
complete shaders.



More information about the wine-devel mailing list