Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
01e278a3
Commit
01e278a3
authored
Mar 28, 2018
by
Matteo Bruni
Committed by
Alexandre Julliard
Mar 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Fix FindNextValidTechnique() when no previous technique is specified.
Signed-off-by:
Matteo Bruni
<
mbruni@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8dedf244
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
1 deletion
+60
-1
effect.c
dlls/d3dx9_36/effect.c
+4
-1
effect.c
dlls/d3dx9_36/tests/effect.c
+56
-0
No files found.
dlls/d3dx9_36/effect.c
View file @
01e278a3
...
...
@@ -4048,7 +4048,10 @@ static HRESULT WINAPI ID3DXEffectImpl_FindNextValidTechnique(ID3DXEffect *iface,
{
tech
=
&
base
->
techniques
[
i
];
if
(
tech
==
prev_tech
)
{
++
i
;
break
;
}
}
}
else
...
...
@@ -4056,7 +4059,7 @@ static HRESULT WINAPI ID3DXEffectImpl_FindNextValidTechnique(ID3DXEffect *iface,
i
=
0
;
}
for
(
++
i
;
i
<
base
->
technique_count
;
++
i
)
for
(;
i
<
base
->
technique_count
;
++
i
)
{
tech
=
&
base
->
techniques
[
i
];
if
(
SUCCEEDED
(
ID3DXEffectImpl_ValidateTechnique
(
iface
,
get_technique_handle
(
tech
))))
...
...
dlls/d3dx9_36/tests/effect.c
View file @
01e278a3
...
...
@@ -7832,6 +7832,38 @@ static void test_create_effect_from_file(void)
DestroyWindow
(
window
);
}
#if 0
technique tech0
{
pass p0
{
LightEnable[0] = FALSE;
FogEnable = FALSE;
}
}
technique tech1
{
pass p0
{
LightEnable[0] = TRUE;
FogEnable = TRUE;
}
}
#endif
static
const
DWORD
test_two_techniques_blob
[]
=
{
0xfeff0901
,
0x000000ac
,
0x00000000
,
0x00000000
,
0x00000002
,
0x00000002
,
0x00000000
,
0x00000000
,
0x00000000
,
0x00000001
,
0x00000001
,
0x00000000
,
0x00000002
,
0x00000002
,
0x00000000
,
0x00000000
,
0x00000000
,
0x00000001
,
0x00000001
,
0x00000003
,
0x00003070
,
0x00000006
,
0x68636574
,
0x00000030
,
0x00000001
,
0x00000002
,
0x00000002
,
0x00000000
,
0x00000000
,
0x00000000
,
0x00000001
,
0x00000001
,
0x00000001
,
0x00000002
,
0x00000002
,
0x00000000
,
0x00000000
,
0x00000000
,
0x00000001
,
0x00000001
,
0x00000003
,
0x00003070
,
0x00000006
,
0x68636574
,
0x00000031
,
0x00000000
,
0x00000002
,
0x00000002
,
0x00000001
,
0x0000004c
,
0x00000000
,
0x00000001
,
0x00000044
,
0x00000000
,
0x00000002
,
0x00000091
,
0x00000000
,
0x00000008
,
0x00000004
,
0x0000000e
,
0x00000000
,
0x00000028
,
0x00000024
,
0x000000a0
,
0x00000000
,
0x00000001
,
0x00000098
,
0x00000000
,
0x00000002
,
0x00000091
,
0x00000000
,
0x0000005c
,
0x00000058
,
0x0000000e
,
0x00000000
,
0x0000007c
,
0x00000078
,
0x00000000
,
0x00000000
,
};
static
void
test_effect_find_next_valid_technique
(
void
)
{
D3DPRESENT_PARAMETERS
present_parameters
=
{
0
};
...
...
@@ -7868,6 +7900,30 @@ static void test_effect_find_next_valid_technique(void)
return
;
}
hr
=
D3DXCreateEffectEx
(
device
,
test_two_techniques_blob
,
sizeof
(
test_two_techniques_blob
),
NULL
,
NULL
,
NULL
,
0
,
NULL
,
&
effect
,
NULL
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
hr
=
effect
->
lpVtbl
->
FindNextValidTechnique
(
effect
,
NULL
,
&
tech
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
hr
=
effect
->
lpVtbl
->
GetTechniqueDesc
(
effect
,
tech
,
&
desc
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
ok
(
!
strcmp
(
desc
.
Name
,
"tech0"
),
"Got unexpected technique %s.
\n
"
,
desc
.
Name
);
hr
=
effect
->
lpVtbl
->
FindNextValidTechnique
(
effect
,
tech
,
&
tech
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
hr
=
effect
->
lpVtbl
->
GetTechniqueDesc
(
effect
,
tech
,
&
desc
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
ok
(
!
strcmp
(
desc
.
Name
,
"tech1"
),
"Got unexpected technique %s.
\n
"
,
desc
.
Name
);
hr
=
effect
->
lpVtbl
->
FindNextValidTechnique
(
effect
,
tech
,
&
tech
);
ok
(
hr
==
S_FALSE
,
"Got result %#x.
\n
"
,
hr
);
hr
=
effect
->
lpVtbl
->
GetTechniqueDesc
(
effect
,
tech
,
&
desc
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
ok
(
!
strcmp
(
desc
.
Name
,
"tech0"
),
"Got unexpected technique %s.
\n
"
,
desc
.
Name
);
effect
->
lpVtbl
->
Release
(
effect
);
hr
=
D3DXCreateEffectEx
(
device
,
test_effect_unsupported_shader_blob
,
sizeof
(
test_effect_unsupported_shader_blob
),
NULL
,
NULL
,
NULL
,
0
,
NULL
,
&
effect
,
NULL
);
ok
(
hr
==
D3D_OK
,
"Got result %#x.
\n
"
,
hr
);
...
...
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