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
4ccbc948
Commit
4ccbc948
authored
Mar 31, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 31, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: Set the initial buffer data, when present.
parent
05914424
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
3 deletions
+27
-3
device.c
dlls/d3d10core/device.c
+1
-1
device.c
dlls/wined3d/device.c
+25
-2
wined3d.idl
include/wine/wined3d.idl
+1
-0
No files found.
dlls/d3d10core/device.c
View file @
4ccbc948
...
...
@@ -620,7 +620,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateBuffer(ID3D10Device *iface,
wined3d_desc
.
misc_flags
=
desc
->
MiscFlags
;
hr
=
IWineD3DDevice_CreateBuffer
(
This
->
wined3d_device
,
&
wined3d_desc
,
(
IUnknown
*
)
object
,
&
object
->
wined3d_buffer
);
data
?
data
->
pSysMem
:
NULL
,
(
IUnknown
*
)
object
,
&
object
->
wined3d_buffer
);
if
(
FAILED
(
hr
))
{
ERR
(
"CreateBuffer failed, returning %#x
\n
"
,
hr
);
...
...
dlls/wined3d/device.c
View file @
4ccbc948
...
...
@@ -435,13 +435,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetParent(IWineD3DDevice *iface, IUnkno
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateBuffer
(
IWineD3DDevice
*
iface
,
struct
wined3d_buffer_desc
*
desc
,
IUnknown
*
parent
,
IWineD3DBuffer
**
buffer
)
struct
wined3d_buffer_desc
*
desc
,
const
void
*
data
,
IUnknown
*
parent
,
IWineD3DBuffer
**
buffer
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
wined3d_buffer
*
object
;
HRESULT
hr
;
TRACE
(
"iface %p, desc %p,
parent %p, buffer %p
\n
"
,
iface
,
desc
,
parent
,
buffer
);
TRACE
(
"iface %p, desc %p,
data %p, parent %p, buffer %p
\n
"
,
iface
,
desc
,
data
,
parent
,
buffer
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
...
...
@@ -471,6 +471,29 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateBuffer(IWineD3DDevice *iface,
TRACE
(
"size %#x, usage=%#x, format %s, memory @ %p, iface @ %p
\n
"
,
object
->
resource
.
size
,
object
->
resource
.
usage
,
debug_d3dformat
(
object
->
resource
.
format_desc
->
format
),
object
->
resource
.
allocatedMemory
,
object
);
if
(
data
)
{
BYTE
*
ptr
;
hr
=
IWineD3DBuffer_Map
((
IWineD3DBuffer
*
)
object
,
0
,
desc
->
byte_width
,
&
ptr
,
0
);
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to map buffer, hr %#x
\n
"
,
hr
);
IWineD3DBuffer_Release
((
IWineD3DBuffer
*
)
object
);
return
hr
;
}
memcpy
(
ptr
,
data
,
desc
->
byte_width
);
hr
=
IWineD3DBuffer_Unmap
((
IWineD3DBuffer
*
)
object
);
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to unmap buffer, hr %#x
\n
"
,
hr
);
IWineD3DBuffer_Release
((
IWineD3DBuffer
*
)
object
);
return
hr
;
}
}
*
buffer
=
(
IWineD3DBuffer
*
)
object
;
return
WINED3D_OK
;
...
...
include/wine/wined3d.idl
View file @
4ccbc948
...
...
@@ -2909,6 +2909,7 @@ interface IWineD3DDevice : IWineD3DBase
{
HRESULT
CreateBuffer
(
[
in
]
struct
wined3d_buffer_desc
*
desc
,
[
in
]
const
void
*
data
,
[
in
]
IUnknown
*
parent
,
[
out
]
IWineD3DBuffer
**
buffer
)
;
...
...
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