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
d17bd8d8
Commit
d17bd8d8
authored
Jul 22, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: Implement dxgi_surface_GetDesc().
parent
20ef8d29
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
7 deletions
+21
-7
texture.c
dlls/d3d10core/texture.c
+7
-1
device.c
dlls/dxgi/device.c
+1
-2
dxgi_private.h
dlls/dxgi/dxgi_private.h
+4
-1
surface.c
dlls/dxgi/surface.c
+9
-3
No files found.
dlls/d3d10core/texture.c
View file @
d17bd8d8
...
...
@@ -253,6 +253,7 @@ HRESULT d3d10_texture2d_init(struct d3d10_texture2d *texture, struct d3d10_devic
if
(
desc
->
MipLevels
==
1
&&
desc
->
ArraySize
==
1
)
{
DXGI_SURFACE_DESC
surface_desc
;
IWineDXGIDevice
*
wine_device
;
if
(
FAILED
(
hr
=
ID3D10Device1_QueryInterface
(
&
device
->
ID3D10Device1_iface
,
&
IID_IWineDXGIDevice
,
...
...
@@ -262,7 +263,12 @@ HRESULT d3d10_texture2d_init(struct d3d10_texture2d *texture, struct d3d10_devic
return
E_FAIL
;
}
hr
=
IWineDXGIDevice_create_surface
(
wine_device
,
NULL
,
0
,
NULL
,
surface_desc
.
Width
=
desc
->
Width
;
surface_desc
.
Height
=
desc
->
Height
;
surface_desc
.
Format
=
desc
->
Format
;
surface_desc
.
SampleDesc
=
desc
->
SampleDesc
;
hr
=
IWineDXGIDevice_create_surface
(
wine_device
,
&
surface_desc
,
0
,
NULL
,
(
IUnknown
*
)
&
texture
->
ID3D10Texture2D_iface
,
(
void
**
)
&
texture
->
dxgi_surface
);
IWineDXGIDevice_Release
(
wine_device
);
if
(
FAILED
(
hr
))
...
...
dlls/dxgi/device.c
View file @
d17bd8d8
...
...
@@ -276,8 +276,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_create_surface(IWineDXGIDevice *ifa
return
E_OUTOFMEMORY
;
}
hr
=
dxgi_surface_init
(
object
,
(
IDXGIDevice
*
)
iface
,
outer
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
=
dxgi_surface_init
(
object
,
(
IDXGIDevice
*
)
iface
,
outer
,
desc
)))
{
WARN
(
"Failed to initialize surface, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
...
...
dlls/dxgi/dxgi_private.h
View file @
d17bd8d8
...
...
@@ -142,8 +142,11 @@ struct dxgi_surface
IUnknown
*
outer_unknown
;
LONG
refcount
;
IDXGIDevice
*
device
;
DXGI_SURFACE_DESC
desc
;
};
HRESULT
dxgi_surface_init
(
struct
dxgi_surface
*
surface
,
IDXGIDevice
*
device
,
IUnknown
*
outer
)
DECLSPEC_HIDDEN
;
HRESULT
dxgi_surface_init
(
struct
dxgi_surface
*
surface
,
IDXGIDevice
*
device
,
IUnknown
*
outer
,
const
DXGI_SURFACE_DESC
*
desc
)
DECLSPEC_HIDDEN
;
#endif
/* __WINE_DXGI_PRIVATE_H */
dlls/dxgi/surface.c
View file @
d17bd8d8
...
...
@@ -154,9 +154,13 @@ static HRESULT STDMETHODCALLTYPE dxgi_surface_GetDevice(IDXGISurface *iface, REF
/* IDXGISurface methods */
static
HRESULT
STDMETHODCALLTYPE
dxgi_surface_GetDesc
(
IDXGISurface
*
iface
,
DXGI_SURFACE_DESC
*
desc
)
{
FIXME
(
"iface %p, desc %p stub!
\n
"
,
iface
,
desc
);
struct
dxgi_surface
*
surface
=
impl_from_IDXGISurface
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"iface %p, desc %p.
\n
"
,
iface
,
desc
);
*
desc
=
surface
->
desc
;
return
S_OK
;
}
static
HRESULT
STDMETHODCALLTYPE
dxgi_surface_Map
(
IDXGISurface
*
iface
,
DXGI_MAPPED_RECT
*
mapped_rect
,
UINT
flags
)
...
...
@@ -200,13 +204,15 @@ static const struct IUnknownVtbl dxgi_surface_inner_unknown_vtbl =
dxgi_surface_inner_Release
,
};
HRESULT
dxgi_surface_init
(
struct
dxgi_surface
*
surface
,
IDXGIDevice
*
device
,
IUnknown
*
outer
)
HRESULT
dxgi_surface_init
(
struct
dxgi_surface
*
surface
,
IDXGIDevice
*
device
,
IUnknown
*
outer
,
const
DXGI_SURFACE_DESC
*
desc
)
{
surface
->
IDXGISurface_iface
.
lpVtbl
=
&
dxgi_surface_vtbl
;
surface
->
IUnknown_iface
.
lpVtbl
=
&
dxgi_surface_inner_unknown_vtbl
;
surface
->
refcount
=
1
;
surface
->
outer_unknown
=
outer
?
outer
:
&
surface
->
IUnknown_iface
;
surface
->
device
=
device
;
surface
->
desc
=
*
desc
;
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