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
850660ad
Commit
850660ad
authored
Mar 28, 2024
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 28, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10/tests: Add a test for effect compilation containing empty buffers.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
36a4e5c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
2 deletions
+56
-2
effect.c
dlls/d3d10/tests/effect.c
+56
-2
No files found.
dlls/d3d10/tests/effect.c
View file @
850660ad
...
...
@@ -9877,7 +9877,15 @@ static void test_effect_fx_4_1_blend_state(void)
static
void
test_effect_compiler
(
void
)
{
static
char
empty_effect
[]
=
"technique10 {};"
;
static
char
empty_effect
[]
=
"technique10 {};"
;
static
char
empty_buffer
[]
=
"cbuffer cb1 { float4 m1; }
\n
"
"cbuffer cb2 { }
\n
"
"technique10 {};"
;
D3D10_EFFECT_VARIABLE_DESC
var_desc
;
ID3D10EffectConstantBuffer
*
cb
;
D3D10_EFFECT_DESC
desc
;
ID3D10Device
*
device
;
ID3D10Effect
*
effect
;
...
...
@@ -9899,10 +9907,56 @@ static void test_effect_compiler(void)
hr
=
ID3D10Effect_GetDesc
(
effect
,
&
desc
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
desc
.
Techniques
==
1
,
"Unexpected technique count %u.
\n
"
,
desc
.
Techniques
);
todo_wine
ok
(
desc
.
ConstantBuffers
==
1
,
"Unexpected buffer count %u.
\n
"
,
desc
.
ConstantBuffers
);
cb
=
effect
->
lpVtbl
->
GetConstantBufferByIndex
(
effect
,
0
);
hr
=
cb
->
lpVtbl
->
GetDesc
(
cb
,
&
var_desc
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
ok
(
!
strcmp
(
var_desc
.
Name
,
"$Globals"
),
"Unexpected variable name %s.
\n
"
,
var_desc
.
Name
);
ID3D10Effect_Release
(
effect
);
ID3D10Blob_Release
(
blob
);
ID3D10Device_Release
(
device
);
/* Empty user buffers. */
hr
=
D3D10CompileEffectFromMemory
(
empty_buffer
,
sizeof
(
empty_buffer
),
NULL
,
NULL
,
NULL
,
0
,
0
,
&
blob
,
NULL
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
create_effect
(
ID3D10Blob_GetBufferPointer
(
blob
),
0
,
device
,
NULL
,
&
effect
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
ID3D10Effect_GetDesc
(
effect
,
&
desc
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
desc
.
Techniques
==
1
,
"Unexpected technique count %u.
\n
"
,
desc
.
Techniques
);
todo_wine
ok
(
desc
.
ConstantBuffers
==
3
,
"Unexpected buffer count %u.
\n
"
,
desc
.
ConstantBuffers
);
cb
=
effect
->
lpVtbl
->
GetConstantBufferByIndex
(
effect
,
0
);
hr
=
cb
->
lpVtbl
->
GetDesc
(
cb
,
&
var_desc
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
strcmp
(
var_desc
.
Name
,
"$Globals"
),
"Unexpected variable name %s.
\n
"
,
var_desc
.
Name
);
cb
=
effect
->
lpVtbl
->
GetConstantBufferByIndex
(
effect
,
1
);
hr
=
cb
->
lpVtbl
->
GetDesc
(
cb
,
&
var_desc
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
ok
(
!
strcmp
(
var_desc
.
Name
,
"cb1"
),
"Unexpected variable name %s.
\n
"
,
var_desc
.
Name
);
cb
=
effect
->
lpVtbl
->
GetConstantBufferByIndex
(
effect
,
2
);
hr
=
cb
->
lpVtbl
->
GetDesc
(
cb
,
&
var_desc
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
ok
(
!
strcmp
(
var_desc
.
Name
,
"cb2"
),
"Unexpected variable name %s.
\n
"
,
var_desc
.
Name
);
ID3D10Effect_Release
(
effect
);
ID3D10Blob_Release
(
blob
);
ID3D10Device_Release
(
device
);
}
START_TEST
(
effect
)
...
...
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