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
8d00428e
Commit
8d00428e
authored
Mar 23, 2023
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10/effect: Handle division by zero in 'udiv'.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
a54f1726
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
effect.c
dlls/d3d10/effect.c
+1
-1
effect.c
dlls/d3d10/tests/effect.c
+20
-0
No files found.
dlls/d3d10/effect.c
View file @
8d00428e
...
...
@@ -361,7 +361,7 @@ static void pres_udiv(float **args, unsigned int n, const struct preshader_instr
for
(
i
=
0
;
i
<
instr
->
comp_count
;
++
i
)
{
unsigned
int
v
=
arg
1
[
instr
->
scalar
?
0
:
i
]
/
arg2
[
i
]
;
unsigned
int
v
=
arg
2
[
i
]
?
arg1
[
instr
->
scalar
?
0
:
i
]
/
arg2
[
i
]
:
UINT_MAX
;
retval
[
i
]
=
*
(
float
*
)
&
v
;
}
}
...
...
dlls/d3d10/tests/effect.c
View file @
8d00428e
...
...
@@ -8587,6 +8587,26 @@ static void test_effect_value_expression(void)
ok
(
blend_factor
[
3
]
==
0
.
3
f
,
"Got unexpected blend_factor[3] %.8e.
\n
"
,
blend_factor
[
3
]);
ok
(
!
sample_mask
,
"Got unexpected sample_mask %#x.
\n
"
,
sample_mask
);
/* udiv */
pass
=
t
->
lpVtbl
->
GetPassByName
(
t
,
"p9"
);
ok
(
pass
->
lpVtbl
->
IsValid
(
pass
),
"Expected valid pass.
\n
"
);
f
[
0
]
=
2
.
0
f
;
f
[
1
]
=
0
.
0
f
;
hr
=
g_var3
->
lpVtbl
->
SetFloatVector
(
g_var3
,
f
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
pass
->
lpVtbl
->
Apply
(
pass
,
0
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ID3D10Device_OMGetBlendState
(
device
,
&
blend_state
,
blend_factor
,
&
sample_mask
);
ok
(
!
blend_state
,
"Unexpected blend state %p.
\n
"
,
blend_state
);
ok
(
blend_factor
[
0
]
==
UINT_MAX
,
"Got unexpected blend_factor[0] %.8e.
\n
"
,
blend_factor
[
0
]);
ok
(
blend_factor
[
1
]
==
UINT_MAX
,
"Got unexpected blend_factor[1] %.8e.
\n
"
,
blend_factor
[
1
]);
ok
(
blend_factor
[
2
]
==
UINT_MAX
,
"Got unexpected blend_factor[2] %.8e.
\n
"
,
blend_factor
[
2
]);
ok
(
blend_factor
[
3
]
==
UINT_MAX
,
"Got unexpected blend_factor[3] %.8e.
\n
"
,
blend_factor
[
3
]);
ok
(
!
sample_mask
,
"Got unexpected sample_mask %#x.
\n
"
,
sample_mask
);
/* movc */
pass
=
t
->
lpVtbl
->
GetPassByName
(
t
,
"p10"
);
ok
(
pass
->
lpVtbl
->
IsValid
(
pass
),
"Expected valid pass.
\n
"
);
...
...
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