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
558cc750
Commit
558cc750
authored
Jan 16, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: Add a small test for CreateTexture2D().
parent
bd9320f8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
device.c
dlls/d3d10core/tests/device.c
+48
-0
No files found.
dlls/d3d10core/tests/device.c
View file @
558cc750
...
@@ -93,6 +93,53 @@ static void test_device_interfaces(ID3D10Device *device)
...
@@ -93,6 +93,53 @@ static void test_device_interfaces(ID3D10Device *device)
ok
(
SUCCEEDED
(
hr
),
"ID3D10Device does not implement ID3D10Device
\n
"
);
ok
(
SUCCEEDED
(
hr
),
"ID3D10Device does not implement ID3D10Device
\n
"
);
}
}
static
void
test_create_texture
(
ID3D10Device
*
device
)
{
D3D10_TEXTURE2D_DESC
desc
;
ID3D10Texture2D
*
texture
;
IDXGISurface
*
surface
;
HRESULT
hr
;
desc
.
Width
=
512
;
desc
.
Height
=
512
;
desc
.
MipLevels
=
1
;
desc
.
ArraySize
=
1
;
desc
.
Format
=
DXGI_FORMAT_R8G8B8A8_UNORM
;
desc
.
SampleDesc
.
Count
=
1
;
desc
.
SampleDesc
.
Quality
=
0
;
desc
.
Usage
=
D3D10_USAGE_DEFAULT
;
desc
.
BindFlags
=
D3D10_BIND_RENDER_TARGET
;
desc
.
CPUAccessFlags
=
0
;
desc
.
MiscFlags
=
0
;
hr
=
ID3D10Device_CreateTexture2D
(
device
,
&
desc
,
NULL
,
&
texture
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create a 2d texture, hr %#x
\n
"
,
hr
);
hr
=
ID3D10Texture2D_QueryInterface
(
texture
,
&
IID_IDXGISurface
,
(
void
**
)
&
surface
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Texture should implement IDXGISurface
\n
"
);
if
(
SUCCEEDED
(
hr
))
IDXGISurface_Release
(
surface
);
ID3D10Texture2D_Release
(
texture
);
desc
.
MipLevels
=
0
;
hr
=
ID3D10Device_CreateTexture2D
(
device
,
&
desc
,
NULL
,
&
texture
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create a 2d texture, hr %#x
\n
"
,
hr
);
hr
=
ID3D10Texture2D_QueryInterface
(
texture
,
&
IID_IDXGISurface
,
(
void
**
)
&
surface
);
ok
(
FAILED
(
hr
),
"Texture should not implement IDXGISurface
\n
"
);
if
(
SUCCEEDED
(
hr
))
IDXGISurface_Release
(
surface
);
ID3D10Texture2D_Release
(
texture
);
desc
.
MipLevels
=
1
;
desc
.
ArraySize
=
2
;
hr
=
ID3D10Device_CreateTexture2D
(
device
,
&
desc
,
NULL
,
&
texture
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create a 2d texture, hr %#x
\n
"
,
hr
);
hr
=
ID3D10Texture2D_QueryInterface
(
texture
,
&
IID_IDXGISurface
,
(
void
**
)
&
surface
);
ok
(
FAILED
(
hr
),
"Texture should not implement IDXGISurface
\n
"
);
if
(
SUCCEEDED
(
hr
))
IDXGISurface_Release
(
surface
);
ID3D10Texture2D_Release
(
texture
);
}
START_TEST
(
device
)
START_TEST
(
device
)
{
{
ID3D10Device
*
device
;
ID3D10Device
*
device
;
...
@@ -106,6 +153,7 @@ START_TEST(device)
...
@@ -106,6 +153,7 @@ START_TEST(device)
}
}
test_device_interfaces
(
device
);
test_device_interfaces
(
device
);
test_create_texture
(
device
);
refcount
=
ID3D10Device_Release
(
device
);
refcount
=
ID3D10Device_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
...
...
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