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
48839898
Commit
48839898
authored
Sep 30, 2023
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10/effect: Add support for 'dot' instruction.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
dc91367d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
effect.c
dlls/d3d10/effect.c
+31
-2
effect.c
dlls/d3d10/tests/effect.c
+0
-0
No files found.
dlls/d3d10/effect.c
View file @
48839898
...
...
@@ -621,10 +621,37 @@ static void pres_movc(float **args, unsigned int n, const struct preshader_instr
retval
[
i
]
=
arg1
[
i
]
?
arg2
[
i
]
:
arg3
[
i
];
}
static
void
pres_dot
(
float
**
args
,
unsigned
int
n
,
const
struct
preshader_instr
*
instr
)
{
float
*
retval
=
args
[
2
];
unsigned
int
i
;
*
retval
=
0
.
0
f
;
for
(
i
=
0
;
i
<
instr
->
comp_count
;
++
i
)
*
retval
+=
args
[
0
][
instr
->
scalar
?
0
:
i
]
*
args
[
1
][
i
];
}
static
void
pres_dotswiz
(
float
**
args
,
unsigned
int
n
,
const
struct
preshader_instr
*
instr
)
{
float
*
retval
=
args
[
--
n
];
unsigned
int
i
;
*
retval
=
0
.
0
f
;
if
(
n
!=
6
&&
n
!=
8
&&
instr
->
comp_count
==
1
)
{
WARN
(
"Unexpected argument count %u, or component count %u.
\n
"
,
n
,
instr
->
comp_count
);
return
;
}
for
(
i
=
0
;
i
<
n
/
2
;
++
i
)
*
retval
+=
args
[
i
][
0
]
*
args
[
i
+
n
/
2
][
0
];
}
struct
preshader_op_info
{
int
opcode
;
char
name
[
8
];
char
name
[
16
];
pres_op_func
func
;
};
...
...
@@ -667,6 +694,8 @@ static const struct preshader_op_info preshader_ops[] =
{
0x230
,
"and"
,
pres_and
},
{
0x233
,
"xor"
,
pres_xor
},
{
0x301
,
"movc"
,
pres_movc
},
{
0x500
,
"dot"
,
pres_dot
},
{
0x70e
,
"d3ds_dotswiz"
,
pres_dotswiz
},
};
static
int
__cdecl
preshader_op_compare
(
const
void
*
a
,
const
void
*
b
)
...
...
@@ -788,7 +817,7 @@ static HRESULT d3d10_effect_preshader_eval(struct d3d10_effect_preshader *p)
unsigned
int
i
,
j
,
regt
,
offset
,
instr_count
,
arg_count
;
const
DWORD
*
ip
=
ID3D10Blob_GetBufferPointer
(
p
->
code
);
struct
preshader_instr
ins
;
float
*
dst
,
*
args
[
4
];
float
*
dst
,
*
args
[
9
];
dst
=
d3d10_effect_preshader_get_reg_ptr
(
p
,
D3D10_REG_TABLE_RESULT
,
0
);
memset
(
dst
,
0
,
sizeof
(
float
)
*
p
->
reg_tables
[
D3D10_REG_TABLE_RESULT
].
count
);
...
...
dlls/d3d10/tests/effect.c
View file @
48839898
This diff is collapsed.
Click to expand it.
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