Commit 5786d3a0 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3dx9: Shader assembler ps_2_x support.

parent ce3e846f
...@@ -328,14 +328,12 @@ version_marker: VER_VS10 ...@@ -328,14 +328,12 @@ version_marker: VER_VS10
| VER_PS20 | VER_PS20
{ {
TRACE("Pixel shader 2.0\n"); TRACE("Pixel shader 2.0\n");
set_parse_status(&asm_ctx, PARSE_ERR); create_ps20_parser(&asm_ctx);
YYABORT;
} }
| VER_PS2X | VER_PS2X
{ {
TRACE("Pixel shader 2.x\n"); TRACE("Pixel shader 2.x\n");
set_parse_status(&asm_ctx, PARSE_ERR); create_ps2x_parser(&asm_ctx);
YYABORT;
} }
| VER_PS30 | VER_PS30
{ {
......
...@@ -314,6 +314,8 @@ extern struct asm_parser asm_ctx; ...@@ -314,6 +314,8 @@ extern struct asm_parser asm_ctx;
void create_vs20_parser(struct asm_parser *ret); void create_vs20_parser(struct asm_parser *ret);
void create_vs2x_parser(struct asm_parser *ret); void create_vs2x_parser(struct asm_parser *ret);
void create_vs30_parser(struct asm_parser *ret); void create_vs30_parser(struct asm_parser *ret);
void create_ps20_parser(struct asm_parser *ret);
void create_ps2x_parser(struct asm_parser *ret);
void create_ps30_parser(struct asm_parser *ret); void create_ps30_parser(struct asm_parser *ret);
struct bwriter_shader *parse_asm_shader(char **messages); struct bwriter_shader *parse_asm_shader(char **messages);
...@@ -380,6 +382,10 @@ struct bc_writer { ...@@ -380,6 +382,10 @@ struct bc_writer {
DWORD oFog_mask; DWORD oFog_mask;
DWORD oPts_regnum; DWORD oPts_regnum;
DWORD oPts_mask; DWORD oPts_mask;
/* Pixel shader specific members */
DWORD t_regnum[8];
DWORD v_regnum[2];
}; };
/* Debug utility routines */ /* Debug utility routines */
......
...@@ -1015,6 +1015,15 @@ static void ps_2_x_test(void) { ...@@ -1015,6 +1015,15 @@ static void ps_2_x_test(void) {
{0xffff0201, 0x01000026, 0xf0e40000, 0x01000060, 0xb0ff1000, {0xffff0201, 0x01000026, 0xf0e40000, 0x01000060, 0xb0ff1000,
0x00000027, 0x0000ffff} 0x00000027, 0x0000ffff}
}, },
{ /* shader 16 */
"ps_2_x\n"
"call l2047\n"
"ret\n"
"label l2047\n"
"ret\n",
{0xffff0201, 0x01000019, 0xa0e417ff, 0x0000001c, 0x0100001e, 0xa0e417ff,
0x0000001c, 0x0000ffff}
},
}; };
exec_tests("ps_2_x", tests, sizeof(tests) / sizeof(tests[0])); exec_tests("ps_2_x", tests, sizeof(tests) / sizeof(tests[0]));
...@@ -1504,8 +1513,8 @@ START_TEST(asm) ...@@ -1504,8 +1513,8 @@ START_TEST(asm)
todo_wine ps_1_4_test(); todo_wine ps_1_4_test();
vs_2_0_test(); vs_2_0_test();
vs_2_x_test(); vs_2_x_test();
todo_wine ps_2_0_test(); ps_2_0_test();
todo_wine ps_2_x_test(); ps_2_x_test();
vs_3_0_test(); vs_3_0_test();
ps_3_0_test(); ps_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