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
e2e1ac2b
Commit
e2e1ac2b
authored
May 04, 2015
by
Henri Verbeet
Committed by
Alexandre Julliard
May 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm/tests: Release the material after a GetGroupMaterial() call in test_MeshBuilder() (Valgrind).
parent
e723d2a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
15 deletions
+13
-15
d3drm.c
dlls/d3drm/tests/d3drm.c
+13
-15
No files found.
dlls/d3drm/tests/d3drm.c
View file @
e2e1ac2b
...
...
@@ -447,21 +447,19 @@ static void test_MeshBuilder(void)
hr
=
IDirect3DRMMesh_GetGroupMaterial
(
mesh
,
0
,
&
material
);
ok
(
hr
==
D3DRM_OK
,
"GetCroupMaterial failed returning hr = %x
\n
"
,
hr
);
ok
(
material
!=
NULL
,
"No material present
\n
"
);
if
((
hr
==
D3DRM_OK
)
&&
material
)
{
hr
=
IDirect3DRMMaterial_GetEmissive
(
material
,
&
values
[
0
],
&
values
[
1
],
&
values
[
2
]);
ok
(
hr
==
D3DRM_OK
,
"GetMaterialEmissive failed returning hr = %x
\n
"
,
hr
);
ok
(
values
[
0
]
==
0
.
5
f
,
"Emissive red component should be %f instead of %f
\n
"
,
0
.
5
f
,
values
[
0
]);
ok
(
values
[
1
]
==
0
.
5
f
,
"Emissive green component should be %f instead of %f
\n
"
,
0
.
5
f
,
values
[
1
]);
ok
(
values
[
2
]
==
0
.
5
f
,
"Emissive blue component should be %f instead of %f
\n
"
,
0
.
5
f
,
values
[
2
]);
hr
=
IDirect3DRMMaterial_GetSpecular
(
material
,
&
values
[
0
],
&
values
[
1
],
&
values
[
2
]);
ok
(
hr
==
D3DRM_OK
,
"GetMaterialEmissive failed returning hr = %x
\n
"
,
hr
);
ok
(
values
[
0
]
==
1
.
0
f
,
"Specular red component should be %f instead of %f
\n
"
,
1
.
0
f
,
values
[
0
]);
ok
(
values
[
1
]
==
0
.
0
f
,
"Specular green component should be %f instead of %f
\n
"
,
0
.
0
f
,
values
[
1
]);
ok
(
values
[
2
]
==
0
.
0
f
,
"Specular blue component should be %f instead of %f
\n
"
,
0
.
0
f
,
values
[
2
]);
values
[
0
]
=
IDirect3DRMMaterial_GetPower
(
material
);
ok
(
values
[
0
]
==
30
.
0
f
,
"Power value should be %f instead of %f
\n
"
,
30
.
0
f
,
values
[
0
]);
}
hr
=
IDirect3DRMMaterial_GetEmissive
(
material
,
&
values
[
0
],
&
values
[
1
],
&
values
[
2
]);
ok
(
hr
==
D3DRM_OK
,
"Failed to get emissive color, hr %#x.
\n
"
,
hr
);
ok
(
values
[
0
]
==
0
.
5
f
,
"Got unexpected red component %.8e.
\n
"
,
values
[
0
]);
ok
(
values
[
1
]
==
0
.
5
f
,
"Got unexpected green component %.8e.
\n
"
,
values
[
1
]);
ok
(
values
[
2
]
==
0
.
5
f
,
"Got unexpected blue component %.8e.
\n
"
,
values
[
2
]);
hr
=
IDirect3DRMMaterial_GetSpecular
(
material
,
&
values
[
0
],
&
values
[
1
],
&
values
[
2
]);
ok
(
hr
==
D3DRM_OK
,
"Failed to get specular color, hr %#x.
\n
"
,
hr
);
ok
(
values
[
0
]
==
1
.
0
f
,
"Got unexpected red component %.8e.
\n
"
,
values
[
0
]);
ok
(
values
[
1
]
==
0
.
0
f
,
"Got unexpected green component %.8e.
\n
"
,
values
[
1
]);
ok
(
values
[
2
]
==
0
.
0
f
,
"Got unexpected blue component %.8e.
\n
"
,
values
[
2
]);
values
[
0
]
=
IDirect3DRMMaterial_GetPower
(
material
);
ok
(
values
[
0
]
==
30
.
0
f
,
"Got unexpected power value %.8e.
\n
"
,
values
[
0
]);
IDirect3DRMMaterial_Release
(
material
);
IDirect3DRMMesh_Release
(
mesh
);
}
...
...
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