Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
d567a030
Commit
d567a030
authored
Jul 21, 2010
by
Matteo Bruni
Committed by
Alexandre Julliard
Jul 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Shader assembler <= ps_1_3 support.
parent
8ce3ecea
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
10 deletions
+58
-10
asmparser.c
dlls/d3dx9_36/asmparser.c
+0
-0
asmshader.y
dlls/d3dx9_36/asmshader.y
+4
-8
bytecodewriter.c
dlls/d3dx9_36/bytecodewriter.c
+0
-0
d3dx9_36_private.h
dlls/d3dx9_36/d3dx9_36_private.h
+10
-0
asm.c
dlls/d3dx9_36/tests/asm.c
+44
-2
No files found.
dlls/d3dx9_36/asmparser.c
View file @
d567a030
This diff is collapsed.
Click to expand it.
dlls/d3dx9_36/asmshader.y
View file @
d567a030
...
...
@@ -329,26 +329,22 @@ version_marker: VER_VS10
| VER_PS10
{
TRACE("Pixel shader 1.0\n");
set_parse_status(&asm_ctx, PARSE_ERR);
YYABORT;
create_ps10_parser(&asm_ctx);
}
| VER_PS11
{
TRACE("Pixel shader 1.1\n");
set_parse_status(&asm_ctx, PARSE_ERR);
YYABORT;
create_ps11_parser(&asm_ctx);
}
| VER_PS12
{
TRACE("Pixel shader 1.2\n");
set_parse_status(&asm_ctx, PARSE_ERR);
YYABORT;
create_ps12_parser(&asm_ctx);
}
| VER_PS13
{
TRACE("Pixel shader 1.3\n");
set_parse_status(&asm_ctx, PARSE_ERR);
YYABORT;
create_ps13_parser(&asm_ctx);
}
| VER_PS14
{
...
...
dlls/d3dx9_36/bytecodewriter.c
View file @
d567a030
This diff is collapsed.
Click to expand it.
dlls/d3dx9_36/d3dx9_36_private.h
View file @
d567a030
...
...
@@ -323,6 +323,10 @@ void create_vs11_parser(struct asm_parser *ret);
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_ps10_parser
(
struct
asm_parser
*
ret
);
void
create_ps11_parser
(
struct
asm_parser
*
ret
);
void
create_ps12_parser
(
struct
asm_parser
*
ret
);
void
create_ps13_parser
(
struct
asm_parser
*
ret
);
void
create_ps14_parser
(
struct
asm_parser
*
ret
);
void
create_ps20_parser
(
struct
asm_parser
*
ret
);
void
create_ps2x_parser
(
struct
asm_parser
*
ret
);
...
...
@@ -639,6 +643,12 @@ typedef enum _BWRITERDECLUSAGE {
BWRITERDECLUSAGE_SAMPLE
}
BWRITERDECLUSAGE
;
/* ps 1.x texture registers mappings */
#define T0_REG 2
#define T1_REG 3
#define T2_REG 4
#define T3_REG 5
struct
bwriter_shader
*
SlAssembleShader
(
const
char
*
text
,
char
**
messages
);
DWORD
SlWriteBytecode
(
const
struct
bwriter_shader
*
shader
,
int
dxversion
,
DWORD
**
result
);
void
SlDeleteShader
(
struct
bwriter_shader
*
shader
);
...
...
dlls/d3dx9_36/tests/asm.c
View file @
d567a030
...
...
@@ -132,6 +132,11 @@ static void ps_1_1_test(void) {
{
0xffff0101
,
0x00000042
,
0xb00f0000
,
0x00000002
,
0x80070000
,
0x80e40000
,
0x80e40001
,
0x40000001
,
0x80080000
,
0xb0e40000
,
0x0000ffff
}
},
{
/* shader 1 */
"ps.1.1
\n
"
"mov_d4 r0, r1
\n
"
,
{
0xffff0101
,
0x00000001
,
0x8e0f0000
,
0x80e40001
,
0x0000ffff
}
},
};
exec_tests
(
"ps_1_1"
,
tests
,
sizeof
(
tests
)
/
sizeof
(
tests
[
0
]));
...
...
@@ -478,6 +483,43 @@ static void ps_1_3_test(void) {
"mov_x4_sat r0.a, -r1_bx2.a
\n
"
,
{
0xffff0103
,
0x00000001
,
0x82180000
,
0x85ff0001
,
0x0000ffff
}
},
{
/* shader 30 */
"ps_1_3
\n
"
"texcoord_x2 t0
\n
"
,
{
0xffff0103
,
0x00000040
,
0xb10f0000
,
0x0000ffff
}
},
{
/* shader 31 */
"ps_1_3
\n
"
"tex_x2 t0
\n
"
,
{
0xffff0103
,
0x00000042
,
0xb10f0000
,
0x0000ffff
}
},
{
/* shader 32 */
"ps_1_3
\n
"
"texreg2ar_x4 t0, t1
\n
"
,
{
0xffff0103
,
0x00000045
,
0xb20f0000
,
0xb0e40001
,
0x0000ffff
}
},
{
/* shader 33 */
"ps_1_3
\n
"
"texbem_d4 t1, t0
\n
"
,
{
0xffff0103
,
0x00000043
,
0xbe0f0001
,
0xb0e40000
,
0x0000ffff
}
},
{
/* shader 34 */
"ps_1_3
\n
"
"tex t0
\n
"
"texm3x3pad_x2 t1, t0
\n
"
"texm3x3pad_x2 t2, t0
\n
"
"texm3x3tex_x2 t3, t0
\n
"
,
{
0xffff0103
,
0x00000042
,
0xb00f0000
,
0x00000049
,
0xb10f0001
,
0xb0e40000
,
0x00000049
,
0xb10f0002
,
0xb0e40000
,
0x0000004a
,
0xb10f0003
,
0xb0e40000
,
0x0000ffff
}
},
{
/* shader 35 */
"ps_1_3
\n
"
"tex t0
\n
"
"texdp3tex_x8 t1, t0
\n
"
,
{
0xffff0103
,
0x00000042
,
0xb00f0000
,
0x00000053
,
0xb30f0001
,
0xb0e40000
,
0x0000ffff
}
},
};
exec_tests
(
"ps_1_3"
,
tests
,
sizeof
(
tests
)
/
sizeof
(
tests
[
0
]));
...
...
@@ -1661,9 +1703,9 @@ static void assembleshader_test(void) {
START_TEST
(
asm
)
{
preproc_test
();
todo_wine
ps_1_1_test
();
ps_1_1_test
();
vs_1_1_test
();
todo_wine
ps_1_3_test
();
ps_1_3_test
();
ps_1_4_test
();
vs_2_0_test
();
vs_2_x_test
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment