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
129ad9cb
Commit
129ad9cb
authored
Sep 06, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: Update the MipLevels field after texture creation.
parent
1440b252
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
device.c
dlls/d3d10core/tests/device.c
+24
-0
texture.c
dlls/d3d10core/texture.c
+2
-0
No files found.
dlls/d3d10core/tests/device.c
View file @
129ad9cb
...
...
@@ -127,6 +127,19 @@ static void test_create_texture2d(ID3D10Device *device)
hr
=
ID3D10Device_CreateTexture2D
(
device
,
&
desc
,
NULL
,
&
texture
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create a 2d texture, hr %#x
\n
"
,
hr
);
ID3D10Texture2D_GetDesc
(
texture
,
&
desc
);
ok
(
desc
.
Width
==
512
,
"Got unexpected Width %u.
\n
"
,
desc
.
Width
);
ok
(
desc
.
Height
==
512
,
"Got unexpected Height %u.
\n
"
,
desc
.
Height
);
ok
(
desc
.
MipLevels
==
10
,
"Got unexpected MipLevels %u.
\n
"
,
desc
.
MipLevels
);
ok
(
desc
.
ArraySize
==
1
,
"Got unexpected ArraySize %u.
\n
"
,
desc
.
ArraySize
);
ok
(
desc
.
Format
==
DXGI_FORMAT_R8G8B8A8_UNORM
,
"Got unexpected Format %#x.
\n
"
,
desc
.
Format
);
ok
(
desc
.
SampleDesc
.
Count
==
1
,
"Got unexpected SampleDesc.Count %u.
\n
"
,
desc
.
SampleDesc
.
Count
);
ok
(
desc
.
SampleDesc
.
Quality
==
0
,
"Got unexpected SampleDesc.Quality %u.
\n
"
,
desc
.
SampleDesc
.
Quality
);
ok
(
desc
.
Usage
==
D3D10_USAGE_DEFAULT
,
"Got unexpected MipLevels %u.
\n
"
,
desc
.
Usage
);
ok
(
desc
.
BindFlags
==
D3D10_BIND_RENDER_TARGET
,
"Got unexpected BindFlags %u.
\n
"
,
desc
.
BindFlags
);
ok
(
desc
.
CPUAccessFlags
==
0
,
"Got unexpected CPUAccessFlags %u.
\n
"
,
desc
.
CPUAccessFlags
);
ok
(
desc
.
MiscFlags
==
0
,
"Got unexpected MiscFlags %u.
\n
"
,
desc
.
MiscFlags
);
hr
=
ID3D10Texture2D_QueryInterface
(
texture
,
&
IID_IDXGISurface
,
(
void
**
)
&
surface
);
ok
(
FAILED
(
hr
),
"Texture should not implement IDXGISurface
\n
"
);
if
(
SUCCEEDED
(
hr
))
IDXGISurface_Release
(
surface
);
...
...
@@ -172,6 +185,17 @@ static void test_create_texture3d(ID3D10Device *device)
hr
=
ID3D10Device_CreateTexture3D
(
device
,
&
desc
,
NULL
,
&
texture
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create a 3d texture, hr %#x.
\n
"
,
hr
);
ID3D10Texture3D_GetDesc
(
texture
,
&
desc
);
ok
(
desc
.
Width
==
64
,
"Got unexpected Width %u.
\n
"
,
desc
.
Width
);
ok
(
desc
.
Height
==
64
,
"Got unexpected Height %u.
\n
"
,
desc
.
Height
);
ok
(
desc
.
Depth
==
64
,
"Got unexpected Depth %u.
\n
"
,
desc
.
Depth
);
ok
(
desc
.
MipLevels
==
7
,
"Got unexpected MipLevels %u.
\n
"
,
desc
.
MipLevels
);
ok
(
desc
.
Format
==
DXGI_FORMAT_R8G8B8A8_UNORM
,
"Got unexpected Format %#x.
\n
"
,
desc
.
Format
);
ok
(
desc
.
Usage
==
D3D10_USAGE_DEFAULT
,
"Got unexpected MipLevels %u.
\n
"
,
desc
.
Usage
);
ok
(
desc
.
BindFlags
==
D3D10_BIND_RENDER_TARGET
,
"Got unexpected BindFlags %u.
\n
"
,
desc
.
BindFlags
);
ok
(
desc
.
CPUAccessFlags
==
0
,
"Got unexpected CPUAccessFlags %u.
\n
"
,
desc
.
CPUAccessFlags
);
ok
(
desc
.
MiscFlags
==
0
,
"Got unexpected MiscFlags %u.
\n
"
,
desc
.
MiscFlags
);
hr
=
ID3D10Texture3D_QueryInterface
(
texture
,
&
IID_IDXGISurface
,
(
void
**
)
&
surface
);
ok
(
FAILED
(
hr
),
"Texture should not implement IDXGISurface.
\n
"
);
if
(
SUCCEEDED
(
hr
))
IDXGISurface_Release
(
surface
);
...
...
dlls/d3d10core/texture.c
View file @
129ad9cb
...
...
@@ -273,6 +273,7 @@ HRESULT d3d10_texture2d_init(struct d3d10_texture2d *texture, struct d3d10_devic
IUnknown_Release
(
texture
->
dxgi_surface
);
return
hr
;
}
texture
->
desc
.
MipLevels
=
wined3d_texture_get_level_count
(
texture
->
wined3d_texture
);
return
S_OK
;
}
...
...
@@ -480,6 +481,7 @@ HRESULT d3d10_texture3d_init(struct d3d10_texture3d *texture, struct d3d10_devic
WARN
(
"Failed to create wined3d texture, hr %#x.
\n
"
,
hr
);
return
hr
;
}
texture
->
desc
.
MipLevels
=
wined3d_texture_get_level_count
(
texture
->
wined3d_texture
);
return
S_OK
;
}
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