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
b171d5f9
Commit
b171d5f9
authored
Dec 02, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Implement texture creation from system memory.
parent
d9ab258d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
device.c
dlls/d3d9/device.c
+20
-0
No files found.
dlls/d3d9/device.c
View file @
b171d5f9
...
...
@@ -693,13 +693,23 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(IDirect3DDevice9Ex *ifa
{
IDirect3DDevice9Impl
*
This
=
impl_from_IDirect3DDevice9Ex
(
iface
);
IDirect3DTexture9Impl
*
object
;
BOOL
set_mem
=
FALSE
;
HRESULT
hr
;
TRACE
(
"iface %p, width %u, height %u, levels %u, usage %#x, format %#x, pool %#x, texture %p, shared_handle %p.
\n
"
,
iface
,
width
,
height
,
levels
,
usage
,
format
,
pool
,
texture
,
shared_handle
);
if
(
shared_handle
)
{
if
(
pool
==
D3DPOOL_SYSTEMMEM
)
{
if
(
levels
!=
1
)
return
D3DERR_INVALIDCALL
;
set_mem
=
TRUE
;
}
else
FIXME
(
"Resource sharing not implemented, *shared_handle %p.
\n
"
,
*
shared_handle
);
}
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
...
...
@@ -716,6 +726,16 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(IDirect3DDevice9Ex *ifa
return
hr
;
}
if
(
set_mem
)
{
struct
wined3d_resource
*
resource
;
IDirect3DSurface9Impl
*
surface
;
resource
=
wined3d_texture_get_sub_resource
(
object
->
wined3d_texture
,
0
);
surface
=
wined3d_resource_get_parent
(
resource
);
wined3d_surface_set_mem
(
surface
->
wined3d_surface
,
*
shared_handle
);
}
TRACE
(
"Created texture %p.
\n
"
,
object
);
*
texture
=
&
object
->
IDirect3DTexture9_iface
;
...
...
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