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
d429aaa9
Commit
d429aaa9
authored
Apr 19, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Verify the viewport belongs to the device on execute buffer execution.
parent
9edeb22c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
11 deletions
+14
-11
ddraw_private.h
dlls/ddraw/ddraw_private.h
+2
-2
device.c
dlls/ddraw/device.c
+3
-2
executebuffer.c
dlls/ddraw/executebuffer.c
+9
-7
No files found.
dlls/ddraw/ddraw_private.h
View file @
d429aaa9
...
...
@@ -515,8 +515,8 @@ HRESULT d3d_execute_buffer_init(IDirect3DExecuteBufferImpl *execute_buffer,
IDirect3DDeviceImpl
*
device
,
D3DEXECUTEBUFFERDESC
*
desc
)
DECLSPEC_HIDDEN
;
/* The execute function */
void
IDirect3DExecuteBufferImpl_Execute
(
IDirect3DExecuteBufferImpl
*
This
,
IDirect3DDeviceImpl
*
Device
,
IDirect3DViewportImpl
*
ViewportImpl
)
DECLSPEC_HIDDEN
;
HRESULT
d3d_execute_buffer_execute
(
IDirect3DExecuteBufferImpl
*
execute_buffer
,
IDirect3DDeviceImpl
*
device
,
IDirect3DViewportImpl
*
viewport
)
DECLSPEC_HIDDEN
;
/*****************************************************************************
* IDirect3DVertexBuffer
...
...
dlls/ddraw/device.c
View file @
d429aaa9
...
...
@@ -718,6 +718,7 @@ IDirect3DDeviceImpl_1_Execute(IDirect3DDevice *iface,
IDirect3DDeviceImpl
*
This
=
device_from_device1
(
iface
);
IDirect3DExecuteBufferImpl
*
Direct3DExecuteBufferImpl
=
(
IDirect3DExecuteBufferImpl
*
)
ExecuteBuffer
;
IDirect3DViewportImpl
*
Direct3DViewportImpl
=
(
IDirect3DViewportImpl
*
)
Viewport
;
HRESULT
hr
;
TRACE
(
"iface %p, buffer %p, viewport %p, flags %#x.
\n
"
,
iface
,
ExecuteBuffer
,
Viewport
,
Flags
);
...
...
@@ -726,10 +727,10 @@ IDirect3DDeviceImpl_1_Execute(IDirect3DDevice *iface,
/* Execute... */
EnterCriticalSection
(
&
ddraw_cs
);
IDirect3DExecuteBufferImpl_E
xecute
(
Direct3DExecuteBufferImpl
,
This
,
Direct3DViewportImpl
);
hr
=
d3d_execute_buffer_e
xecute
(
Direct3DExecuteBufferImpl
,
This
,
Direct3DViewportImpl
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
D3D_OK
;
return
hr
;
}
/*****************************************************************************
...
...
dlls/ddraw/executebuffer.c
View file @
d429aaa9
...
...
@@ -68,10 +68,8 @@ static void _dump_D3DEXECUTEBUFFERDESC(const D3DEXECUTEBUFFERDESC *lpDesc) {
* Viewport: Viewport for this operation
*
*****************************************************************************/
void
IDirect3DExecuteBufferImpl_Execute
(
IDirect3DExecuteBufferImpl
*
This
,
IDirect3DDeviceImpl
*
lpDevice
,
IDirect3DViewportImpl
*
lpViewport
)
HRESULT
d3d_execute_buffer_execute
(
IDirect3DExecuteBufferImpl
*
This
,
IDirect3DDeviceImpl
*
lpDevice
,
IDirect3DViewportImpl
*
lpViewport
)
{
/* DWORD bs = This->desc.dwBufferSize; */
DWORD
vs
=
This
->
data
.
dwVertexOffset
;
...
...
@@ -81,10 +79,14 @@ IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This,
char
*
instr
=
(
char
*
)
This
->
desc
.
lpData
+
is
;
/* Should check if the viewport was added or not to the device */
if
(
lpViewport
->
active_device
!=
lpDevice
)
{
WARN
(
"Viewport %p active device is %p.
\n
"
,
lpViewport
,
lpViewport
->
active_device
);
return
DDERR_INVALIDPARAMS
;
}
/* Activate the viewport */
lpViewport
->
active_device
=
lpDevice
;
viewport_activate
(
lpViewport
,
FALSE
);
TRACE
(
"ExecuteData :
\n
"
);
...
...
@@ -551,7 +553,7 @@ IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This,
}
end_of_buffer:
;
return
D3D_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