Commit 5050f7c8 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3dx9: Shader assembler vs_2_x support.

parent 961db796
......@@ -283,14 +283,12 @@ version_marker: VER_VS10
| VER_VS20
{
TRACE("Vertex shader 2.0\n");
set_parse_status(&asm_ctx, PARSE_ERR);
YYABORT;
create_vs20_parser(&asm_ctx);
}
| VER_VS2X
{
TRACE("Vertex shader 2.x\n");
set_parse_status(&asm_ctx, PARSE_ERR);
YYABORT;
create_vs2x_parser(&asm_ctx);
}
| VER_VS30
{
......
......@@ -311,6 +311,8 @@ struct asm_parser {
extern struct asm_parser asm_ctx;
void create_vs20_parser(struct asm_parser *ret);
void create_vs2x_parser(struct asm_parser *ret);
void create_vs30_parser(struct asm_parser *ret);
void create_ps30_parser(struct asm_parser *ret);
......@@ -369,6 +371,15 @@ struct bc_writer {
HRESULT state;
DWORD version;
/* Vertex shader varying mapping */
DWORD oPos_regnum;
DWORD oD_regnum[2];
DWORD oT_regnum[8];
DWORD oFog_regnum;
DWORD oFog_mask;
DWORD oPts_regnum;
DWORD oPts_mask;
};
/* Debug utility routines */
......
......@@ -739,6 +739,14 @@ static void vs_2_0_test(void) {
"endif\n",
{0xfffe0200, 0x01000028, 0xede40800, 0x0000002a, 0x0000002b, 0x0000ffff}
},
{ /* shader 28 */
"vs_2_0\n"
"call l3\n"
"ret\n"
"label l3\n"
"ret\n",
{0xfffe0200, 0x01000019, 0xa0e41003, 0x0000001c, 0x0100001e, 0xa0e41003, 0x0000001c, 0x0000ffff}
},
};
exec_tests("vs_2_0", tests, sizeof(tests) / sizeof(tests[0]));
......@@ -1467,8 +1475,8 @@ START_TEST(asm)
todo_wine vs_1_1_test();
todo_wine ps_1_3_test();
todo_wine ps_1_4_test();
todo_wine vs_2_0_test();
todo_wine vs_2_x_test();
vs_2_0_test();
vs_2_x_test();
todo_wine ps_2_0_test();
todo_wine ps_2_x_test();
vs_3_0_test();
......
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