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
800fedc2
Commit
800fedc2
authored
Nov 14, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 14, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: Implement DXGID3D10RegisterLayers().
parent
21765291
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
2 deletions
+69
-2
dxgi_main.c
dlls/dxgi/dxgi_main.c
+69
-2
No files found.
dlls/dxgi/dxgi_main.c
View file @
800fedc2
...
@@ -24,6 +24,35 @@
...
@@ -24,6 +24,35 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dxgi
);
WINE_DEFAULT_DEBUG_CHANNEL
(
dxgi
);
static
CRITICAL_SECTION
dxgi_cs
;
static
CRITICAL_SECTION_DEBUG
dxgi_cs_debug
=
{
0
,
0
,
&
dxgi_cs
,
{
&
dxgi_cs_debug
.
ProcessLocksList
,
&
dxgi_cs_debug
.
ProcessLocksList
},
0
,
0
,
{(
DWORD_PTR
)(
__FILE__
": dxgi_cs"
)}
};
static
CRITICAL_SECTION
dxgi_cs
=
{
&
dxgi_cs_debug
,
-
1
,
0
,
0
,
0
,
0
};
struct
dxgi_main
{
struct
dxgi_device_layer
*
device_layers
;
UINT
layer_count
;
LONG
refcount
;
};
static
struct
dxgi_main
dxgi_main
;
static
void
dxgi_main_cleanup
(
void
)
{
EnterCriticalSection
(
&
dxgi_cs
);
HeapFree
(
GetProcessHeap
(),
0
,
dxgi_main
.
device_layers
);
dxgi_main
.
device_layers
=
NULL
;
dxgi_main
.
layer_count
=
0
;
LeaveCriticalSection
(
&
dxgi_cs
);
}
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstDLL
,
DWORD
fdwReason
,
LPVOID
lpv
)
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstDLL
,
DWORD
fdwReason
,
LPVOID
lpv
)
{
{
TRACE
(
"fdwReason %u
\n
"
,
fdwReason
);
TRACE
(
"fdwReason %u
\n
"
,
fdwReason
);
...
@@ -32,6 +61,11 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
...
@@ -32,6 +61,11 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
{
case
DLL_PROCESS_ATTACH
:
case
DLL_PROCESS_ATTACH
:
DisableThreadLibraryCalls
(
hInstDLL
);
DisableThreadLibraryCalls
(
hInstDLL
);
++
dxgi_main
.
refcount
;
break
;
case
DLL_PROCESS_DETACH
:
if
(
!--
dxgi_main
.
refcount
)
dxgi_main_cleanup
();
break
;
break
;
}
}
...
@@ -65,7 +99,40 @@ HRESULT WINAPI CreateDXGIFactory(REFIID riid, void **factory)
...
@@ -65,7 +99,40 @@ HRESULT WINAPI CreateDXGIFactory(REFIID riid, void **factory)
HRESULT
WINAPI
DXGID3D10RegisterLayers
(
const
struct
dxgi_device_layer
*
layers
,
UINT
layer_count
)
HRESULT
WINAPI
DXGID3D10RegisterLayers
(
const
struct
dxgi_device_layer
*
layers
,
UINT
layer_count
)
{
{
FIXME
(
"layers %p, layer_count %u stub!
\n
"
,
layers
,
layer_count
);
UINT
i
;
struct
dxgi_device_layer
*
new_layers
;
TRACE
(
"layers %p, layer_count %u
\n
"
,
layers
,
layer_count
);
EnterCriticalSection
(
&
dxgi_cs
);
if
(
!
dxgi_main
.
layer_count
)
new_layers
=
HeapAlloc
(
GetProcessHeap
(),
0
,
layer_count
*
sizeof
(
*
new_layers
));
else
new_layers
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
dxgi_main
.
device_layers
,
(
dxgi_main
.
layer_count
+
layer_count
)
*
sizeof
(
*
new_layers
));
if
(
!
new_layers
)
{
LeaveCriticalSection
(
&
dxgi_cs
);
ERR
(
"Failed to allocate layer memory
\n
"
);
return
E_OUTOFMEMORY
;
}
for
(
i
=
0
;
i
<
layer_count
;
++
i
)
{
const
struct
dxgi_device_layer
*
layer
=
&
layers
[
i
];
TRACE
(
"layer %d: id %#x, init %p, get_size %p, create %p
\n
"
,
i
,
layer
->
id
,
layer
->
init
,
layer
->
get_size
,
layer
->
create
);
new_layers
[
dxgi_main
.
layer_count
+
i
]
=
*
layer
;
}
dxgi_main
.
device_layers
=
new_layers
;
dxgi_main
.
layer_count
+=
layer_count
;
LeaveCriticalSection
(
&
dxgi_cs
);
return
E_NOTIMPL
;
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