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
8c7ffd67
Commit
8c7ffd67
authored
Nov 16, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9_36/tests: Introduce union to help passing float values in DWORD.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
parent
85900230
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
26 deletions
+31
-26
effect.c
dlls/d3dx9_36/tests/effect.c
+31
-26
No files found.
dlls/d3dx9_36/tests/effect.c
View file @
8c7ffd67
...
...
@@ -5465,6 +5465,11 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device)
HRESULT
hr
;
D3DXHANDLE
param
;
unsigned
int
i
,
passes_count
,
value
;
union
{
DWORD
dw
;
float
f
;
}
float_value
;
int
ivect
[
4
];
D3DXVECTOR4
fvect
;
IDirect3DVertexShader9
*
vshader
;
...
...
@@ -5626,14 +5631,14 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device)
test_effect_preshader_compare_vconsts
(
device
,
check_vconsts_parameters
[
7
].
const_updated_mask
,
check_vconsts_parameters
[
7
].
param_name
);
*
(
float
*
)
&
value
=
9999
.
0
f
;
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_FOGDENSITY
,
value
);
float_value
.
f
=
9999
.
0
f
;
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_FOGDENSITY
,
float_value
.
dw
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_FOGSTART
,
value
);
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_FOGSTART
,
float_value
.
dw
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_POINTSCALE_A
,
value
);
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_POINTSCALE_A
,
float_value
.
dw
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_POINTSCALE_B
,
value
);
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_POINTSCALE_B
,
float_value
.
dw
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
test_effect_clear_vconsts
(
device
);
param
=
effect
->
lpVtbl
->
GetParameterByName
(
effect
,
NULL
,
"ts2"
);
...
...
@@ -5648,29 +5653,29 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device)
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
hr
=
effect
->
lpVtbl
->
CommitChanges
(
effect
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_GetRenderState
(
device
,
D3DRS_FOGDENSITY
,
&
value
);
hr
=
IDirect3DDevice9_GetRenderState
(
device
,
D3DRS_FOGDENSITY
,
&
float_value
.
dw
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
ok
(
value
==
0
,
"Unexpected fog density %g.
\n
"
,
*
(
float
*
)
&
value
);
hr
=
IDirect3DDevice9_GetRenderState
(
device
,
D3DRS_FOGSTART
,
&
value
);
ok
(
float_value
.
f
==
0
,
"Unexpected fog density %g.
\n
"
,
float_value
.
f
);
hr
=
IDirect3DDevice9_GetRenderState
(
device
,
D3DRS_FOGSTART
,
&
float_value
.
dw
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
ok
(
*
(
float
*
)
&
value
==
4
.
0
f
,
"Unexpected fog start %g.
\n
"
,
*
(
float
*
)
&
value
);
hr
=
IDirect3DDevice9_GetRenderState
(
device
,
D3DRS_POINTSCALE_A
,
&
value
);
ok
(
float_value
.
f
==
4
.
0
f
,
"Unexpected fog start %g.
\n
"
,
float_value
.
f
);
hr
=
IDirect3DDevice9_GetRenderState
(
device
,
D3DRS_POINTSCALE_A
,
&
float_value
.
dw
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
ok
(
*
(
float
*
)
&
value
==
9999
.
0
f
,
"Unexpected point scale A %g.
\n
"
,
*
(
float
*
)
&
value
);
hr
=
IDirect3DDevice9_GetRenderState
(
device
,
D3DRS_POINTSCALE_B
,
&
value
);
ok
(
float_value
.
f
==
9999
.
0
f
,
"Unexpected point scale A %g.
\n
"
,
float_value
.
f
);
hr
=
IDirect3DDevice9_GetRenderState
(
device
,
D3DRS_POINTSCALE_B
,
&
float_value
.
dw
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
ok
(
*
(
float
*
)
&
value
==
9999
.
0
f
,
"Unexpected point scale B %g.
\n
"
,
*
(
float
*
)
&
value
);
ok
(
float_value
.
f
==
9999
.
0
f
,
"Unexpected point scale B %g.
\n
"
,
float_value
.
f
);
test_effect_preshader_compare_vconsts
(
device
,
check_vconsts_parameters
[
8
].
const_updated_mask
,
check_vconsts_parameters
[
8
].
param_name
);
*
(
float
*
)
&
value
=
9999
.
0
f
;
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_FOGDENSITY
,
value
);
float_value
.
f
=
9999
.
0
f
;
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_FOGDENSITY
,
float_value
.
dw
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_FOGSTART
,
value
);
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_FOGSTART
,
float_value
.
dw
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_POINTSCALE_A
,
value
);
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_POINTSCALE_A
,
float_value
.
dw
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_POINTSCALE_B
,
value
);
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_POINTSCALE_B
,
float_value
.
dw
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
test_effect_clear_vconsts
(
device
);
param
=
effect
->
lpVtbl
->
GetParameterByName
(
effect
,
NULL
,
"ts3"
);
...
...
@@ -5687,18 +5692,18 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device)
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
hr
=
effect
->
lpVtbl
->
CommitChanges
(
effect
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_GetRenderState
(
device
,
D3DRS_FOGDENSITY
,
&
value
);
hr
=
IDirect3DDevice9_GetRenderState
(
device
,
D3DRS_FOGDENSITY
,
&
float_value
.
dw
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
ok
(
*
(
float
*
)
&
value
==
9999
.
0
f
,
"Unexpected fog density %g.
\n
"
,
*
(
float
*
)
&
value
);
hr
=
IDirect3DDevice9_GetRenderState
(
device
,
D3DRS_FOGSTART
,
&
value
);
ok
(
float_value
.
f
==
9999
.
0
f
,
"Unexpected fog density %g.
\n
"
,
float_value
.
f
);
hr
=
IDirect3DDevice9_GetRenderState
(
device
,
D3DRS_FOGSTART
,
&
float_value
.
dw
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
ok
(
*
(
float
*
)
&
value
==
9999
.
0
f
,
"Unexpected fog start %g.
\n
"
,
*
(
float
*
)
&
value
);
hr
=
IDirect3DDevice9_GetRenderState
(
device
,
D3DRS_POINTSCALE_A
,
&
value
);
ok
(
float_value
.
f
==
9999
.
0
f
,
"Unexpected fog start %g.
\n
"
,
float_value
.
f
);
hr
=
IDirect3DDevice9_GetRenderState
(
device
,
D3DRS_POINTSCALE_A
,
&
float_value
.
dw
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
ok
(
*
(
float
*
)
&
value
==
4
.
0
f
,
"Unexpected point scale A %g.
\n
"
,
*
(
float
*
)
&
value
);
hr
=
IDirect3DDevice9_GetRenderState
(
device
,
D3DRS_POINTSCALE_B
,
&
value
);
ok
(
float_value
.
f
==
4
.
0
f
,
"Unexpected point scale A %g.
\n
"
,
float_value
.
f
);
hr
=
IDirect3DDevice9_GetRenderState
(
device
,
D3DRS_POINTSCALE_B
,
&
float_value
.
dw
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
ok
(
*
(
float
*
)
&
value
==
12
.
0
f
,
"Unexpected point scale B %g.
\n
"
,
*
(
float
*
)
&
value
);
ok
(
float_value
.
f
==
12
.
0
f
,
"Unexpected point scale B %g.
\n
"
,
float_value
.
f
);
test_effect_preshader_compare_vconsts
(
device
,
check_vconsts_parameters
[
11
].
const_updated_mask
,
check_vconsts_parameters
[
11
].
param_name
);
...
...
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