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
b996a969
Commit
b996a969
authored
Aug 30, 2022
by
Matteo Bruni
Committed by
Alexandre Julliard
Aug 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx10/tests: Add a test for D3DX10PreprocessShaderFromMemory().
parent
8ffbd56a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
d3dx10.c
dlls/d3dx10_43/tests/d3dx10.c
+35
-0
No files found.
dlls/d3dx10_43/tests/d3dx10.c
View file @
b996a969
...
...
@@ -3958,6 +3958,40 @@ static void test_create_effect_from_resource(void)
ok
(
!
refcount
,
"Unexpected refcount.
\n
"
);
}
static
void
test_preprocess_shader
(
void
)
{
static
const
char
shader_source
[]
=
"float4 main()
\n
"
"{
\n
"
" return float4(1.0);
\n
"
"}
\n
"
;
ID3D10Blob
*
preprocessed
,
*
errors
;
HRESULT
hr
,
hr2
;
hr2
=
0xdeadbeef
;
hr
=
D3DX10PreprocessShaderFromMemory
(
NULL
,
0
,
NULL
,
NULL
,
NULL
,
NULL
,
&
preprocessed
,
&
errors
,
&
hr2
);
ok
(
hr
==
E_FAIL
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr2
==
0xdeadbeef
,
"Unexpected hr2 %#lx.
\n
"
,
hr2
);
hr2
=
0xdeadbeef
;
hr
=
D3DX10PreprocessShaderFromMemory
(
shader_source
,
strlen
(
shader_source
),
NULL
,
NULL
,
NULL
,
NULL
,
&
preprocessed
,
&
errors
,
NULL
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!!
preprocessed
,
"Unexpected preprocessed %p.
\n
"
,
preprocessed
);
ok
(
!
errors
,
"Unexpected errors %p.
\n
"
,
errors
);
ID3D10Blob_Release
(
preprocessed
);
hr2
=
0xdeadbeef
;
hr
=
D3DX10PreprocessShaderFromMemory
(
shader_source
,
strlen
(
shader_source
),
NULL
,
NULL
,
NULL
,
NULL
,
&
preprocessed
,
&
errors
,
&
hr2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
hr2
,
"Unexpected hr2 %#lx.
\n
"
,
hr2
);
ok
(
!!
preprocessed
,
"Unexpected preprocessed %p.
\n
"
,
preprocessed
);
ok
(
!
errors
,
"Unexpected errors %p.
\n
"
,
errors
);
ID3D10Blob_Release
(
preprocessed
);
}
START_TEST
(
d3dx10
)
{
test_D3DX10UnsetAllDeviceObjects
();
...
...
@@ -3972,4 +4006,5 @@ START_TEST(d3dx10)
test_font
();
test_sprite
();
test_create_effect_from_resource
();
test_preprocess_shader
();
}
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