Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
949eca40
Commit
949eca40
authored
Jul 20, 2010
by
Matteo Bruni
Committed by
Alexandre Julliard
Jul 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Add shift modifiers parsing to the shader assembler.
parent
4c5954ea
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
2 deletions
+66
-2
asmparser.c
dlls/d3dx9_36/asmparser.c
+2
-1
asmshader.l
dlls/d3dx9_36/asmshader.l
+5
-0
asmshader.y
dlls/d3dx9_36/asmshader.y
+36
-1
asmutils.c
dlls/d3dx9_36/asmutils.c
+22
-0
d3dx9_36_private.h
dlls/d3dx9_36/d3dx9_36_private.h
+1
-0
No files found.
dlls/d3dx9_36/asmparser.c
View file @
949eca40
...
...
@@ -232,8 +232,9 @@ static void asmparser_instr(struct asm_parser *This, DWORD opcode,
if
(
!
This
->
shader
)
return
;
TRACE_
(
parsed_shader
)(
"%s%s%s "
,
debug_print_opcode
(
opcode
),
TRACE_
(
parsed_shader
)(
"%s%s%s
%s
"
,
debug_print_opcode
(
opcode
),
debug_print_dstmod
(
mod
),
debug_print_shift
(
shift
),
debug_print_comp
(
comp
));
if
(
dst
)
{
TRACE_
(
parsed_shader
)(
"%s"
,
debug_print_dstreg
(
dst
));
...
...
dlls/d3dx9_36/asmshader.l
View file @
949eca40
...
...
@@ -276,6 +276,11 @@ ps_3_0 {return VER_PS30; }
/* Output modifiers */
\_x2 {return SHIFT_X2; }
\_x4 {return SHIFT_X4; }
\_x8 {return SHIFT_X8; }
\_d2 {return SHIFT_D2; }
\_d4 {return SHIFT_D4; }
\_d8 {return SHIFT_D8; }
\_sat {return MOD_SAT; }
\_pp {return MOD_PP; }
\_centroid {return MOD_CENTROID; }
...
...
dlls/d3dx9_36/asmshader.y
View file @
949eca40
...
...
@@ -199,6 +199,11 @@ void set_rel_reg(struct shader_reg *reg, struct rel_reg *rel) {
/* Output modifiers */
%token SHIFT_X2
%token SHIFT_X4
%token SHIFT_X8
%token SHIFT_D2
%token SHIFT_D4
%token SHIFT_D8
%token MOD_SAT
%token MOD_PP
%token MOD_CENTROID
...
...
@@ -1045,7 +1050,37 @@ omods: /* Empty */
}
}
omodifier: MOD_SAT
omodifier: SHIFT_X2
{
$$.mod = 0;
$$.shift = 1;
}
| SHIFT_X4
{
$$.mod = 0;
$$.shift = 2;
}
| SHIFT_X8
{
$$.mod = 0;
$$.shift = 3;
}
| SHIFT_D2
{
$$.mod = 0;
$$.shift = 15;
}
| SHIFT_D4
{
$$.mod = 0;
$$.shift = 14;
}
| SHIFT_D8
{
$$.mod = 0;
$$.shift = 13;
}
| MOD_SAT
{
$$.mod = BWRITERSPDM_SATURATE;
$$.shift = 0;
...
...
dlls/d3dx9_36/asmutils.c
View file @
949eca40
...
...
@@ -274,6 +274,28 @@ const char *debug_print_dstmod(DWORD mod) {
}
}
const
char
*
debug_print_shift
(
DWORD
shift
)
{
static
const
char
*
const
shiftstrings
[]
=
{
""
,
"_x2"
,
"_x4"
,
"_x8"
,
"_x16"
,
"_x32"
,
""
,
""
,
""
,
""
,
""
,
""
,
"_d16"
,
"_d8"
,
"_d4"
,
"_d2"
,
};
return
shiftstrings
[
shift
];
}
static
const
char
*
get_regname
(
const
struct
shader_reg
*
reg
)
{
switch
(
reg
->
type
)
{
case
BWRITERSPR_TEMP
:
...
...
dlls/d3dx9_36/d3dx9_36_private.h
View file @
949eca40
...
...
@@ -400,6 +400,7 @@ struct bc_writer {
/* Debug utility routines */
const
char
*
debug_print_srcmod
(
DWORD
mod
);
const
char
*
debug_print_dstmod
(
DWORD
mod
);
const
char
*
debug_print_shift
(
DWORD
shift
);
const
char
*
debug_print_dstreg
(
const
struct
shader_reg
*
reg
);
const
char
*
debug_print_srcreg
(
const
struct
shader_reg
*
reg
);
const
char
*
debug_print_swizzle
(
DWORD
swizzle
);
...
...
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