Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0491fcce
Commit
0491fcce
authored
Dec 04, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: Implement IDXGIAdapter::GetDesc().
parent
dd5fc79f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
7 deletions
+48
-7
adapter.c
dlls/dxgi/adapter.c
+42
-4
dxgi_main.c
dlls/dxgi/dxgi_main.c
+1
-1
dxgi_private.h
dlls/dxgi/dxgi_private.h
+3
-2
directx.c
dlls/wined3d/directx.c
+1
-0
wined3d.idl
include/wine/wined3d.idl
+1
-0
No files found.
dlls/dxgi/adapter.c
View file @
0491fcce
...
@@ -104,7 +104,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetParent(IWineDXGIAdapter *iface,
...
@@ -104,7 +104,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetParent(IWineDXGIAdapter *iface,
TRACE
(
"iface %p, riid %s, parent %p
\n
"
,
iface
,
debugstr_guid
(
riid
),
parent
);
TRACE
(
"iface %p, riid %s, parent %p
\n
"
,
iface
,
debugstr_guid
(
riid
),
parent
);
return
IDXGIFactory_QueryInterface
(
This
->
parent
,
riid
,
parent
);
return
I
Wine
DXGIFactory_QueryInterface
(
This
->
parent
,
riid
,
parent
);
}
}
/* IDXGIAdapter methods */
/* IDXGIAdapter methods */
...
@@ -132,9 +132,47 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_EnumOutputs(IWineDXGIAdapter *ifac
...
@@ -132,9 +132,47 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_EnumOutputs(IWineDXGIAdapter *ifac
static
HRESULT
STDMETHODCALLTYPE
dxgi_adapter_GetDesc
(
IWineDXGIAdapter
*
iface
,
DXGI_ADAPTER_DESC
*
desc
)
static
HRESULT
STDMETHODCALLTYPE
dxgi_adapter_GetDesc
(
IWineDXGIAdapter
*
iface
,
DXGI_ADAPTER_DESC
*
desc
)
{
{
FIXME
(
"iface %p, desc %p stub!
\n
"
,
iface
,
desc
);
struct
dxgi_adapter
*
This
=
(
struct
dxgi_adapter
*
)
iface
;
WINED3DADAPTER_IDENTIFIER
adapter_id
;
char
description
[
128
];
IWineD3D
*
wined3d
;
HRESULT
hr
;
return
E_NOTIMPL
;
TRACE
(
"iface %p, desc %p.
\n
"
,
iface
,
desc
);
if
(
!
desc
)
return
E_INVALIDARG
;
wined3d
=
IWineDXGIFactory_get_wined3d
(
This
->
parent
);
adapter_id
.
driver_size
=
0
;
adapter_id
.
description
=
description
;
adapter_id
.
description_size
=
sizeof
(
description
);
adapter_id
.
device_name_size
=
0
;
EnterCriticalSection
(
&
dxgi_cs
);
hr
=
IWineD3D_GetAdapterIdentifier
(
wined3d
,
This
->
ordinal
,
0
,
&
adapter_id
);
IWineD3D_Release
(
wined3d
);
LeaveCriticalSection
(
&
dxgi_cs
);
if
(
SUCCEEDED
(
hr
))
{
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
description
,
-
1
,
desc
->
Description
,
128
))
{
DWORD
err
=
GetLastError
();
ERR
(
"Failed to translate description %s (%#x).
\n
"
,
debugstr_a
(
description
),
err
);
hr
=
E_FAIL
;
}
desc
->
VendorId
=
adapter_id
.
vendor_id
;
desc
->
DeviceId
=
adapter_id
.
device_id
;
desc
->
SubSysId
=
adapter_id
.
subsystem_id
;
desc
->
Revision
=
adapter_id
.
revision
;
desc
->
DedicatedVideoMemory
=
adapter_id
.
video_memory
;
desc
->
DedicatedSystemMemory
=
0
;
/* FIXME */
desc
->
SharedSystemMemory
=
0
;
/* FIXME */
memcpy
(
&
desc
->
AdapterLuid
,
&
adapter_id
.
adapter_luid
,
sizeof
(
desc
->
AdapterLuid
));
}
return
hr
;
}
}
static
HRESULT
STDMETHODCALLTYPE
dxgi_adapter_CheckInterfaceSupport
(
IWineDXGIAdapter
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
dxgi_adapter_CheckInterfaceSupport
(
IWineDXGIAdapter
*
iface
,
...
@@ -175,7 +213,7 @@ static const struct IWineDXGIAdapterVtbl dxgi_adapter_vtbl =
...
@@ -175,7 +213,7 @@ static const struct IWineDXGIAdapterVtbl dxgi_adapter_vtbl =
dxgi_adapter_get_ordinal
,
dxgi_adapter_get_ordinal
,
};
};
HRESULT
dxgi_adapter_init
(
struct
dxgi_adapter
*
adapter
,
IDXGIFactory
*
parent
,
UINT
ordinal
)
HRESULT
dxgi_adapter_init
(
struct
dxgi_adapter
*
adapter
,
I
Wine
DXGIFactory
*
parent
,
UINT
ordinal
)
{
{
struct
dxgi_output
*
output
;
struct
dxgi_output
*
output
;
...
...
dlls/dxgi/dxgi_main.c
View file @
0491fcce
...
@@ -129,7 +129,7 @@ HRESULT WINAPI CreateDXGIFactory(REFIID riid, void **factory)
...
@@ -129,7 +129,7 @@ HRESULT WINAPI CreateDXGIFactory(REFIID riid, void **factory)
goto
fail
;
goto
fail
;
}
}
hr
=
dxgi_adapter_init
(
adapter
,
(
IDXGIFactory
*
)
object
,
i
);
hr
=
dxgi_adapter_init
(
adapter
,
(
I
Wine
DXGIFactory
*
)
object
,
i
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
UINT
j
;
UINT
j
;
...
...
dlls/dxgi/dxgi_private.h
View file @
0491fcce
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include "wingdi.h"
#include "wingdi.h"
#include "winuser.h"
#include "winuser.h"
#include "objbase.h"
#include "objbase.h"
#include "winnls.h"
#include "dxgi.h"
#include "dxgi.h"
#ifdef DXGI_INIT_GUID
#ifdef DXGI_INIT_GUID
...
@@ -111,13 +112,13 @@ void dxgi_output_init(struct dxgi_output *output, struct dxgi_adapter *adapter)
...
@@ -111,13 +112,13 @@ void dxgi_output_init(struct dxgi_output *output, struct dxgi_adapter *adapter)
struct
dxgi_adapter
struct
dxgi_adapter
{
{
const
struct
IWineDXGIAdapterVtbl
*
vtbl
;
const
struct
IWineDXGIAdapterVtbl
*
vtbl
;
IDXGIFactory
*
parent
;
I
Wine
DXGIFactory
*
parent
;
LONG
refcount
;
LONG
refcount
;
UINT
ordinal
;
UINT
ordinal
;
IDXGIOutput
*
output
;
IDXGIOutput
*
output
;
};
};
HRESULT
dxgi_adapter_init
(
struct
dxgi_adapter
*
adapter
,
IDXGIFactory
*
parent
,
UINT
ordinal
)
DECLSPEC_HIDDEN
;
HRESULT
dxgi_adapter_init
(
struct
dxgi_adapter
*
adapter
,
I
Wine
DXGIFactory
*
parent
,
UINT
ordinal
)
DECLSPEC_HIDDEN
;
/* IDXGISwapChain */
/* IDXGISwapChain */
extern
const
struct
IDXGISwapChainVtbl
dxgi_swapchain_vtbl
DECLSPEC_HIDDEN
;
extern
const
struct
IDXGISwapChainVtbl
dxgi_swapchain_vtbl
DECLSPEC_HIDDEN
;
...
...
dlls/wined3d/directx.c
View file @
0491fcce
...
@@ -2425,6 +2425,7 @@ static HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Ad
...
@@ -2425,6 +2425,7 @@ static HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Ad
memcpy
(
&
pIdentifier
->
device_identifier
,
&
IID_D3DDEVICE_D3DUID
,
sizeof
(
pIdentifier
->
device_identifier
));
memcpy
(
&
pIdentifier
->
device_identifier
,
&
IID_D3DDEVICE_D3DUID
,
sizeof
(
pIdentifier
->
device_identifier
));
pIdentifier
->
whql_level
=
(
Flags
&
WINED3DENUM_NO_WHQL_LEVEL
)
?
0
:
1
;
pIdentifier
->
whql_level
=
(
Flags
&
WINED3DENUM_NO_WHQL_LEVEL
)
?
0
:
1
;
memcpy
(
&
pIdentifier
->
adapter_luid
,
&
adapter
->
luid
,
sizeof
(
pIdentifier
->
adapter_luid
));
memcpy
(
&
pIdentifier
->
adapter_luid
,
&
adapter
->
luid
,
sizeof
(
pIdentifier
->
adapter_luid
));
pIdentifier
->
video_memory
=
adapter
->
TextureRam
;
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
...
...
include/wine/wined3d.idl
View file @
0491fcce
...
@@ -1706,6 +1706,7 @@ typedef struct _WINED3DADAPTER_IDENTIFIER
...
@@ -1706,6 +1706,7 @@ typedef struct _WINED3DADAPTER_IDENTIFIER
GUID
device_identifier
;
GUID
device_identifier
;
DWORD
whql_level
;
DWORD
whql_level
;
LUID
adapter_luid
;
LUID
adapter_luid
;
SIZE_T
video_memory
;
}
WINED3DADAPTER_IDENTIFIER
;
}
WINED3DADAPTER_IDENTIFIER
;
typedef
struct
_WINED3DPRESENT_PARAMETERS
typedef
struct
_WINED3DPRESENT_PARAMETERS
...
...
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