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
854ecc77
Commit
854ecc77
authored
Nov 27, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10/effect: Add min/max instructions support for expressions.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
9a4f1bb2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
effect.c
dlls/d3d10/effect.c
+22
-1
effect.c
dlls/d3d10/tests/effect.c
+0
-0
No files found.
dlls/d3d10/effect.c
View file @
854ecc77
...
...
@@ -219,6 +219,24 @@ static void pres_ftou(float **args, unsigned int n, const struct preshader_instr
}
}
static
void
pres_min
(
float
**
args
,
unsigned
int
n
,
const
struct
preshader_instr
*
instr
)
{
float
*
retval
=
args
[
2
];
unsigned
int
i
;
for
(
i
=
0
;
i
<
instr
->
comp_count
;
++
i
)
retval
[
i
]
=
min
(
args
[
0
][
instr
->
scalar
?
0
:
i
],
args
[
1
][
i
]);
}
static
void
pres_max
(
float
**
args
,
unsigned
int
n
,
const
struct
preshader_instr
*
instr
)
{
float
*
retval
=
args
[
2
];
unsigned
int
i
;
for
(
i
=
0
;
i
<
instr
->
comp_count
;
++
i
)
retval
[
i
]
=
max
(
args
[
0
][
instr
->
scalar
?
0
:
i
],
args
[
1
][
i
]);
}
static
void
pres_add
(
float
**
args
,
unsigned
int
n
,
const
struct
preshader_instr
*
instr
)
{
float
*
retval
=
args
[
2
];
...
...
@@ -238,6 +256,8 @@ struct preshader_op_info
static
const
struct
preshader_op_info
preshader_ops
[]
=
{
{
0x133
,
"ftou"
,
pres_ftou
},
{
0x200
,
"min"
,
pres_min
},
{
0x201
,
"max"
,
pres_max
},
{
0x204
,
"add"
,
pres_add
},
};
...
...
@@ -2111,7 +2131,8 @@ static HRESULT parse_fx10_preshader_instr(struct d3d10_preshader_parse_context *
return
E_FAIL
;
}
TRACE
(
"Opcode %#x (%s), input count %u.
\n
"
,
ins
.
opcode
,
op_info
->
name
,
input_count
);
TRACE
(
"Opcode %#x (%s) (%u,%u), input count %u.
\n
"
,
ins
.
opcode
,
op_info
->
name
,
ins
.
comp_count
,
ins
.
scalar
,
input_count
);
/* Inputs + one output */
param_count
=
input_count
+
1
;
...
...
dlls/d3d10/tests/effect.c
View file @
854ecc77
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